Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoVolumeShape Class Referenceabstract

VolumeViz Abstract base class for slices, SoVolumeSkin, SoHeightFieldRender, and SoVolumeRender nodes. More...

#include <VolumeViz/nodes/SoVolumeShape.h>

+ Inheritance diagram for SoVolumeShape:

Public Types

enum  Interpolation {
  NEAREST ,
  LINEAR ,
  TRILINEAR ,
  MULTISAMPLE_12 ,
  CUBIC
}
 Interpolation mode. More...
 
- Public Types inherited from SoShape
enum  ShapeType {
  POINTS ,
  LINES ,
  POLYGONS ,
  TEXT
}
 Basic type for antialiased rendering for this shape (Do not consider the SoDrawStyle property currently in the state). More...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
virtual void setRenderProgress (SoProgressIndicator *ps)
 Set an application defined SoProgressIndicator object which will raise an event before and after the rendering task, before and after each subtask (in this case: Texture creation and Geometry creation) and after each step in the subtasks which represents in most cases individual tiles of data.
 
- Public Member Functions inherited from SoShape
virtual SbBool affectsState () const
 Overrides default method on SoNode.
 
ShapeType getShapeType ()
 Gets the current shape Full Scene Antialiasing type.
 
- 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 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 SoLdmShape
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoShape
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SbBool isPrimitiveRestartAvailable (SoState *state=NULL)
 Returns TRUE if the primitive restart feature is available.
 
- 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

SoSFEnum interpolation
 Interpolation mode.
 
- Public Attributes inherited from SoShape
SoSFBool boundingBoxIgnoring
 Whether to ignore this node during bounding box traversal.
 

Deprecated

enum  Composition {
  MAX_INTENSITY = 0 ,
  MIN_INTENSITY ,
  SUM_INTENSITY ,
  ALPHA_BLENDING ,
  COMPOSITION_LAST
}
 Composition mode. More...
 
SoDEPRECATED SoSFEnum composition
 Specifies color composition mode.
 

Detailed Description

VolumeViz Abstract base class for slices, SoVolumeSkin, SoHeightFieldRender, and SoVolumeRender nodes.

This class defines common properties for the SoOrthoSlice, SoObliqueSlice, SoFenceSlice, SoVolumeSkin, SoHeightFieldRender and SoVolumeRender nodes.

The interpolation field controls how the texture is interpolated.

The composition field is deprecated and should not be used. Instead specify the composition mode for volume rendering using the SoVolumeRender node.

SEE ALSO

SoObliqueSlice, SoOrthoSlice, SoFenceSlice, SoVolumeRender, SoVolumeSkin, SoHeightFieldRender

Definition at line 86 of file SoVolumeShape.h.

Member Enumeration Documentation

◆ Composition

Composition mode.

Enumerator
MAX_INTENSITY 

Max intensity.

MIN_INTENSITY 

Min intensity.

SUM_INTENSITY 

Sum intensity.

ALPHA_BLENDING 

Alpha blending (Default)

COMPOSITION_LAST 

Definition at line 212 of file SoVolumeShape.h.

◆ Interpolation

Interpolation mode.

Used with interpolation field. Also used with interpolation field in volume geometry nodes, e.g. SoVolumeIndexedFaceSet::interpolation

Enumerator
NEAREST 

OpenGL "nearest neighbor" interpolation.

LINEAR 

OpenGL linear interpolation (Default).

This implies bi-linear interpolation for 2D textures (e.g. SoOrthoSlice, SoObliqueSlice, SoVolumeSkin, SoFenceSlice) and tri-linear interpolation for 3D textures (SoVolumeRender, SoVolumeGeometry).

TRILINEAR 

Tri-linear interpolation for SoObliqueSlice.

Tri-linear interpolation is used when extracting the 2D texture that will be applied to the slice, providing better image quality.
Same as LINEAR for other nodes.

NOTE: enumeration value available since Open Inventor 6.0

MULTISAMPLE_12 

Multi-sample interpolation for slice shapes.

Interpolates data values using 12 samples around the voxel. This provides much higher image quality and specifically avoids rendering artifacts due to bi-linear interpolation. Only supported for 2D texture shapes (e.g. SoOrthoSlice, SoObliqueSlice, SoVolumeSkin, SoFenceSlice). Same as LINEAR for other nodes.

NOTE: enumeration value available since Open Inventor 7.0

CUBIC 

Cubic interpolation.

This implies bi-cubic interpolation for 2D textures (e.g. SoOrthoSlice, SoObliqueSlice, SoVolumeSkin, SoFenceSlice) and tri-cubic interpolation for 3D textures (SoVolumeRender, SoVolumeGeometry). It gives smoother results, especially for volume rendering.

Linear interpolation Cubic interpolation

Warning
Heavy GPU usage. Primarily useful for still image rendering.

It is recomended to use SoInteractiveComplexity node to switch bewteen LINEAR interpolation while moving and CUBIC interpolation for Still frame:

icplx->fieldSettings.set1Value( 0, "SoVolumeRender interpolation LINEAR CUBIC" );
root->addChild(icplx);
Field interactive complexity node.
SoMFString fieldSettings
Each string in this field specifies the interactionValue and stillValue for a specific field of a spe...
void set1Value(int index, const SbString &newValue)
Sets the index'th value in the array to newValue.

NOTE: enumeration value available since Open Inventor 9.3

Definition at line 95 of file SoVolumeShape.h.

Member Function Documentation

◆ getClassTypeId()

static SoType SoVolumeShape::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getTypeId()

virtual SoType SoVolumeShape::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoLdmShape.

Reimplemented in ObliqueSliceBorder, OrthoSliceBorder, SoFenceSlice, SoHeightFieldRender, SoObliqueSlice, SoOrthoSlice, SoSlice, SoVolumeRender, and SoVolumeSkin.

◆ setRenderProgress()

virtual void SoVolumeShape::setRenderProgress ( SoProgressIndicator ps)
virtual

Set an application defined SoProgressIndicator object which will raise an event before and after the rendering task, before and after each subtask (in this case: Texture creation and Geometry creation) and after each step in the subtasks which represents in most cases individual tiles of data.

Track loading progression with SoProgressIndicator::onEndStep event of SubTask "Loading Texture":

  • NumSteps represents here the number of tiles to load to reach the "stable rendering state".
  • NumStepsDone represents here the number of tiles currently loaded since the last NumSteps reset.
  • The two numbers are reset when the viewer is moving the camera.

The example VolRend (examples/source/VolumeViz/VolRend) implements a loading progress bar in class EventRaisedProgressBar.

Limitations :

If set to NULL no events will be raised. Default is NULL.

Since Open Inventor 2023.2

Reimplemented in SoOrthoSlice.

Member Data Documentation

◆ composition

SoDEPRECATED SoSFEnum SoVolumeShape::composition

Specifies color composition mode.

Use enum Composition. Default is ALPHA_BLENDING.

ALPHA_BLENDING blends the R, G, and B components for each pixel based on the their alpha values.

SUM_INTENSITY draws the sum of the R, G, and B components for each pixel.

MAX_INTENSITY draws the maximum R, G, and B components for each pixel.

MIN_INTENSITY draws the minimum R, G, and B components for each pixel.

Note: In all modes, blending is done against the background color of the scene (or the object behind the volume). This means that, using MIN_INTENSITY for example, if the background color is black then 0,0,0 is already the minimum RGB value and the volume will not be visible. Generally when using MIN_INTENSITY the background color should be set to white (1,1,1) and when using MAX_INTENSITY or SUM_INTENSITY the background color should be set to black (0,0,0). To set the background color see the setBackgroundColor method of the appropriate RenderArea class, for example SoWinRenderArea on Windows.

NOTE: field available since Open Inventor 5.0.3

Definition at line 251 of file SoVolumeShape.h.

◆ interpolation

SoSFEnum SoVolumeShape::interpolation

Interpolation mode.

Use enum SoVolumeShape::Interpolation. Default is LINEAR. NOTE: In most cases on modern graphics boards, indexed textures are used, so this refers to interpolation of volume data values.

Definition at line 174 of file SoVolumeShape.h.


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