vpClassifyScanline(3)
β¨ vpClassifyScanline β the library function era π
okay bestie, welcome to vpClassifyScanline(3) from the Library Functions Manual π this is the VolPack girlie whose whole job is building a preclassified volume one scanline at a time. she's methodical. she's iconic. she does NOT do shortcuts. let's get into it π¦
πΈ NAME πΈ
vpClassifyScanline β incrementally create a preclassified volume from scanlines of scalar data β¨
π SYNOPSIS π
#include <volpack.h>
vpResult
vpClassifyScanline(vpc, voxels)
vpContext *vpc;
void *voxels;
π«Ά ARGUMENTS π«Ά
vpcβ the VolPack context, aka the one you got fromvpCreateContext. your girl needs her context, no cap.voxelsβ a 1D array of voxel data. just one dimension, she's lowkey simple like that π
β¨ DESCRIPTION β¨
so here's the vibe: vpClassifyScanline is how you incrementally compute a preclassified volume. you feed it one scanline of voxels, she classifies it, she stores the result in the current preclassified volume. one at a time. patiently. main character energy fr fr π₯
the voxels argument is a 1D array containing voxels in the format you already specified earlier with vpSetVoxelSize and vpSetVoxelField. and listen β you must call vpVolumeSize to declare the size of the volume before the very first call to vpClassifyScanline. non-negotiable. also the length of that 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 with a user-defined function, whichever you're feeling π§
the voxels in the array get classified using the current opacity transfer function (go look at vpSetClassifierTable(3) for that one) and then appended to the preclassified volume (peep vpClassifyVolume(3)). π«
β οΈ okay this part is important, bestie β scanlines must be processed in Z-major order: all of the scanlines in theZ=0slice get processed fromY=0onward, then theZ=1slice is processed, and so on. do not freestyle this. the order is the order. π
when the last scanline in the volume has been processed, the preclassified data structure is ready to be used for rendering. and heads up: rendering is not possible until all scanlines have been processed. like, not even a little. so finish your homework before you go out π
also, real talk: when the first scanline of a volume is passed to vpClassifyScanline, any existing preclassified volume data is destroyed. gone. poof. she clears the table before she sets it. π
π ERRORS π
the normal return value is VP_OK β that's the slay outcome, the one we're manifesting π
the following error return values are possible:
VPERROR_BAD_VOXELβ the voxel size or the voxel fields have not been specified, or have been incorrectly specified. you skipped a step, babe πVPERROR_BAD_CLASSIFIERβ the opacity transfer function tables have invalid sizes, or are associated with invalid voxel fields, or have been incorrectly specified. the classifier is not classifying, she is going through it π
π SEE ALSO π
VolPack(3), vpCreateContext(3), vpSetClassifierTable(3), vpClassifyVolume(3), vpClassifyScalars(3)
go read them, iykyk π
this has been your girl vpClassifyScanline(3), straight out of the VolPack era, dated and versioned and everything β stay classy, stay Z-major, and drink some water πβ¨ππ¦
π¦ where this page comes from
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- Copyright (c) 1995-2008, Stanford University
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms