1vpClassifyScanline(3) Library Functions Manual vpClassifyScanline(3)
2
3
4
6 vpClassifyScanline - incrementally create a preclassified volume from
7 scanlines of scalar data
8
10 #include <volpack.h>
11
12 vpResult
13 vpClassifyScanline(vpc, voxels)
14 vpContext *vpc;
15 void *voxels;
16
18 vpc VolPack context from vpCreateContext.
19
20 voxels 1D array of voxel data.
21
23 vpClassifyScanline is used to incrementally compute a preclassified
24 volume by classifying one scanline of voxels and storing the result in
25 the current preclassified volume.
26
27 The voxels argument is a 1D array containing voxels in the format pre‐
28 viously specified with vpSetVoxelSize and vpSetVoxelField. vpVolume‐
29 Size must be called to declare the size of the volume before the first
30 call to vpClassifyScanline, and the length of the 1D voxel array must
31 be equal to the length of the X dimension of the volume. The 1D voxel
32 array may be initialized with vpScanlineNormals or a user-defined func‐
33 tion.
34
35 The voxels in the array are classified using the current opacity trans‐
36 fer function (see vpSetClassifierTable(3)) and appended to the preclas‐
37 sified volume (see vpClassifyVolume(3)). Scanlines must be processed
38 in Z-major order: all of the scanlines in the Z=0 slice are processed
39 from Y=0 onward, then the Z=1 slice is processed, and so on. When the
40 last scanline in the volume has been processed the preclassified data
41 structure is ready to be used for rendering. Rendering is not possible
42 until all scanlines have been processed.
43
44 When the first scanline of a volume is passed to vpClassifyScanline,
45 any existing preclassified volume data is destroyed.
46
48 The normal return value is VP_OK. The following error return values
49 are possible:
50
51 VPERROR_BAD_VOXEL
52 The voxel size or the voxel fields have not been specified or
53 have been incorrectly specified.
54
55 VPERROR_BAD_CLASSIFIER
56 The opacity transfer function tables have invalid sizes or are
57 associated with invalid voxel fields or have been incorrectly
58 specified.
59
61 VolPack(3), vpCreateContext(3), vpSetClassifierTable(3), vpClassifyVol‐
62 ume(3), vpClassifyScalars(3)
63
64
65
66VolPack vpClassifyScanline(3)