Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoVolumeRenderDetail Class Reference

VolumeViz Stores detail information about a picked voxel or pick ray in a data volume. More...

#include <VolumeViz/details/SoVolumeRenderDetail.h>

+ Inheritance diagram for SoVolumeRenderDetail:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoVolumeRenderDetail ()
 Constructor.
 
virtual ~SoVolumeRenderDetail ()
 Destructor.
 
size_t getMaskCount (SbBool realValue=FALSE) const
 Returns the number of volume masks applied to the first non-transparent voxel.
 
SoLDM::DataSetIdPair getMask (size_t index, SbBool realValue=FALSE) const
 Returns the i-th volume mask applied to the first non-transparent voxel.
 
void getVoxelStyleAndIsoValue (SoVolumeDataDrawStyle::DrawStyle &style, double &iso, SbBool realValue=FALSE) const
 Returns the style applied to the first non-transparent voxel (and its isovalue if the style is SoVolumeDataDrawStyle::ISOSURFACE).
 
void getRgbaValues (std::vector< SbVec4ub > &rgbaValues, std::vector< SbVec3f > &objectPos, std::vector< SbVec3i32 > &dataPos, std::vector< SoLDMTileID > &tileIds, float opacityThreshold=-1.f) const
 Returns the RGBA value, object space position, data space position and tileId for each voxel intersected by the pick ray.
 
void getRgbaValues (std::vector< SbVec4ub > &rgbaValues, std::vector< SbVec3f > &objectPos, float opacityThreshold=-1.f) const
 Returns the RGBA value and object space position of each voxel intersected by the pick ray.
 
void getRgbaValues (std::vector< SbVec4ub > &rgbaValues, float opacityThreshold=-1.f) const
 Returns the RGBA value of each voxel intersected by the pick ray.
 
void getRgbaValues (std::vector< SbVec4ub > &rgbaValues, std::vector< SbVec3i32 > &dataPos, float opacityThreshold=-1.f) const
 Returns the RGBA value and data space position of each voxel intersected by the pick ray.
 
const std::vector< SoLDMTileID > & getRgbaValuesTileIds () const
 Returns the tileID of each voxel intersected by the pick ray.
 
virtual SoDetailcopy () const
 Returns an instance that is a copy of this instance.
 
- Public Member Functions inherited from SoVolumeDetail
 SoVolumeDetail ()
 Constructor.
 
virtual ~SoVolumeDetail ()
 Destructor.
 
void getProfileObjectPos (SbVec3f profile[2]) const
 Returns the profile position in object space (world coordinates).
 
int getProfileDataPos (SbVec3i32 profile[2]) const
 Returns the number of values along the profile and the profile position in data space (voxel coordinates).
 
int64_t getProfileValue (int index, SbVec3i32 &pos, SbVec3f *objPos=0, SbBool realValue=FALSE) const
 Returns the index'th value (as an integer) and its position in object and data space.
 
double getProfileValueD (int index, SbVec3i32 &pos, SbVec3f *objPos, SbBool realValue=FALSE) const
 Returns the index'th value (as a double) and its position in object and data space.
 
virtual SbBool getFirstNonTransparentValue (int64_t &value, SbVec3i32 &pos, SbVec3f *objPos=0, SbBool realValue=FALSE) const
 Retrieves the value and position of the first non-transparent voxel along the pick ray (if any).
 
virtual SbBool getFirstNonTransparentValue (double &value, SbVec3i32 &pos, SbVec3f *objPos=0, SbBool realValue=FALSE) const
 Retrieves the value and position of the first non-transparent voxel along the pick ray (if any).
 
- 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 SoVolumeDetail
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoDetail
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.
 

Detailed Description

VolumeViz Stores detail information about a picked voxel or pick ray in a data volume.

A successful pick operation returns an SoPickedPoint object. If the picked geometry is an SoVolumeRender node, use the getDetail method and cast the result to this class to get extra information about the the pick.

SoVolumeRenderDetail returns information about the first (closest) non-transparent voxel along the pick ray and/or information about all the voxels intersected by the pick ray (called a profile). For the first non-transparent voxel (if any) on the pick ray, it returns XYZ position, IJK location, and data value. For the profile defined by all the intersected voxels, it returns:

  • Profile position in object space (two XYZ points)
  • Profile location in the data volume (two IJK indices)
  • Number of values along the profile
  • Each voxel value and corresponding IJK location

Use the methods in SoVolumeDetail to get information about the data values of the picked voxels. Use the getRgba... methods in this class to get information about the mapped RGBA colors of the picked voxels. Because these methods return colors, they always return information based on the (possibly subsampled) tiles currently in memory.

GPU picking: Please see the discussion of GPU picking in SoVolumeDetail.

Limitations:

  • If multiple volumes are being combined under an SoMultiDataSeparator, the detail class only returns values for the first volume in the scene graph.

SEE ALSO

SoDetail, SoVolumeDetail, SoVolumeRender

Definition at line 83 of file SoVolumeRenderDetail.h.

Constructor & Destructor Documentation

◆ SoVolumeRenderDetail()

SoVolumeRenderDetail::SoVolumeRenderDetail ( )

Constructor.

◆ ~SoVolumeRenderDetail()

virtual SoVolumeRenderDetail::~SoVolumeRenderDetail ( )
virtual

Destructor.

Member Function Documentation

◆ copy()

virtual SoDetail * SoVolumeRenderDetail::copy ( ) const
virtual

Returns an instance that is a copy of this instance.

The caller is responsible for deleting the copy when it is no longer needed.

Reimplemented from SoVolumeDetail.

◆ getClassTypeId()

static SoType SoVolumeRenderDetail::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getMask()

SoLDM::DataSetIdPair SoVolumeRenderDetail::getMask ( size_t  index,
SbBool  realValue = FALSE 
) const

Returns the i-th volume mask applied to the first non-transparent voxel.

index must be in the valid range returned by getMaskCount().

If realValue is TRUE, VolumeViz will return the actual value from the full resolution data. Note that this may require a read from disk if full resolution data is not currently in memory. If FALSE, VolumeViz will return the value from the (possibly subsampled) data currently in memory.

Warning
To use GPU picking, you must specify realValue = FALSE.

◆ getMaskCount()

size_t SoVolumeRenderDetail::getMaskCount ( SbBool  realValue = FALSE) const

Returns the number of volume masks applied to the first non-transparent voxel.

If realValue is TRUE, VolumeViz will return the actual value from the full resolution data. Note that this may require a read from disk if full resolution data is not currently in memory. If FALSE, VolumeViz will return the value from the (possibly subsampled) data currently in memory.

Warning
To use GPU picking, you must specify realValue = FALSE.

◆ getRgbaValues() [1/4]

void SoVolumeRenderDetail::getRgbaValues ( std::vector< SbVec4ub > &  rgbaValues,
float  opacityThreshold = -1.f 
) const

Returns the RGBA value of each voxel intersected by the pick ray.

Voxels with a alpha value less or equal to opacityThreshold are ignored. Values returned are based on the (possibly subsampled) tiles currently in memory.

◆ getRgbaValues() [2/4]

void SoVolumeRenderDetail::getRgbaValues ( std::vector< SbVec4ub > &  rgbaValues,
std::vector< SbVec3f > &  objectPos,
float  opacityThreshold = -1.f 
) const

Returns the RGBA value and object space position of each voxel intersected by the pick ray.

Plus their object space position. Voxels with a alpha value less or equal to opacityThreshold are ignored. Values returned are based on the (possibly subsampled) tiles currently in memory.

◆ getRgbaValues() [3/4]

void SoVolumeRenderDetail::getRgbaValues ( std::vector< SbVec4ub > &  rgbaValues,
std::vector< SbVec3f > &  objectPos,
std::vector< SbVec3i32 > &  dataPos,
std::vector< SoLDMTileID > &  tileIds,
float  opacityThreshold = -1.f 
) const

Returns the RGBA value, object space position, data space position and tileId for each voxel intersected by the pick ray.

Voxels with a alpha value less or equal to opacityThreshold are ignored. Values returned are based on the (possibly subsampled) tiles currently in memory.

◆ getRgbaValues() [4/4]

void SoVolumeRenderDetail::getRgbaValues ( std::vector< SbVec4ub > &  rgbaValues,
std::vector< SbVec3i32 > &  dataPos,
float  opacityThreshold = -1.f 
) const

Returns the RGBA value and data space position of each voxel intersected by the pick ray.

Voxels with a alpha value less or equal to opacityThreshold are ignored. Values returned are based on the (possibly subsampled) tiles currently in memory.

◆ getRgbaValuesTileIds()

const std::vector< SoLDMTileID > & SoVolumeRenderDetail::getRgbaValuesTileIds ( ) const

Returns the tileID of each voxel intersected by the pick ray.

Values returned are based on the (possibly subsampled) tiles currently in memory.

◆ getTypeId()

virtual SoType SoVolumeRenderDetail::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoVolumeDetail.

◆ getVoxelStyleAndIsoValue()

void SoVolumeRenderDetail::getVoxelStyleAndIsoValue ( SoVolumeDataDrawStyle::DrawStyle style,
double &  iso,
SbBool  realValue = FALSE 
) const

Returns the style applied to the first non-transparent voxel (and its isovalue if the style is SoVolumeDataDrawStyle::ISOSURFACE).


If realValue is TRUE, VolumeViz will return the actual value from the full resolution data. Note that this may require a read from disk if full resolution data is not currently in memory. If FALSE, VolumeViz will return the value from the (possibly subsampled) data currently in memory.

Warning
To use GPU picking, you must specify realValue = FALSE.

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