Giga Voxel Renderer¶
Introduction¶
The GVR ( Giga Voxel Renderer ) is an octree-based volume render that allows high-quality volume rendering of 3D/4D images. It is driven by the main SoGVRVolumeRenderer
. It is complemented with a set of extension modules that allows for customizing the rendering (See Extensions for details).
Features¶
- Multi-resolution capabilities by decomposing the images into octrees
- Large image support, e.g., 512x512x2000 CT slices (12-bit)
- Time-dependent data support and cine-animation mode
- Octree cache file support for very fast low-resolution previews
- MIP, direct rendering (8-, 12-, 16-bit data support)
- Interactive hardware texture lookup table (12-bit via fragment shader)
- Interactive RGBA LUT editor + presets
- Shading * Blinn-Phong lighting (three directional colored lights) * Tone shading * Boundary enhancement * Silhouette enhancement
- High quality gradients with Sobel3D gradient estimator
- Tag Volume support (8-bit tag data)
- 2D lookup table (LUT per tag ID)
- 3D lookup table (LUT per tag ID + gradient strength)
- Per-tag shaders (multiple render modes in the same volume for different tags)
- Mask volume (binary or 8-bit mask) with very fast update and arbitrary resolution
- Sub/Oversampling via higher sampling rates
- Empty space skipping via binary histograms
- Picking (MIP, alpha threshold)
- ROI selection
- OpenGL clip planes are supported
- Intermixing with triangle geometry (non-transparent/transparent via
SoGVRDepthPeel
only) - Slab rendering via
SoView2D
andSoView2DScene
; seeSoGVRSlabHint
for an example network - Extensible GLSL shader pipeline; see
SoGVRShaderFunction
. - Cooperation with the Open Inventor shader framework, using, e.g.,
SoShaderParameter3f
,SoMLSampler3D
in the shader functions - Both slicing and ray casting are available; see
SoGVRRayCastSettings
for details on the ray caster - First hit ray casting; see
SoGVRFirstHitRayCastSettings
Hardware requirements¶
The GVR requires OpenGL 2.0 hardware and drivers, and 3D texture support for high quality slicer and ray caster rendering. It utilizes GLSL shaders.
On older hardware, the GVR reverts to a legacy mode compatible with OpenGL 1.2 and requires only 3D texture support. This mode supports direct volume rendering of a single intensity volume exclusively.
Recommended hardware¶
We recommend a current OpenGL graphics board from either AMD or Nvidia.
Rendering via the Windows Remote Desktop will not work, since it does not support 3D textures.
Extensions¶
After the basic features of the GVR are described, you may wonder how to access all the features listed above. The key to this lies in the SoGVR extensions, which can be placed “in front” of a SoGVRVolumeRenderer
module to add additional volumes and modify its settings. The SoGVRVolumeRenderer
collects all extensions (modules starting with SoGVR, derived from SoGVRExtension) during rendering and applies their settings to its internal state (from left to right). This even allows the same SoGVRVolumeRenderer
module to be shared across multiple instances of the SoExaminerViewer
with individual extension modules placed in front of it (e.g., different shader settings or ROIs).
Basic settings extensions¶
The settings extensions allow overwriting the settings of the SoGVRVolumeRenderer
, e.g., when the same renderer is used in different viewers with different modes.
SoGVRQualitySettings
- sets the quality settings of the GVRSoGVRIlluminationSettings
- sets the settings for the “Illuminated” rendermodeSoGVRSubVolumeSettings
- sets the ROI of the GVRSoGVRIncrementalUpdater
- allows for performing incremental updates of the sameSoGVRVolumeRenderer
in multiple viewers, which would otherwise cause a busy loop; see the example of theSoGVRIncrementalUpdater
Render mode extensions¶
The following extensions switch to different render modes.
SoGVRRayCastSettings
- enables the GVR ray caster (instead of the default slicer)SoGVRFirstHitRayCastSettings
- enables a first hit ray caster (for isosurface rendering, especially useful for endoscopic rendering)SoGVRFirstHitAmbientOcclusion
- enables ambient occlusion for the first hit ray casterSoGVRMeanIPMode
- enables a special MeanIP mode for the slicerSoGVRDrawOnPlane
- allows for drawing onto arbitrary planesSoGVRDepthPeel
- allows for mixing transparent geometry rendered onto arbitrary planes
Tagged volume extensions¶
SoGVRTagVolume
- sets a tag volume and allows tagged volume rendering together with a 2D lookup tableSoGVRTagObjectStyle
- allows for enabling per-tag shading
User supplied gradients¶
SoGVRGradientVolume
- sets a tag volume and allows tagged volume rendering together with a 2D lookup table
Mask volume extensions¶
SoGVRMaskVolume
- sets a mask volume that allows masking of regions of the original volumeSoGVRMaskSettings
- allows for overwriting the settings of theSoGVRMaskVolume
; make sure to place it behind to mask volume
Secondary volume extensions¶
SoGVRSecondaryVolume
- sets an additional octree volumeSoGVRSecondaryVolumeSettings
- allows for overwriting the settings of theSoGVRSecondaryVolume
; make sure to place it behind the secondary volume
Transformed volume extensions¶
SoGVRTransformedVolume
- sets an additional 3D volume of arbitrary orientationSoGVRTransformedVolumeSettings
- allows for overwriting the settings of theSoGVRTransformedVolume
; make sure to place it behind the transformed volume
Secondary LUT extension:¶
SoGVRSecondaryLUT
- sets an additional LUT that can be used from the SoGVRSecondaryVolume/Transformed volume or in custom shaders
Misc extensions:¶
SoGVRPickResult
- allows for accessing detailed picking results as base object and curve lists
Debugging extensions¶
SoGVRDebug
- a debugging module that allows for changing various internal settings of the renderer; make sure you do not use that module for production code: it is only for testing purposes and might change heavily over timeSoGVRDiagnosis
- a diagnosis module that provides various information strings about the current rendering state; only useful for debugging purposesSoGVRShaderDiagnosis
- a diagnosis module that shows the internal shaders and logsSoGVROptimizations
- a module that allows for changing the optimization settings of the renderer for debugging or custom shaders
Octree generation/loading¶
The SoGVRVolumeRenderer
, SoGVRTagVolume
, and SoGVRGradientVolume
all can load their image data from a so-called GVRVolume base object. These GVRVolume objects can be created in-memory or written to disk and loaded with the GVRVolumeLoad
module.
Available modules are:
GVRVolumeLoad
- loads a GVRVolume from diskGVRVolumeSave
- saves an ML image to disk to be loaded withGVRVolumeLoad
GVRVolumeToImage
- extracts in-plane slices from a GVRVolumeGVRImageToVolume
- creates a GVRVolume in-memoryGVRCacheInfo
- supplies memory and texture cache limits
Custom GLSL shader programming¶
The GVR supports custom extension of its GLSL shader pipeline by adding/removing/replacing parts of the shader pipeline using the following modules:
SoGVRShaderFunction
- allows for adding/removing/replacing a step in the shader pipelineSoGVRShaderInclude
- allows for adding GLSL functions and defines to the shader pipeline
The SoGVRShaderDiagnosis
module is useful to debug while developing the shader.
Do not forget to add the diagnosis module to the scene graph. The diagnosis module only shows up-to-date information when it is part of a scene that is viewed in a viewer.
In addition to the built-in uniforms and the pipeline state struct, you may add additional uniforms and texture samplers. This is done via the GLSL shader framework of MeVisLab:
SoMLSampler1D
- adds a 1D samplerSoMLSampler2D
- adds a 2D samplerSoMLSampler3D
- adds a 3D samplerSoMLSampler3D
- adds a 3D samplerSoShaderParameter1f
- adds a float uniformSoShaderParameter2f
- adds a vec2 uniformSoShaderParameter3f
- adds a vec3 uniformSoShaderParameter4f
- adds a vec4 uniform- … (see documentation of the shader framework)
In addition to that, there are:
SoGVRShaderParameterPosition
- adds a vec3 position transformed to various coordinate systemsSoGVRShaderParameterDirection
- adds a vec3 direction transformed to various coordinate systemsSoGVRShaderParameterPlane
- adds a vec4 plane transformed to various coordinate systems