Abstract base class for slice shape nodes. More...
#include <VolumeViz/nodes/SoSlice.h>
Public Types | |
enum | AlphaUse { ALPHA_AS_IS, ALPHA_OPAQUE, ALPHA_BINARY } |
Public Member Functions | |
virtual SoType | getTypeId () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFBool | enableBumpMapping |
SoSFFloat | bumpScale |
SoSFNode | alternateRep |
SoSFEnum | alphaUse |
SoSFBool | useRGBA |
SoSFBool | largeSliceSupport |
This class defines common properties for the SoOrthoSlice, SoObliqueSlice, SoFenceSlice, SoVolumeSkin and SoHeightFieldRender nodes.
The alphaUse field controls how the voxel's alpha component is used when drawing the slice.
The enableBumpMapping and bumpScale fields control a rendering effect called bump mapping that simulates displacement of the slice surface using the gradient vectors (computed on the GPU) as normal vectors.
The largeSliceSupport field enables direct loading of full resolution slice data from the volume reader, without (necessarily) loading complete tiles.
SoObliqueSlice, SoOrthoSlice, SoFenceSlice, SoVolumeSkin
enum SoSlice::AlphaUse |
Alpha component usage mode Used in the alphaUse field.
static SoType SoSlice::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVolumeShape.
Reimplemented in ObliqueSliceBorder, OrthoSliceBorder, SoFenceSlice, SoHeightFieldRender, SoObliqueSlice, SoOrthoSlice, and SoVolumeSkin.
virtual SoType SoSlice::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVolumeShape.
Reimplemented in ObliqueSliceBorder, OrthoSliceBorder, SoFenceSlice, SoHeightFieldRender, SoObliqueSlice, SoOrthoSlice, and SoVolumeSkin.
Specifies how to use the alpha component of each voxel's RGBA value.
Use enum AlphaUse. Default is ALPHA_OPAQUE.
Compatibility Note: The default value changed with the release of Open Inventor version 10. In previous versions the default value was ALPHA_BINARY.
The alpha component will typically come from the transfer function, but (since Open Inventor 8.5) could come from direct rendering of an RGBA volume. The alpha values used for rendering the slice will vary depending on the value of this field.
The following table shows how the alpha value is computed according to this field and the incoming voxel alpha values:
When alphaUse field is: | ALPHA_BINARY | ALPHA_OPAQUE | ALPHA_AS_IS |
Incoming Alpha value | Alpha Value Actually Used | ||
= 0 | 0 (Invisible) | 1 (Opaque) | 0 (Invisible) |
> 0 | 1 (Opaque) | 1 (Opaque) | same as incoming |
Note that this field only affects alpha values coming from the transfer function or an RGBA volume. Global transparency assigned by an SoMaterial node is not affected.
This field optionally holds a subgraph containing only core Open Inventor nodes that can be used for rendering when VolumeViz is not available.
For example, the alternate representation for an SoOrthoSlice could be a small scene graph containing an SoTexture2 and an SoIndexedFaceSet. Such a scene graph could be converted and exported as a PDF3D file. Default is NULL. But an alternateRep scene graph is automatically created during a write action if SoVolumeRendering::setWriteAlternateRep(TRUE) was called.
NOTE: field available since Open Inventor 4.0Specifies the intensity of the bump mapping effect.
Default value is 1.0. Valid values range from 0 (no bump mapping) to no upper limit. (50 is a fairly large value.)
NOTE: field available since Open Inventor 6.0Specifies if a bump mapping effect will be applied to the slice.
Default is FALSE. Bump mapping is a rendering effect that simulates displacement of the slice surface using the gradient vectors (computed on the GPU) as normal vectors. Normally lighting should be enabled to maximize the visual effect of bump mapping.
This mode requires a graphics card supporting the OpenGL GLSL shading language. If your graphics card does not have the necessary support, the slice will be rendered without bump mapping.
Bump mapping is not available for the SoHeightFieldRender node.
NOTE: field available since Open Inventor 6.0Activate/deactivate direct loading of full resolution slice data.
Default is FALSE. When TRUE, if all the required full resolution tiles have already been loaded, then the slice data is taken from LDM system memory cache as usual. But if some required tiles are not currently in memory, the required slice data will be loaded directly from the volume reader without loading the complete tiles. This reduces disk I/O and reduces the amount of system memory required to display the slice at full resolution, so larger (or more) slices can be displayed. The required tiles are then scheduled to be loaded asynchronously in case adjacent slices are displayed later. For example, loading a 1024x1024 SoOrthoSlice from an 8-bit dataset with 128x128x128 tiles would normally require loading 1024x1024x128 bytes of data (as complete tiles). With largeSliceSupport enabled, only 1024x1024 bytes (maximum) of data need to be loaded (in the worst case where no high resolution data is currently in memory).
NOTE: field available since Open Inventor 8.0Limitations :
Specifies whether to create RGBA textures.
Default is FALSE. If useRGBA is FALSE, indexed textures will be used if the graphics board supports them. If useRGBA is TRUE, RGBA textures will be used instead of indexed textures. RGBA textures allow higher precision but are slower to load and use more texture memory.
NOTE: If the dataSet is RGBA then this field is ignored and RGBA textures are used.