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 allow to customize the rendering (See Extensions for details).
Features¶
- Multi-Resolution capabilities by decomposing the images into octrees
- Large image support, e.g. 512x512x2000 CT slices (12bit)
- Time depend data support and cine-animation mode
- Octree cache file support for very fast low-res previews
- MIP, Direct Rendering (8/12/16 bit data support)
- Interactive hardware texture lookuptable (12bit, via fragment shader)
- Interactive RGBA LUT editor + presets
- Shading * Blinn-Phong Lighting (3 directional colored lights) * Tone shading * Boundary enhancement * Silhouette enhancement
- High quality gradients with Sobel3D gradient estimator
- Tag Volume support (8 Bit tag data)
- 2D Lookuptable (LUT per tag-id)
- 3D Lookuptable (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 ClipPlanes 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 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/drivers and 3D texture support for high quality Slicer and RayCaster rendering and makes use of GLSL shaders.
On older hardware, the GVR falls back to a legacy mode that works on OpenGL 1.2 and requires only 3D texture support. This mode only supports direct volume rendering of a single intensity volume.
Recommended hardware¶
We recommend a current OpenGL graphics board from either ATI or NVidia. At the time of writing this document, we would suggest one of the following boards:
- NVidia 9800 and better
- ATI Radeon X800, X1800 and better
We discourage using boards from other manufactures and older graphics cards because the above cards are not very expensive and will give you much better performance than less recent cards.
Rendering via the Windows Remote Desktop will not work, since it does not support 3D textures.
Extensions¶
After the basic features of the GVR have been described, you will ask yourself how you can access all the features from the above feature list. The key to this are the SoGVR extensions which can be placed “in-front” of a SoGVRVolumeRenderer
module to add additional volumes and to modify its settings. The SoGVRVolumeRenderer collects all extensions (modules starting with SoGVR, derived from SoGVRExtension) when rendering and applies their settings to its internal state (from left-to-right). This even allows to share the same SoGVRVolumeRenderer module in multiple SoExaminerViewers with individual extension modules placed in front of it (e.g. different shader settings or ROI).
Basic settings extensions¶
The settings extensions allow to overwrite the settings of the SoGVRVolumeRenderer, e.g. when the same render should be used in different viewers with different modes.
SoGVRQualitySettings
- set the quality settings of the GVRSoGVRIlluminationSettings
- set the settings for the “Illuminated” rendermodeSoGVRSubVolumeSettings
- sets the ROI of the GVRSoGVRIncrementalUpdater
- allows to have incremental updates of the same SoGVRVolumeRenderer in multiple viewers, which would cause a busy loop otherwise, see the example of the SoGVRIncrementalUpdater.
Rendermode 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 RayCaster (for iso surface rendering, especially useful for endoscopic rendering)SoGVRFirstHitAmbientOcclusion
- enables ambient occlusion for the first hit raycasterSoGVRMeanIPMode
- enables a special MeanIP mode for the slicerSoGVRDrawOnPlane
- allows to draw onto arbitrary planes.SoGVRDepthPeel
- allows to mix transparent geometry draw onto arbitrary planes.
Tagged Volume extensions¶
SoGVRTagVolume
- sets a tag volume and allows tagged volume rendering together with a 2D LookuptableSoGVRTagObjectStyle
- allows to enable per-tag shading
User supplied gradients¶
SoGVRGradientVolume
- sets a tag volume and allows tagged volume rendering together with a 2D Lookuptable
Mask Volume extensions¶
SoGVRMaskVolume
- sets a mask volume that allows masking of regions of the original volumeSoGVRMaskSettings
- allows to overwrite the settings of the SoGVRMaskVolume, make sure to place it behind to mask volume
Secondary Volume extensions¶
SoGVRSecondaryVolume
- sets an additional octree volumeSoGVRSecondaryVolumeSettings
- allows to overwrite the settings of the SoGVRSecondaryVolume, make sure to place it behind the secondary volume
Transformed Volume extensions¶
SoGVRTransformedVolume
- sets an additional 3D volume of arbitrary orientationSoGVRTransformedVolumeSettings
- allows to overwrite the settings of the SoGVRTransformedVolume, make sure to place it behind the transformed volume
Secondary LUT extension:¶
SoGVRSecondaryLUT
- sets an additional LUT which can be used from the SoGVRSecondaryVolume/Transformed volume or in custom shaders
Misc extensions:¶
SoGVRPickResult
- allows to access detailed picking results as base object and curve lists
Debugging extensions¶
Beware, they may change dramatically over time!
SoGVRDebug
- a debugging module that allows to change 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 gives various information strings on the current rendering state, only useful for debugging purposesSoGVRShaderDiagnosis
- a diagnosis module that shows the internal shaders and logsSoGVROptimizations
- a module that allows to change the optimization settings of the renderer for renderer debugging or custom shaders
Octree generation/loading¶
The SoGVRVolumeRenderer, SoGVRTagVolume and SoGVRGradientVolume all have the possibility to 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
- load a GVRVolume from diskGVRVolumeSave
- save an ML image to disk to be loaded with GVRVolumeLoadGVRVolumeToImage
- used to extract in-plane slices from a GVRVolumeGVRImageToVolume
- used to create a GVRVolume in-memoryGVRCacheInfo
- used to supply 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 to add/remove/replace a step in the shader pipelineSoGVRShaderInclude
- allows to add additional GLSL functions and defines to the shader pipeline
The SoGVRShaderDiagnosis
module is very useful to debug while doing the shader development.
Don’t 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