Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoDataRange

The SoDataRange node specifies the range of data values that should be mapped into the current color map (SoTransferFunction) using the min and max fields. It is ignored for RGBA volumes. For most scalar valued volumes SoDataRange has two important uses. First it is usually necessary to specify the actual range of data values in the volume and second it can be useful to specify a different range of data values in order to adjust the brightness and contrast. The data range affects the rendering of all volume primitives.

Actual data range:

By default VolumeViz maps the entire range of the voxel's data type (e.g. 0..65535 for unsigned short values) into the colormap. This may be correct for byte (8 bit) valued voxels, but is seldom correct for 16 bit or larger voxels and never correct for floating point voxels. If the volume has a relatively small range of values relative to the data type, the default mapping will usually produce an image with very little detail visible. Remember that the actual range of data values, as well as the volume data type and other information can be queried using the SoVolumeData methods described in VolumeViz Features.

Brightness and contrast:

Usually the distribution of values within the actual data range is not uniform and more details can be seen by adjusting the SoDataRange values to increate brightness and/or contrast. This is particularly true when using a gray scale color map (called INTENSITY in SoTransferFunction). In medical imaging this range setting is often called the window center and window width. The window center is the image intensity that will be displayed as a medium-gray and the window width is the range of data values between bright white and full black. Our example data volume contains byte data with a native range of 0 to 255. In the image on the left the default data range is used, so effectively the window center and width are 128 and 256. In the image on the right we’ve changed the window center and width to 65 and 90 to increase the contrast. We did that by setting the data range to 20..110.

/width_of_65/90_

Default data range compared to window center/width of 65/90.

When using multiple volumes, a single SoDataRange node can be used to specify the data range for all volumes or each volume can have its own independent data range. In the second case create one SoDataRange node for each volume and set each node’s dataRangeId equal to the SoDataSet::dataSetId of the corresponding volume.

Changing the data range may require VolumeViz to recreate the data textures on the GPU. This is necessary to maximize use of the available bits of precision on the GPU. This operation could be slow for a large data set.