Demonstrates how to compose multichannel dataset with VolumeViz.
DESCRIPTION
Many volumetric datasets in medical and scientific applications have multichannel information. There may be 2, 3 or more channels in the dataset and each channel is (typically) stored as a separate volume. Rendering must combine some or all of the channels into a single image. VolumeViz can easily handle this because of the builtin support for combining multiple volumes using a fragment shader program.
DATASET
The test data was created by segmenting the tiny synthetic data set SYN_64.vol into 3 channels containing respectively the base, vertical arm and horizontal arm of the "object" (see images below). Every combination of the three channels is visible in the resulting rendering. This example only shows volume rendering and assumes 3 channels of data. To do slice rendering and/or handle a different number of channels requires a slightly different shader program and corresponding different setup of the shader parameters. Also note that this example completely replaces the default VolumeViz fragment shader main program (to keep things as simple as possible). As a result it does not support VolumeViz advanced rendering options such as jittering, edge color and boundary opacity. To support these features, use the VolumeViz shader library and override the appropriate sub-function.
FILES:
-
VolumeViz/multiChannel/Multichannel_ex1.cxx
SEE ALSO
SoVolumeData, SoMultiDataSeparator, SoVolumeRender, SoVolumeShader, SoDataRange, SoTransferFunction
SCREENSHOT:
A 3 channels data set derived from the classic SYN_64.vol. The channels are colored red, green and blue. Other colors result where the channels overlap.