Abstract base class for slices, SoVolumeSkin, SoHeightFieldRender, and SoVolumeRender nodes. More...
#include <VolumeViz/nodes/SoVolumeShape.h>
Public Types | |
enum | Interpolation { NEAREST, LINEAR, TRILINEAR, MULTISAMPLE_12, CUBIC } |
Public Member Functions | |
virtual SoType | getTypeId () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFEnum | interpolation |
Deprecated | |
| |
enum | Composition { MAX_INTENSITY = 0, MIN_INTENSITY, SUM_INTENSITY, ALPHA_BLENDING, COMPOSITION_LAST } |
SoDEPRECATED SoSFEnum | composition |
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.
SoObliqueSlice, SoOrthoSlice, SoFenceSlice, SoVolumeRender, SoVolumeSkin, SoHeightFieldRender
Composition mode.
Interpolation mode.
Used with interpolation field. Also used with interpolation field in volume geometry nodes, e.g. SoVolumeIndexedFaceSet::interpolation
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. | ||||
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. | ||||
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.
It is recomended to use SoInteractiveComplexity node to switch bewteen LINEAR interpolation while moving and CUBIC interpolation for Still frame: SoInteractiveComplexity* icplx = new SoInteractiveComplexity; icplx->fieldSettings.set1Value( 0, "SoVolumeRender interpolation LINEAR CUBIC" ); root->addChild(icplx); |
static SoType SoVolumeShape::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoLdmShape.
Reimplemented in ObliqueSliceBorder, OrthoSliceBorder, SoFenceSlice, SoHeightFieldRender, SoObliqueSlice, SoOrthoSlice, SoSlice, SoVolumeRender, and SoVolumeSkin.
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.
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.3Interpolation 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.