.\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford .\" Junior University. All rights reserved. .\" .\" Permission to use, copy, modify and distribute this software and its .\" documentation for any purpose is hereby granted without fee, provided .\" that the above copyright notice and this permission notice appear in .\" all copies of this software and that you do not sell the software. .\" Commercial licensing is available by contacting the author. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. .\" .\" Author: .\" Phil Lacroute .\" Computer Systems Laboratory .\" Electrical Engineering Dept. .\" Stanford University .\" .\" $Date: 1994/12/31 19:49:53 $ .\" $Revision: 1.1 $ .\" .\" Macros .\" .FS -- function start .\" is return type of function .\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. .\" .FA -- function arguments .\" one argument declaration follows on next line .de FA .IP " " 4 .. .\" .FE -- function end .\" end of function declaration .de FE .PD .. .\" .DS -- display start .de DS .IP " " 4 .. .\" .DE -- display done .de DE .LP .. .TH vpClassifyScanline 3 "" VolPack .SH NAME vpClassifyScanline \- incrementally create a preclassified volume from scanlines of scalar data .SH SYNOPSIS #include .sp .FS vpResult \fBvpClassifyScanline(\fIvpc, voxels\fB)\fR .FA vpContext *\fIvpc;\fR .FA void *\fIvoxels;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIvoxels\fR 1D array of voxel data. .SH DESCRIPTION \fBvpClassifyScanline\fR is used to incrementally compute a preclassified volume by classifying one scanline of voxels and storing the result in the current preclassified volume. .PP The \fIvoxels\fR argument is a 1D array containing voxels in the format previously specified with \fBvpSetVoxelSize\fR and \fBvpSetVoxelField\fR. \fBvpVolumeSize\fR must be called to declare the size of the volume before the first call to \fBvpClassifyScanline\fR, and the length of the 1D voxel array must be equal to the length of the X dimension of the volume. The 1D voxel array may be initialized with \fBvpScanlineNormals\fR or a user-defined function. .PP The voxels in the array are classified using the current opacity transfer function (see vpSetClassifierTable(3)) and appended to the preclassified volume (see vpClassifyVolume(3)). Scanlines must be processed in Z-major order: all of the scanlines in the Z=0 slice are processed from Y=0 onward, then the Z=1 slice is processed, and so on. When the last scanline in the volume has been processed the preclassified data structure is ready to be used for rendering. Rendering is not possible until all scanlines have been processed. .PP When the first scanline of a volume is passed to \fBvpClassifyScanline\fR, any existing preclassified volume data is destroyed. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .IP VPERROR_BAD_CLASSIFIER The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetClassifierTable(3), vpClassifyVolume(3), vpClassifyScalars(3)