---
name: "Get"
section: "3"
platform: "linux"
package: "libvolpack1-dev"
version: "1.0b3-10"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Get"
---

# Get(3)

get the value of an option

## NAME

vpGeti, vpGetd, vpGetp - get the value of an option

## SYNOPSIS

\#include \<volpack.h\>

vpResult

**vpGeti(***vpc, option, iptr***)**

-

  vpContext \**vpc;*

-

  int *option;*

-

  int \**iptr;*

vpResult

**vpGetd(***vpc, option, dptr***)**

-

  vpContext \**vpc;*

-

  int *option;*

-

  double \**dptr;*

vpResult

**vpGetp(***vpc, option, pptr***)**

-

  vpContext \**vpc;*

-

  int *option;*

-

  void \**pptr;*

## ARGUMENTS

- *vpc*

  VolPack context from **vpCreateContext.**

- *option*

  Constant that specifies the option to be retrieved.

- *iptr*

  Location to store an integer result.

- *dptr*

  Location to store a double result.

- *pptr*

  Location to store a pointer result.

## DESCRIPTION

These functions are used the get the values of integer-, double- or pointer-valued state variables in a rendering context.  The following list summarizes the integer-valued options that can be retrieved with **vpGeti**.  The value of the option is stored in the location given by *iptr;* the return value of **vpGeti** is not the value of the option.  Unless otherwise noted, the result is a single integer and *iptr* should point to a single integer location.

- VP\_XLEN

  Get the length of the X dimension of the volume in voxels.

- VP\_YLEN

  Get the length of the Y dimension of the volume in voxels.

- VP\_ZLEN

  Get the length of the Y dimension of the volume in voxels.

- VP\_BYTES\_PER\_VOXEL

  Get the size of a voxel in bytes.

- VP\_VOXEL\_FIELD\_COUNT

  Get the number of fields in a voxel.

- VP\_SHADE\_FIELD\_COUNT

  Get the number of fields in a voxel used as parameters for shading the voxel.

- VP\_FIELD\_SIZES

  Get the size of each voxel field in bytes.  *iptr* must point to an array of integers containing one entry for each voxel field (use VP\_VOXEL\_FIELD\_COUNT to determine the number of fields).

- VP\_FIELD\_OFFSETS

  Get the byte offset from the beginning of a voxel for each voxel field.  *iptr* must point to an array of integers containing one entry for each voxel field (use VP\_VOXEL\_FIELD\_COUNT to determine the number of fields).

- VP\_FIELD\_MAXES

  Get the maximum value of the quantity stored in each voxel field.  *iptr* must point to an array of integers containing one entry for each voxel field (use VP\_VOXEL\_FIELD\_COUNT to determine the number of fields).

- VP\_VOXEL\_DATA\_SIZE

  Get the size (in bytes) of the 3D voxel array.

- VP\_VOXEL\_XSTRIDE

  Get the stride (in bytes) for the X dimension of the 3D voxel array.

- VP\_VOXEL\_YSTRIDE

  Get the stride (in bytes) for the Y dimension of the 3D voxel array.

- VP\_VOXEL\_ZSTRIDE

  Get the stride (in bytes) for the Z dimension of the 3D voxel array.

- VP\_CLASSIFY\_FIELD\_COUNT

  Get the number of fields in a voxel used as parameters for classifying the voxel (the number of arguments to the opacity transfer function).

- VP\_CLASSIFY\_FIELDS

  Get the field numbers for the arguments to the opacity transfer function.  *iptr* must point to an array of integers containing one entry for each argument (use VP\_CLASSIFY\_FIELD\_COUNT to determine the number of arguments).

- VP\_CLASSIFY\_TABLE\_SIZES

  Get the size (in bytes) of each lookup table used for the opacity transfer function.  *iptr* must point to an array of integers containing one entry for each lookup table (use VP\_CLASSIFY\_FIELD\_COUNT to determine the number of lookup tables, which equals the number of arguments to the opacity transfer function).

- VP\_COLOR\_CHANNELS

  Get the number of color channels that the current shading lookup tables or shading callback function will produce.

- VP\_SHADE\_COLOR\_SIZE

  Get the size of the shading lookup table for color values (see vpSetLookupShader(3)).

- VP\_SHADE\_WEIGHT\_SIZE

  Get the size of the shading lookup table for weight values (see vpSetLookupShader(3)).

- VP\_MATERIAL\_COUNT

  Get the number of material types used by the current lookup shader (see vpSetLookupShader(3)).

- VP\_SHADE\_COLOR\_FIELD

  Get the field number used for indexing the shading lookup table for color values (see vpSetLookupShader(3)).

- VP\_SHADE\_WEIGHT\_FIELD

  Get the field number used for indexing the shading lookup table for weight values (see vpSetLookupShader(3)).

- VP\_LIGHT0

  - VP\_LIGHT1

  - VP\_LIGHT2

  - VP\_LIGHT3

  - VP\_LIGHT4

  - VP\_LIGHT5

  The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.

- VP\_LIGHT\_BOTH\_SIDES

  The retrieved value is nonzero if two-sided lighting is enabled (see vpSetLight(3)), or 0 if it is disabled.

- VP\_REVERSE\_SURFACE\_SIDES

  The retrieved value is nonzero if the definitions of interior and exterior surfaces have been reversed (see vpSetMaterial(3)), or 0 if they have not.

- VP\_DEPTH\_CUE

  The retrieved value is nonzero if depth cueing is enabled, or 0 if it is disabled.

- VP\_DEPTH\_CUE\_TABLE\_SIZE

  Get the current number of entries in the depth cueing table (see vpSetDepthCueing(3)).

- VP\_DEPTH\_CUE\_SIZE\_HINT

  Get the current hint for the number of entries in the depth cueing table (see vpSetDepthCueing(3)).

- VP\_CURRENT\_MATRIX

  Get the identifier for the current transformation matrix (VP\_MODEL, VP\_VIEW or VP\_PROJECT).

- VP\_CONCAT\_MODE

  Get the identifier for the current matrix concatenation mode (VP\_CONCAT\_LEFT or VP\_CONCAT\_RIGHT).

- VP\_IMAGE\_WIDTH

  Get the width (in pixels) of the output image array.

- VP\_IMAGE\_HEIGHT

  Get the height (in pixels) of the output image array.

- VP\_IMAGE\_SCAN\_SIZE

  Get the number bytes per scanline in the output image array.

- VP\_VIEW\_AXIS

  Get the identifier for the current major viewing axis in the object coordinate system (VP\_X\_AXIS, VP\_Y\_AXIS or VP\_Z\_AXIS).  The axis depends on the viewing transformation.

- VP\_INTERMEDIATE\_WIDTH

  Get the width (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)).

- VP\_INTERMEDIATE\_HEIGHT

  Get the height (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)).

- VP\_INTERMEDIATE\_COLOR

  Get the number of color channels in the intermediate image (see vpRenderRawVolume(3)).

- VP\_INT\_WIDTH\_HINT

  Get the current hint for the width (in pixels) of the intermediate image (see vpRenderRawVolume(3)).

- VP\_INT\_HEIGHT\_HINT

  Get the current hint for the height (in pixels) of the intermediate image (see vpRenderRawVolume(3)).

- VP\_VIEW\_X\_AXIS

  - VP\_VIEW\_Y\_AXIS

  - VP\_VIEW\_Z\_AXIS

  The retrieved value is non-zero if computing a preclassified volume for the corresponding major viewing axis is enabled (see vpClassifyVolume(3)).

- VP\_VIEW\_X\_SIZE

  - VP\_VIEW\_Y\_SIZE

  - VP\_VIEW\_Z\_SIZE

  Get the size (in bytes) of the preclassified volume for the corresponding major viewing axis.

- VP\_MMOCTREE\_THRESHOLDS

  Get the current min-max octree range thresholds.  *iptr* must point to an array of integers containing one entry for each threshold (use VP\_CLASSIFY\_FIELD\_COUNT to determine the number of thresholds, which equals the number of arguments to the opacity transfer function).

- VP\_MMOCTREE\_SIZE

  Get the size (in bytes) of the min-max octree.

- VP\_SHADOW

  The retrieved value is nonzero if shadows are enabled (see vpSetShadowLookupShader(3)).

- VP\_SHADOW\_LIGHT

  Get the constant (e.g. VP\_LIGHT0) associated with the current shadow light (see vpSetShadowLookupShader(3)).

- VP\_SHADOW\_WIDTH\_HINT

  Get the current hint for the width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).

- VP\_SHADOW\_HEIGHT\_HINT

  Get the current hint for the height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).

- VP\_SHADOW\_COLOR\_SIZE

  Get the size of the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)).

- VP\_SHADOW\_BIAS

  Get the current shadow bias value (see vpSetShadowLookupShader(3)).

- VP\_PIXEL\_TYPE

  Get the current image pixel type (see vpSetImage(3)).

- VP\_CLAMP\_SHADE\_TABLE

  The retrieved value is nonzero if clamping is enabled for shade table entries, or 0 if it is disabled (see vpShadeTable(3)).

- VP\_COMPOSITE\_ORDER

  This value is used for debugging only.  It returns 1 if the current major viewing axis (VP\_VIEW\_AXIS) points in the same direction as the viewing direction, or -1 if they point in opposite directions.

The following list summarizes the double-valued options that can be retrieved with **vpGetd**.  The result is always a single double and *dptr* should point to a single double location.

- VP\_MIN\_VOXEL\_OPACITY

  Get the minimum opacity threshold (see vpSeti(3)).

- VP\_DEPTH\_CUE\_FRONT

  Get the front depth cueing factor (see vpSetDepthCueing(3)).

- VP\_DEPTH\_CUE\_DENSITY

  Get the depth cueing density (see vpSetDepthCueing(3)).

- VP\_DEPTH\_CUE\_QUANTIZATION

  Get the depth cueing quantization (see vpSetDepthCueing(3)).

- VP\_MAX\_RAY\_OPACITY

  Get the maximum opacity threshold (see vpSeti(3)).

The following list summarizes the pointer-valued options that can be retrieved with **vpGetp**.  Unless otherwise noted, the result is a single pointer and *pptr* should point to a single pointer location.

- VP\_VOXEL\_DATA

  Get a pointer to the 3D voxel array.

- VP\_CLASSIFY\_TABLES

  Get pointers to each of the lookup tables for the opacity transfer function.  *pptr* must point to an array of pointers containing one entry for each table (use VP\_CLASSIFY\_FIELD\_COUNT to determine the number of tables, which is equal to the number of arguments to the opacity transfer function).

- VP\_SHADE\_FUNC

  Get the shading callback function (see vpSetLookupShader(3)).

- VP\_SHADE\_COLOR\_TABLE

  Get a pointer to the shading lookup table for colors (see vpSetLookupShader(3)).

- VP\_SHADE\_WEIGHT\_TABLE

  Get a pointer to the shading lookup table for weights (see vpSetLookupShader(3)).

- VP\_IMAGE

  Get a pointer to the output image array (see vpSetImage(3)).

- VP\_LOG\_ALLOC\_FUNC

  Get a pointer to the memory allocator logging function (see vpSetCallback(3)).

- VP\_LOG\_FREE\_FUNC

  Get a pointer to the memory deallocator logging function (see vpSetCallback(3)).

- VP\_STATUS\_FUNC

  Get a pointer to the status reporting function (see vpSetCallback(3)).

- VP\_READ\_FUNC

  Get a pointer to the file I/O read function (see vpSetCallback(3)).

- VP\_WRITE\_FUNC

  Get a pointer to the file I/O write function (see vpSetCallback(3)).

- VP\_MMAP\_FUNC

  Get a pointer to the file I/O memory mapping function (see vpSetCallback(3)).

- VP\_CLIENT\_DATA

  Get a pointer to the client data (see vpSetClientData(3)).

- VP\_SHADOW\_COLOR\_TABLE

  Get a pointer to the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)).

## ERRORS

The normal return value is VP\_OK.  The following error return values are possible:

- VPERROR\_BAD\_OPTION

  The *option* argument is invalid.

- VPERROR\_SINGULAR

  One of the current view transformation matrices is singular.  (Only possible for options that depend on the current view transformation).

## SEE ALSO

[VolPack(3)](/VolPack/3.md), vpCreateContext(3), vpSeti(3)
