Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoVolumeRenderingQuality Class Reference

VolumeViz Volume rendering quality property mode More...

#include <VolumeViz/nodes/SoVolumeRenderingQuality.h>

+ Inheritance diagram for SoVolumeRenderingQuality:

Public Types

enum  GradientQuality {
  LOW = 0 ,
  MEDIUM ,
  HIGH
}
 Gradient Quality mode. More...
 
enum  EdgeDetect2DMethod {
  LUMINANCE = 1 ,
  DEPTH = 1 << 1 ,
  GRADIENT = 1 << 2
}
 The edge detection algorithm used when edgeDetect2D is TRUE, can work on the image luminance, depth buffer and/or gradient. More...
 
- Public Types inherited from SoVolumeShader
enum  ShaderPosition {
  GEOMETRY_MAIN =0 ,
  DATA_COMBINE_FUNCTION ,
  GET_DATA_FUNCTION ,
  FRAGMENT_COMPUTE_COLOR ,
  VERTEX_MAIN ,
  FRAGMENT_MAIN ,
  VERTEX_POSTPROCESSING ,
  CLIPPING_FUNCTION ,
  TESS_VERTEX_SHIFT ,
  CUSTOM_SHADER = 64
}
 Specifies the position of the shader pipeline stages in the field shaderObject. More...
 
- Public Types inherited from SoShaderProgram
enum  GeometryInputType {
  POINTS_INPUT = GL_POINTS ,
  LINES_INPUT = GL_LINES ,
  TRIANGLES_INPUT = GL_TRIANGLES
}
 Geometry input type. More...
 
enum  GeometryOutputType {
  POINTS_OUTPUT = GL_POINTS ,
  LINE_STRIP_OUTPUT = GL_LINE_STRIP ,
  TRIANGLE_STRIP_OUTPUT = GL_TRIANGLE_STRIP
}
 Geometry ouput type. More...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoVolumeRenderingQuality ()
 Constructor.
 
- Public Member Functions inherited from SoVolumeShader
 SoVolumeShader ()
 Constructor.
 
virtual SoFragmentShadersetFragmentShader (int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
 Creates a fragment shader with the given filename and add it at the given pos.
 
virtual SoVertexShadersetVertexShader (int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
 Creates a vertex shader with the given filename and adds it at the given pos.
 
- Public Member Functions inherited from SoShaderProgram
 SoShaderProgram ()
 Constructor.
 
SoFragmentShadergetFragmentShader (int pos) const
 Returns the fragment shader at the specified position.
 
SoVertexShadergetVertexShader (int pos) const
 Returns the vertex shader at the specified position.
 
SoGeometryShadergetGeometryShader (int pos) const
 Returns the geometry shader at the specified position.
 
virtual SoGeometryShadersetGeometryShader (int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
 Convenience method to create a geometry shader with the specified filename and add it at the specified position.
 
virtual SoComputeShadersetComputeShader (int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
 Convenience method to create a compute shader with the specified filename and add it at the specified position.
 
SoTessellationControlShadergetTessellationControlShader (int pos) const
 Returns the tessellation control shader at the specified position.
 
SoTessellationEvaluationShadergetTessellationEvaluationShader (int pos) const
 Returns the tessellation evaluation shader at the specified position.
 
virtual SoTessellationControlShadersetTessellationControlShader (int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
 Convenience method to create a tessellation control shader with the specified filename and add it at the specified position.
 
virtual SoTessellationEvaluationShadersetTessellationEvaluationShader (int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
 Convenience method to create a tessellation evaluation shader with the specified filename and add it at the specified position.
 
SoShaderParameterImageaddShaderParameterImage (const SbString &name, SoTexture *tex)
 Convenience method to create an SoShaderParameterImage with the specified name and value and add it to this shader program.
 
- Public Member Functions inherited from SoNode
virtual void setOverride (const SbBool state)
 Turns the override flag on or off.
 
virtual SbBool isOverride () const
 Returns the state of the override flag.
 
virtual SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
 
virtual SbBool affectsState () const
 Returns TRUE if a node has an effect on the state during traversal.
 
virtual void touch ()
 Marks an instance as modified, simulating a change to it.
 
- Public Member Functions inherited from SoFieldContainer
void setToDefaults ()
 Sets all fields in this object to their default values.
 
SbBool hasDefaultValues () const
 Returns TRUE if all of the object's fields have their default values.
 
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
 Returns TRUE if this object's fields are exactly equal to fc's fields.
 
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
 Copies the contents of fc's fields into this object's fields.
 
SoNONUNICODE SbBool set (const char *fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
SbBool set (const SbString &fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
void get (SbString &fieldDataString)
 Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.
 
virtual int getFields (SoFieldList &list) const
 Appends references to all of this object's fields to resultList, and returns the number of fields appended.
 
virtual int getAllFields (SoFieldList &list) const
 Returns a list of fields, including the eventIn's and eventOut's.
 
virtual SoFieldgetField (const SbName &fieldName) const
 Returns a the field of this object whose name is fieldName.
 
virtual SoFieldgetEventIn (const SbName &fieldName) const
 Returns a the eventIn with the given name.
 
virtual SoFieldgetEventOut (const SbName &fieldName) const
 Returns the eventOut with the given name.
 
SbBool getFieldName (const SoField *field, SbName &fieldName) const
 Returns the name of the given field in the fieldName argument.
 
SbBool enableNotify (SbBool flag)
 Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).
 
SbBool isNotifyEnabled () const
 Notification is the process of telling interested objects that this object has changed.
 
virtual void setUserData (void *data)
 Sets application data.
 
void * getUserData (void) const
 Gets user application data.
 
- Public Member Functions inherited from SoBase
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
void setSynchronizable (const bool b)
 Sets this to be a ScaleViz synchronizable object.
 
bool isSynchronizable () const
 Gets the ScaleViz synchronizable state of this object.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoVolumeShader
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SbBool isSupported (SoState *state=NULL)
 Returns TRUE if SoVolumeShader is supported by the current graphics board.
 
- Static Public Member Functions inherited from SoShaderProgram
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static unsigned int getNumReservedTextures ()
 Returns the number of reserved texture units.
 
- Static Public Member Functions inherited from SoNode
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SoNodegetByName (const SbName &name)
 A node's name can be set using SoBase::setName().
 
static int getByName (const SbName &name, SoNodeList &list)
 A node's name can be set using SoBase::setName().
 
- Static Public Member Functions inherited from SoFieldContainer
static SoType getClassTypeId ()
 Returns the type of this class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Public Attributes

SoSFBool lighting
 Enable gradient based lighting (computed on the GPU).
 
SoSFBool preIntegrated
 Enable pre-integrated volume rendering.
 
SoSFBool jittering
 Enable jittering.
 
SoSFFloat gradientThreshold
 Ignore all gradients with a magnitude less than the specified threshold.
 
SoSFBool edgeColoring
 Enable edge coloring.
 
SoSFColor edgeColor
 Color used to draw edges when edgeColoring or edgeDetect2D is TRUE.
 
SoSFFloat edgeThreshold
 If this value is low, more edges will be detected.
 
SoSFBool boundaryOpacity
 Enable boundary opacity.
 
SoSFFloat boundaryOpacityIntensity
 Applies when boundaryOpacity is TRUE.
 
SoSFFloat boundaryOpacityThreshold
 Applies when boundaryOpacity is TRUE.
 
SoSFBool edgeDetect2D
 Enable 2D edge detection.
 
SoSFFloat edgeDetect2DInnerThreshold
 Increase this value to decrease noise on silhouette edges.
 
SoSFFloat edgeDetect2DOuterThreshold
 Increase this value to decrease noise on edges in the volume.
 
SoSFBitMask edgeDetect2DMethod
 Method used for 2D edge detection.
 
SoSFEnum gradientQuality
 Specifies the algorithm used to compute gradients, for example, normals for lighting.
 
SoSFBool colorInterpolation
 Controls interpolation of data values used for color lookup.
 
SoSFFloat surfaceScalarExponent
 If this field is greater than or equal to 1, a surface with a small gradient will be less lighted than a surface with a high gradient.
 
SoSFFloat unnormalizedGradientExponent
 When unnormalizedGradientExponent is not 0, surfaces with high gradients will be more lighted than surfaces with small gradients.
 
SoSFBool segmentedInterpolation
 Allow correct interpolation when rendering segmented data.
 
SoSFFloat segmentedInterpolationThreshold
 Defines the iso distance used when segmentedInterpolation is true.
 
SoSFBool voxelizedRendering
 If true, SoVolumeRender displays voxels as individual cubes.
 
SoSFBool voxelOutline
 If true, draw the outline of voxels (default is false).
 
SoSFFloat voxelOutlineThreshold
 When voxelOutline is TRUE, this threshold specifies the minimum size of a voxel, in screen pixels, for the voxel outline to be visible.
 
SoSFFloat voxelOutlineWidth
 When voxelOutline is TRUE, this value specifies the voxel outline width in pixels.
 
SoSFColor voxelOutlineColor
 When voxelOutline is TRUE, this value specifies the voxel outline color.
 
SoSFBool ambientOcclusion
 If true, apply an ambient occlusion effect (default is FALSE).
 
SoSFBool deferredLighting
 Enable screen space lighting (computed on the GPU).
 
- Public Attributes inherited from SoVolumeShader
SoSFBool forVolumeOnly
 Set to TRUE if the shader should be called for volume rendering (SoVolumeRender).
 
SoSFBool interpolateOnMove
 When set to FALSE, interpolation between LDM tiles (across the tile boundary) is not done when rendering in interactive mode.
 
- Public Attributes inherited from SoShaderProgram
SoMFNode shaderObject
 Specifies the list of shader objects (i.e., vertex shaders, geometry and fragment shaders) which form the shader program.
 
SoSFEnum geometryInputType
 Specifies the input primitive type of the current geometry shader if any (not used otherwise).
 
SoSFEnum geometryOutputType
 Specifies the output primitive type of the current geometry shader if any (not used otherwise).
 
SoSFBool vertexProgramTwoSide
 If set to TRUE, vertex shaders will operate in two-sided color mode.
 
SoSFBool shadowShader
 Only used when an SoShadowGroup is active.
 
SoSFInt32 maxGeometryOutputVertices
 Set the maximum number of vertices the geometry shader will emit in one invocation.
 
SoSFBool generateTransparency
 If set to TRUE, then shapes affected by this shader will be considered transparent.
 
SoSFInt32 patchLength
 Set the length of the fixed-size collection of vertices used by tessellation shaders.
 
SoMFNode bufferObjects
 Specifies a list of SoShaderParameterBufferObject to use with this shader.
 
SoMFNode images
 Specifies a list of SoShaderParameterImage nodes to use with this shader.
 

Deprecated

enum  LightingModel {
  OIV6 ,
  OPENGL
}
 Available Lighting Model mode. More...
 
SoDEPRECATED SoSFBool cubicInterpolation
 Enable cubic interpolation of data values.
 
SoDEPRECATED SoSFEnum lightingModel
 Sets the lighting model.
 

Detailed Description

VolumeViz Volume rendering quality property mode

This property node causes subsequent SoVolumeRender nodes to be drawn with different rendering effects and/or levels of quality.

NOTES

  • Only one (or none) of the following nodes can be active at a time: SoVolumeShader or SoVolumeRenderingQuality. However since Open Inventor 7.1, both SoVolumeRenderingQuality and SoVolumeIsosurface may applied to the same SoVolumeRender node.
  • If the application simply needs to replace one or more of the VolumeViz shader rendering functions with a customized shader, you can use either SoVolumeShader or SoVolumeRenderingQuality. However if the application needs the advanced rendering features of SoVolumeRenderingQuality, e.g. lighting, in addition to the customized behavior, then you should use this node (which is derived from SoVolumeShader). Using the shader rendering framework is explained on the SoVolumeShader page.
  • The SoVolumeRenderingQuality node must be before the SoVolumeRender and after the SoTransferFunction.
  • This is a shader node!
    The effect will usually be undesirable if it is applied to standard geometry (polygons, lines, etc). Therefore applications should generally keep the volume visualization nodes and standard geometry nodes separate in the scene graph (i.e. under different SoSeparator nodes).
  • Please read the comments for each field.
    Some options only apply to gradient lighting and have no effect on deferred lighting.

Pre-integrated and lighted rendering

Various enhanced rendering modes for volume rendering are available:

  • Pre-integrated volume rendering
  • Lighted volume rendering

The pre-integrated mode (preIntegrated field) generally provides higher image quality for the same number of slices. Most applications should enable this field. However, note that pre-integration integrates between color map values. For typical scalar data containing sampled values, this provides a beneficial smoothing. It is especially useful when the color changes sharply between adjacent color map entries. However, when the color changes sharply between adjacent voxels, it can can cause values that are not actually in the original data to be displayed. This is undesirable for some data, for example "label" volumes resulting from segmentation. Pre-integration is not recommended for such data.

Also note:

When lighting is enabled for volume rendering, VolumeViz applies the same lighting equation used for polygonal geometry, including (optionally) specular highlights. The base voxel color comes from the SoTransferFunction node or (optionally) from a custom shader function provided by the application. This color is modified using the current material (SoMaterial), a vector simulating a "normal vector" and one or more directional light nodes (SoDirectionalLight) found in the scene graph. Voxels can also cast and receive shadows (see SoShadowGroup).

Limitation: Pre-integrated and lighted rendering are not supported if using custom fragment shaders and redefining FRAGMENT_COMPUTE_COLOR slot.

VolumeViz supports two lighting modes using either the lighting field or the deferredLighting field. In both cases lighting is computed on the GPU as part of the rendering process.

  • Gradient lighting
    The lighting field enables gradient based lighting, where the "normal vector" at each sample along the ray is a gradient vector computed from the data values in the volume. Gradient based lighting only supports a single light source and only the first light in the scene graph (typically the viewer's "headlight") is used. No other lights affect the volume in this case. The gradientQuality field controls the algorithm used to compute gradient vectors. Several other fields affect the gradient computation including gradientThreshold, surfaceScalarExponent and unnormalizedGradientExponent. Setting surfaceScalarExponent to a small value, for example 2.0, is recommended.
  • Deferred lighting
    The deferredLighting field enables screen space lighting, where the "normal vector" is computed from the final image depth buffer. Deferred lighting is faster and supports multiple light sources, but works best when the transfer function makes each data value either opaque or transparent. Deferred lighting is not affected by gradient related fields.

Unlike other primitives (including other VolumeViz primitives), volume lighting is not affected by an SoLightModel node. Also unlike other primitives, if lighting is enabled and there are no light nodes in the scene graph, the voxel color is taken from the transfer function or custom shader function "as is" (other primitives would be black in this case).

Each light node's direction and intensity fields are used, but the color field is not currently used. The current SoMaterial specifies the ambient, specular, diffuse, and emissive color values for the lighting equation. Note that the default diffuse color is "light gray" (0.8), not full white. This allows specular lighting to push the color toward full white (as expected). If specular lighting is not desired, then changing this to full white (1.0) is recommended in order to see the true colors specified in the transfer function.

The following figures show the same volume data:

Default volume rendering Pre-integrated volume rendering Lighted pre-integrated volume rendering

Quality enhancement parameters

  • Jittering
    When jittering is set to true, a random offset is added to texture coordinates in order to decrease "ring" artifacts without the cost of drawing a higher number of slices. Note that this creates a "noisy" image. Instead we recommend setting the SoVolumeRender::samplingAlignment field to BOUNDARY_ALIGNED.

    No Jittering With Jittering

  • Gradient quality
    When gradient lighting (lighting field) is enabled, the gradientQuality field allows you to choose between various gradient computation techniques. The computational cost increases with the quality. Has no effect on deferred lighting.

    Low quality Medium quality High quality

  • Surface scalar
    When gradient lighting (lighting field) is enabled or edgeDetect2DMethod is GRADIENT, the surfaceScalarExponent field disables lighting (or edge detection) on uniform surfaces in order to avoid noise in these area. This field should not be mixed with unnormalizedGradientExponent. The default value is zero, but a small value, for example 2.0, is recommended. Has no effect on deferred lighting.

    Surface Scalar disabled Surface Scalar enabled

  • Unnormalized gradient
    When gradient lighting (lighting field) is enabled, if unnormalizedGradientExponent is not 0, voxels with small gradients will get more contribution from the ambient light than voxels with high gradients. It is similar to surfaceScalarExponent but uses the ambient light instead of the transfer function color for uniform surfaces. Has no effect on deferred lighting.
  • Gradient threshold
    When gradient lighting is enabled, gradients with a length less than gradientThreshold are ignored during the lighting computation. This avoids doing lighting on noise while still lighting important data. In the following screenshots, setting a threshold of 0.1 removed lighting on the noise surrounding the spheres. Has no effect on deferred lighting.

    With gradientThreshold set to 0 With gradientThreshold set to 0.1

Image enhancement parameters

Various image enhancement techniques are available in this node and in SoTransferFunction.

  • Ambient occlusion
    The ambientOcclusion field enables a rendering technique that simulates self-shadowing of the volume. In other words, the amount of ambient (global) light in the scene reaching each sample is reduced by neighboring voxels. This effect makes it much easier to see the relative depth of features in the volume. Generally we recommend using this effect rather than the following effects.

    Both lighting and/or shadow casting may also be enabled, but neither is required to use ambient occlusion. This effect works best when the volume data contains surfaces (region boundaries with relatively sharp gradients) or in voxelized rendering mode. In both cases it works best when voxels are either transparent or nearly opaque. If you use ambientOcclusion, you should set the SoVolumeRender::samplingAlignment field to BOUNDARY_ALIGNED to reduce "slicing" artifacts.

  • Boundary opacity
    boundaryOpacity increases opacity depending on the length of the gradient vector. Areas with large gradient changes will have their opacity increased according to the boundaryOpacityIntensity. Note that this option has a significant performance penalty.
  • Edge coloring
    When edgeColoring is on, the color of each voxel may be mixed with the edgeColor. Areas where the normal (computed from the gradient) is facing the camera will have an unmodified color, whereas areas where the normal is more perpendicular to the view direction will tend towards edgeColor.
  • Edge detection
    When edgeDetect2D is enabled, an image space filter is applied on the volume rendering image in order to detect edges, which will be highlighted. The results are affected by the edgeDetect2DInnerThreshold and edgeDetect2DOuterThreshold fields. The edgeDetect2DMethod bitmask allows to apply the edge detection on the image's luminance, depth and/or gradient. The gradient method may give noisy result, the surfaceScalarExponent may help to improve the result in this case. The gradient method has a significant performance penalty.

    The following table shows the available edge detection techniques (explanation of faux shading is in SoTransferFunction):

    No Edges Boundary Opacity Edge 2D

    Edge Coloring Faux Shading (see SoTransferFunction)

Because this node is derived from SoVolumeShader, IVVR_FIRST_RESERVED_TEXTURE_UNIT applies to it. See SoVolumeShader for more information.

Volume projection

Volume projection (SoProjection or derived classes) is incompatible with some options enabled by this node.

Do not enable the preIntegrated, jittering or edgeDetect2D fields when using projection.

FILE FORMAT/DEFAULT

    VolumeRenderingQuality {
    lighting FALSE
    preIntegrated TRUE
    jittering FALSE
    gradientThreshold 0.0001
    edgeColoring FALSE
    edgeColor (0, 0, 0)
    edgeThreshold 0.2
    boundaryOpacity FALSE
    boundaryOpacityIntensity 1.5
    boundaryOpacityThreshold 1.5
    edgeDetect2D FALSE
    edgeDetect2DInnerThreshold 0.1
    edgeDetect2DOuterThreshold 0.1
    edgeDetect2DMethod LUMINANCE
    gradientQuality MEDIUM
    colorInterpolation TRUE
    unnormalizedGradientExponent 0
    surfaceScalarExponent 5
    segmentedInterpolation FALSE
    segmentedInterpolationThreshold 0.5
    voxelizedRendering FALSE
    voxelOutline FALSE
    voxelOutlineThreshold 2.
    voxelOutlineWidth 2.
    voxelOutlineColor (0, 0, 0)
    ambientOcclusion FALSE
    deferredLighting TRUE
    interpolateOnMove TRUE
    }

ACTION BEHAVIOR

    SoGLRenderAction
    Sets volume rendering quality parameters in the traversal state.

SEE ALSO

SoVolumeRender, SoVolumeShader, SoVolumeIsosurface, SoTransferFunction

Definition at line 326 of file SoVolumeRenderingQuality.h.

Member Enumeration Documentation

◆ EdgeDetect2DMethod

The edge detection algorithm used when edgeDetect2D is TRUE, can work on the image luminance, depth buffer and/or gradient.

These enums can be combined in the field edgeDetect2DMethod.

Enumerator
LUMINANCE 

Edge detection will use the image's luminance.

This method has a very little impact on speed.

DEPTH 

Edge detection will use the image's depth buffer.

GRADIENT 

Edge detection will use the volume's gradient.

These gradients are affected by the surfaceScalarExponent fied. This method is the most computationally expensive.

Definition at line 364 of file SoVolumeRenderingQuality.h.

◆ GradientQuality

Gradient Quality mode.

Enumerator
LOW 

Use the forward difference technique to compute the gradient.

This is a fast technique but it gives a lower quality gradient.

MEDIUM 

Use the central difference technique to compute the gradient.

This is a compromise between quality and speed.

HIGH 

Use a Sobel filter to compute the gradient.

This gives hiqh quality gradients at the expense of speed.

Definition at line 332 of file SoVolumeRenderingQuality.h.

◆ LightingModel

Available Lighting Model mode.

Enumerator
OIV6 
OPENGL 

Definition at line 757 of file SoVolumeRenderingQuality.h.

Constructor & Destructor Documentation

◆ SoVolumeRenderingQuality()

SoVolumeRenderingQuality::SoVolumeRenderingQuality ( )

Constructor.

Member Function Documentation

◆ getClassTypeId()

static SoType SoVolumeRenderingQuality::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getTypeId()

virtual SoType SoVolumeRenderingQuality::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoVolumeShader.

Member Data Documentation

◆ ambientOcclusion

SoSFBool SoVolumeRenderingQuality::ambientOcclusion

If true, apply an ambient occlusion effect (default is FALSE).

Ambient occlusion is an shading effect that approximates attenuation of light due to neighboring voxels. It works best when the volume data contains surfaces (region boundaries with relatively sharp gradients), or in voxelized rendering mode, and those voxels are opaque.

If you use ambientOcclusion, you should set the SoVolumeRender::samplingAlignment field to BOUNDARY_ALIGNED to reduce "slicing" artifacts.

Notes:

  • This effect is only applied on voxels that are considered to be "solid" (non-transparent).
    The "solid" transparency threshold is controlled by the value of SoVolumeRender::opacityThreshold.

NOTE: field available since Open Inventor 9.1

Definition at line 694 of file SoVolumeRenderingQuality.h.

◆ boundaryOpacity

SoSFBool SoVolumeRenderingQuality::boundaryOpacity

Enable boundary opacity.


If TRUE, increases boundary opacity based on the gradient magnitude. Default is FALSE.

This effect has a significant performance penalty.

SoVolumeRender::subdivideTile will be disabled if set to TRUE.
NOTE: field available since Open Inventor 7.0

Definition at line 498 of file SoVolumeRenderingQuality.h.

◆ boundaryOpacityIntensity

SoSFFloat SoVolumeRenderingQuality::boundaryOpacityIntensity

Applies when boundaryOpacity is TRUE.

If > 1, this increases the boundary opacity globally. If < 1, decreases it. Default is 1.5.
NOTE: field available since Open Inventor 7.0

Definition at line 506 of file SoVolumeRenderingQuality.h.

◆ boundaryOpacityThreshold

SoSFFloat SoVolumeRenderingQuality::boundaryOpacityThreshold

Applies when boundaryOpacity is TRUE.

If this value is low (near 0), only regions with a high gradient will be enhanced. Default is 1.5.
NOTE: field available since Open Inventor 7.0

Definition at line 515 of file SoVolumeRenderingQuality.h.

◆ colorInterpolation

SoSFBool SoVolumeRenderingQuality::colorInterpolation

Controls interpolation of data values used for color lookup.


If FALSE, interpolation is not done on data values used to access the colormap but is still done when computing gradient for lighting. This may be used to render a segmented dataset where interpolation is not appropriate. Default is TRUE. Only affects gradient based lighting (lighting field).

Generally it's better to set the SoVolumeRender::interpolation field to NEAREST, unless you really want to use gradient based lighting.

NOTE: field available since Open Inventor 7.2

Definition at line 579 of file SoVolumeRenderingQuality.h.

◆ cubicInterpolation

SoDEPRECATED SoSFBool SoVolumeRenderingQuality::cubicInterpolation

Enable cubic interpolation of data values.


Warning
Heavy GPU usage. Primarily useful for still image rendering. Default is FALSE.
NOTE: field available since Open Inventor 7.0

Definition at line 750 of file SoVolumeRenderingQuality.h.

◆ deferredLighting

SoSFBool SoVolumeRenderingQuality::deferredLighting

Enable screen space lighting (computed on the GPU).

Default is TRUE. Deferred lighting is computed based on the final image depth buffer instead using the data gradients. It is much faster than gradient based lighting (see the lighting field) and supports multiple light sources (up to 8). Because it is not based on data gradients, it does not have problems with small/random gradients and it gives a much better result when using clipping nodes like SoVolumeClippingGroup or SoUniformGridClipping. Light sources are defined by Open Inventor SoDirectionalLight nodes.

Notes:

  • Since Open Inventor 9.3, deferred lighting supports up to 8 light sources.
  • Both deferred lighting and gradient lighting may be enabled at the same time, but the intent is that the application should use one or the other.
  • Gradient related fields, e.g. surfaceScalarExponent, have no effect on deferred lighting.
  • In any case, do not use the SoVolumeRender::lighting field.
  • The lighting model used by deferred lighting is the Phong reflection model. Its parameters are defined by the current SoMaterial on state.
  • This effect is only applied on voxels that are considered to be "solid" (non-transparent).
    The "solid" transparency threshold is controlled by the value of SoVolumeRender::opacityThreshold.

LIMITATIONS

  • Only directional lights (SoDirectionalLight) are supported.
  • If you use deferredLighting, you should set the SoVolumeRender::samplingAlignment field to BOUNDARY_ALIGNED or SMOOTH_BOUNDARY_ALIGNED to reduce "slicing" artifacts.
  • The light color is taken into account, but not the light intensity field. You can get the same effect as reduced intensity by reducing the light color values.
  • Deferred lighting works best when
    • The volume data can be considered to contain "surfaces", for example bones (etc) in medical data or metal parts in NDT data, and
    • The transfer function makes the surface material relatively opaque and the surrounding material relatively transparent.

NOTE: field available since Open Inventor 9.2

Definition at line 738 of file SoVolumeRenderingQuality.h.

◆ edgeColor

SoSFColor SoVolumeRenderingQuality::edgeColor

Color used to draw edges when edgeColoring or edgeDetect2D is TRUE.

Default is black (0,0,0).
NOTE: field available since Open Inventor 7.0

Definition at line 475 of file SoVolumeRenderingQuality.h.

◆ edgeColoring

SoSFBool SoVolumeRenderingQuality::edgeColoring

Enable edge coloring.


If TRUE, changes the color based on the gradient direction (normal). Edges will be highlighted with the color specified in edgeColor. Areas where the normal (computed from the gradient) is facing the camera will have an unmodified color, whereas areas where the normal is more perpendicular to the view direction will tend towards edgeColor. Default is FALSE.
NOTE: field available since Open Inventor 7.0

Definition at line 467 of file SoVolumeRenderingQuality.h.

◆ edgeDetect2D

SoSFBool SoVolumeRenderingQuality::edgeDetect2D

Enable 2D edge detection.


If this field is TRUE, a 2D edge detection algorithm is used to highlight edges in the rendered image of the volume. Default is FALSE.
NOTE: field available since Open Inventor 7.0

Definition at line 524 of file SoVolumeRenderingQuality.h.

◆ edgeDetect2DInnerThreshold

SoSFFloat SoVolumeRenderingQuality::edgeDetect2DInnerThreshold

Increase this value to decrease noise on silhouette edges.

1 = remove all edges, 0 = remove nothing. Default is 0.1
NOTE: field available since Open Inventor 7.0

Definition at line 533 of file SoVolumeRenderingQuality.h.

◆ edgeDetect2DMethod

SoSFBitMask SoVolumeRenderingQuality::edgeDetect2DMethod

Method used for 2D edge detection.


Specifies the edge detection algorithm used when edgeDetect2D is TRUE. Edge detection can work on the image luminance, depth buffer and/or gradient. For example, gradients may be too noisy to give interesting edges and may be ignored with this field. The gradient method is also the slowest (luminance being the fastest) because it needs more texture fetchs. See EdgeDetect2DMethod. Default is LUMINANCE and GRADIENT.
NOTE: field available since Open Inventor 8.1

Definition at line 554 of file SoVolumeRenderingQuality.h.

◆ edgeDetect2DOuterThreshold

SoSFFloat SoVolumeRenderingQuality::edgeDetect2DOuterThreshold

Increase this value to decrease noise on edges in the volume.

1 = remove all edges, 0 = remove nothing. Default is 0.1
NOTE: field available since Open Inventor 7.0

Definition at line 542 of file SoVolumeRenderingQuality.h.

◆ edgeThreshold

SoSFFloat SoVolumeRenderingQuality::edgeThreshold

If this value is low, more edges will be detected.

Default is 0.2. Min value is 0. There is no max, but most of the time a value between 0 and 1 is good.
NOTE: field available since Open Inventor 7.0

Definition at line 485 of file SoVolumeRenderingQuality.h.

◆ gradientQuality

SoSFEnum SoVolumeRenderingQuality::gradientQuality

Specifies the algorithm used to compute gradients, for example, normals for lighting.

Only affects gradient based lighting (lighting field).

Use enum GradientQuality. Default is MEDIUM.
NOTE: field available since Open Inventor 7.0

Definition at line 564 of file SoVolumeRenderingQuality.h.

◆ gradientThreshold

SoSFFloat SoVolumeRenderingQuality::gradientThreshold

Ignore all gradients with a magnitude less than the specified threshold.


Default is 0.0001, meaning that all gradients are used in the lighting computation. Maximum useful value is 1.0, because gradient vectors are normalized. Only affects gradient based lighting (lighting field).
NOTE: field available since Open Inventor 7.0

Definition at line 454 of file SoVolumeRenderingQuality.h.

◆ jittering

SoSFBool SoVolumeRenderingQuality::jittering

Enable jittering.


If set to TRUE, a random offset is added to texture coordinates in order to decrease ringing artifacts (boundary edge artifacts) without the cost of drawing a higher number of slices. Note that this creates a "noisy" image. Instead we recommend setting the SoVolumeRender::samplingAlignment field to BOUNDARY_ALIGNED. Note: Jittering is only available when pre-integrated rendering is enabled. Default is FALSE.
NOTE: field available since Open Inventor 7.0

Definition at line 444 of file SoVolumeRenderingQuality.h.

◆ lighting

SoSFBool SoVolumeRenderingQuality::lighting

Enable gradient based lighting (computed on the GPU).

Default is FALSE. Gradient based lighting is computed using the direction and magnitude of gradient vectors computed from the data values in place of "normal vectors" in the lighting equation. A gradient vector is computed for each sample point along the rays cast through the volume.

VolumeViz also supports screen space lighting (see the deferredLighting field).

Notes:

  • The result of the gradient lighting computation is affected by how the gradient vectors are computed. See the gradientQuality field.
  • Gradient lighting may produce "noisy" results when the gradient magnitudes are small and/or the gradient directions are not consistent. This often happens, for example, in relatively homogeneous regions of a volume. Several fields are provided to compensate for this effect. See gradientThreshold and surfaceScalarExponent.
  • Both gradient lighting and deferred lighting may be enabled at the same time, but the intent is that the application should use one or the other.
  • In any case, do not use the SoVolumeRender::lighting field.

LIMITATIONS

  • Only directional lights (SoDirectionalLight) are supported.
  • Only one light source, the first one traversed in the scene graph, is supported.

Definition at line 410 of file SoVolumeRenderingQuality.h.

◆ lightingModel

SoDEPRECATED SoSFEnum SoVolumeRenderingQuality::lightingModel

Sets the lighting model.

For backward compatibility with Open Inventor v6. Applications should set this field to OPENGL. Only affects gradient based lighting (lighting field).

Use enum LightingModel. Default is OIV6.
NOTE: field available since Open Inventor 7.0

Definition at line 772 of file SoVolumeRenderingQuality.h.

◆ preIntegrated

SoSFBool SoVolumeRenderingQuality::preIntegrated

Enable pre-integrated volume rendering.


Pre-integrated rendering can significantly increase image quality (at the cost of slightly lower performance). Default is TRUE.

Limitations:

  • Pre-integration integrates between color map values. For typical scalar data containing sampled values, this provides a beneficial smoothing. When the color changes sharply between adjacent voxels, it can can cause values that are not actually in the original data to be displayed. This is undesireable for some data, for example "label" volumes resulting from segmentation. Pre-integration is not recommended for such data.
  • The preIntegrated field has no effect on SoVolumeIsosurface rendering.
  • The preIntegrated field is only considered when SoVolumeRendering::renderMode is set to VOLUME_RENDERING (the default).

Definition at line 430 of file SoVolumeRenderingQuality.h.

◆ segmentedInterpolation

SoSFBool SoVolumeRenderingQuality::segmentedInterpolation

Allow correct interpolation when rendering segmented data.

NOTE: Only available on SoVolumeIsosurface.
NOTE: field available since Open Inventor 8.5

Definition at line 613 of file SoVolumeRenderingQuality.h.

◆ segmentedInterpolationThreshold

SoSFFloat SoVolumeRenderingQuality::segmentedInterpolationThreshold

Defines the iso distance used when segmentedInterpolation is true.


Default is 0.5. value must be in the range [0 .. 1] NOTE: Only available on SoVolumeIsosurface.
NOTE: field available since Open Inventor 8.6

Definition at line 621 of file SoVolumeRenderingQuality.h.

◆ surfaceScalarExponent

SoSFFloat SoVolumeRenderingQuality::surfaceScalarExponent

If this field is greater than or equal to 1, a surface with a small gradient will be less lighted than a surface with a high gradient.

The resulting color is a mix between the lighted voxel color and the non-lighted voxel color (ie: the corresponding entry in the colormap). If the value is less than 1, the field is ignored. Values higher than 256 will apply lighting on almost all surfaces. For most datasets, values between 2 and 16 should be enough. Default is 5.
Only affects gradient based lighting (lighting field). NOTE: field available since Open Inventor 8.1

Definition at line 591 of file SoVolumeRenderingQuality.h.

◆ unnormalizedGradientExponent

SoSFFloat SoVolumeRenderingQuality::unnormalizedGradientExponent

When unnormalizedGradientExponent is not 0, surfaces with high gradients will be more lighted than surfaces with small gradients.

Voxels with small gradients will have less diffuse and specular than other with high gradients (ie: ambient color will be the biggest contributor). This lighting contribution can be controlled with this field. If this value is high, smaller gradients will contribute to lighting. Values higher than 256 will apply lighting on almost all surfaces. For most dataset, values between 2 and 16 should be enough. Default is 0.
Only affects gradient based lighting (lighting field). NOTE: field available since Open Inventor 8.1

Definition at line 606 of file SoVolumeRenderingQuality.h.

◆ voxelizedRendering

SoSFBool SoVolumeRenderingQuality::voxelizedRendering

If true, SoVolumeRender displays voxels as individual cubes.

Default is false.

Limitations:

  • When using multiple independent volumes (different dimensions or extents) inside a SoMultiDataSeparator, this feature is not supported. Only the last volume in the scenegraph will be displayed.

NOTE: field available since Open Inventor 9.0

Definition at line 633 of file SoVolumeRenderingQuality.h.

◆ voxelOutline

SoSFBool SoVolumeRenderingQuality::voxelOutline

If true, draw the outline of voxels (default is false).

Notes:

  • Since Open Inventor 9.6, this mode applies to volume slice primitives (SoOrthoSlice etc) in addition to volume rendering.
  • In the case of SoObliqueSlice, you may see triangles, quadrilaterals and even irregular pentagons in some cases. These lines are correct and correspond to the intersections between the voxels and the oblique slice. For example:

NOTE: field available since Open Inventor 9.0

Definition at line 650 of file SoVolumeRenderingQuality.h.

◆ voxelOutlineColor

SoSFColor SoVolumeRenderingQuality::voxelOutlineColor

When voxelOutline is TRUE, this value specifies the voxel outline color.

Default is black : (0, 0, 0).

NOTE: field available since Open Inventor 9.6

Definition at line 676 of file SoVolumeRenderingQuality.h.

◆ voxelOutlineThreshold

SoSFFloat SoVolumeRenderingQuality::voxelOutlineThreshold

When voxelOutline is TRUE, this threshold specifies the minimum size of a voxel, in screen pixels, for the voxel outline to be visible.

Default is 2, meaning that outline is visible only if a single voxel is bigger than 2 screen pixels.

NOTE: field available since Open Inventor 9.2

Definition at line 660 of file SoVolumeRenderingQuality.h.

◆ voxelOutlineWidth

SoSFFloat SoVolumeRenderingQuality::voxelOutlineWidth

When voxelOutline is TRUE, this value specifies the voxel outline width in pixels.

Default is 2 pixels.

NOTE: field available since Open Inventor 9.6

Definition at line 668 of file SoVolumeRenderingQuality.h.


The documentation for this class was generated from the following file: