Incrementally create a preclassified volume from scanlines of scalar data
#include <volpack.h>
\$1 vpClassifyScanline(vpc, voxels)
vpContext *vpc; void *voxels;
VolPack context from vpCreateContext.
1D array of voxel data.
vpClassifyScanline is used to incrementally compute a preclassified volume by classifying one scanline of voxels and storing the result in the current preclassified volume.
The voxels argument is a 1D array containing voxels in the format previously specified with vpSetVoxelSize and vpSetVoxelField. vpVolumeSize must be called to declare the size of the volume before the first call to vpClassifyScanline, 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 vpScanlineNormals or a user-defined function.
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.
When the first scanline of a volume is passed to vpClassifyScanline, any existing preclassified volume data is destroyed.
The normal return value is VP_OK. The following error return values are possible:
The voxel size or the voxel fields have not been specified or have been incorrectly specified.
The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified.
VolPack(3), vpCreateContext(3), vpSetClassifierTable(3), vpClassifyVolume(3), vpClassifyScalars(3)