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

# Set(3)

set the value of an option

## NAME

vpSeti, vpSetd - set the value of an option

## SYNOPSIS

\#include \<volpack.h\>

vpResult

**vpSeti(***vpc, option, value***)**

-

  vpContext \**vpc;*

-

  int *option;*

-

  int *value;*

vpResult

**vpSetd(***vpc, option, value***)**

-

  vpContext \**vpc;*

-

  int *option;*

-

  double *value;*

## ARGUMENTS

- *vpc*

  VolPack context from **vpCreateContext.**

- *option*

  Constant that specifies the option to be set.

- *value*

  New value for the option.

## DESCRIPTION

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**:

- VP\_CONCAT\_MODE

  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.

- VP\_DEPTH\_CUE\_SIZE\_HINT

  Set the suggested number of entries in the depth cueing lookup table. See vpSetDepthCueing(3).  Default: none

- VP\_INT\_WIDTH\_HINT

  Set the suggested width (in pixels) of the intermediate image work buffer.  See vpRenderRawVolume(3).  Default: none

- VP\_INT\_HEIGHT\_HINT

  Set the suggested height (in pixels) of the intermediate image work buffer.  See vpRenderRawVolume(3).  Default: none

- VP\_SHADOW\_LIGHT

  Get the current shadow light (see vpSetShadowLookupShader(3)). Legal values are VP\_LIGHT0, VP\_LIGHT1, ..., VP\_LIGHT5.  Default: VP\_LIGHT0

- VP\_SHADOW\_WIDTH\_HINT

  Set the suggested width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).  Default: none

- VP\_SHADOW\_HEIGHT\_HINT

  Set the suggested height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).  Default: none

- VP\_SHADOW\_BIAS

  Set the current shadow bias value (see vpSetShadowLookupShader(3)). The value is an integral distance in units of voxels.  Default: 4

- VP\_AXIS\_OVERRIDE

  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.

- VP\_TRACE\_SHADOW\_K

  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**:

- VP\_DEPTH\_CUE\_QUANTIZATION

  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

- VP\_MAX\_RAY\_OPACITY

  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

- VP\_MIN\_VOXEL\_OPACITY

  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

## ERRORS

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

- VPERROR\_BAD\_OPTION

  The *option* argument is invalid.

- VPERROR\_BAD\_VALUE

  The *value* argument is invalid or out of range.

## SEE ALSO

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