Set the value of an option
#include <volpack.h>
\$1 vpSeti(vpc, option, value)
vpContext *vpc; int option; int value;
vpSetd(vpc, option, value) vpContext *vpc; int option; double value;
VolPack context from vpCreateContext.
Constant that specifies the option to be set.
New value for the option.
These functions are used to set the values of integer- or double-valued options in a rendering context. The following list summarizes the integer-valued options that can be set with vpSeti:
Choose whether transformation matrices are premultiplied or postmultiplied. If value is VP_CONCAT_LEFT then matrices are premultiplied. If value is VP_CONCAT_RIGHT then matrices are postmultiplied. Default: VP_CONCAT_RIGHT.
Set the suggested number of entries in the depth cueing lookup table. See vpSetDepthCueing(3). Default: none
Set the suggested width (in pixels) of the intermediate image work buffer. See vpRenderRawVolume(3). Default: none
Set the suggested height (in pixels) of the intermediate image work buffer. See vpRenderRawVolume(3). Default: none
Get the current shadow light (see vpSetShadowLookupShader(3)). Legal values are VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5. Default: VP_LIGHT0
Set the suggested width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). Default: none
Set the suggested height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). Default: none
Set the current shadow bias value (see vpSetShadowLookupShader(3)). The value is an integral distance in units of voxels. Default: 4
Force the rendering routine to composite along a particular principle viewing axis, regardless of the current viewing direction. Legal values are VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS. Set the value to VP_NO_AXIS to let VolPack choose the optimal axis automatically (the default). This option is normally used only for debugging.
When pixel tracing is enabled (see vpTracePixel(3)) and shadows are enabled (the VP_SHADOW option to vpEnable(3)), this option is used to choose one shadow buffer pixel to trace. The value must be a voxel slice number. The shadow buffer pixel that gets traced is the shadow pixel that affects the traced image pixel at the indicated slice.
The following list summarizes the double-valued options that can be set with vpSetd:
Set the difference in depth between two adjacent entries in the depth cueing lookup table (see vpSetDepthCueing(3)). Must be greater than 0.0 and less than 1.0. Default: 1/255
Set the maximum opacity threshold. During rendering, when a pixel's opacity reaches this threshold no more voxels are composited into the pixel. To maximize performance, the value should be as low as possible without adversely affecting image quality. Must be in the range 0.0-1.0 (1.0 is the default and 0.95 is the suggested value). Default: 1.0
Set the minimum opacity threshold. During classification, if a voxel's opacity is less than or equal to this threshold then the voxel is discarded before rendering. To maximize performance, the value should be as high as possible without adversely affecting image quality. Must be in the range 0.0-1.0 (0.0 is the default and 0.05 is the suggested value). Default: 0.0
The normal return value is VP_OK. The following error return values are possible:
The option argument is invalid.
The value argument is invalid or out of range.
VolPack(3), vpCreateContext(3), vpGeti(3)