SoVolumeDetail Class Reference
[Details]

VolumeViz Base class for detail information about picking in a data volume. More...

#include <VolumeViz/details/SoVolumeDetail.h>

Inheritance diagram for SoVolumeDetail:
SoDetail SoTypedObject SoFenceSliceDetail SoVolumeRenderDetail SoVolumeSkinDetail

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoVolumeDetail ()
virtual ~SoVolumeDetail ()
void getProfileObjectPos (SbVec3f profile[2]) const
int getProfileDataPos (SbVec3i32 profile[2]) const
int64_t getProfileValue (int index, SbVec3i32 &pos, SbVec3f *objPos=0, SbBool realValue=FALSE) const
double getProfileValueD (int index, SbVec3i32 &pos, SbVec3f *objPos, SbBool realValue=FALSE) const
virtual SbBool getFirstNonTransparentValue (int64_t &value, SbVec3i32 &pos, SbVec3f *objPos=0, SbBool realValue=FALSE) const
virtual SbBool getFirstNonTransparentValue (double &value, SbVec3i32 &pos, SbVec3f *objPos=0, SbBool realValue=FALSE) const
virtual SoDetailcopy () const

Static Public Member Functions

static SoType getClassTypeId ()

Deprecated



SoDEPRECATED int getProfileDataPos (SbVec3s profile[2]=0) const
SoDEPRECATED int64_t getProfileValue (int index, SbVec3s *pos=0, SbVec3f *objPos=0, SbBool realValue=FALSE) const
virtual SoDEPRECATED SbBool getFirstNonTransparentValue (unsigned int *value, SbVec3s *pos=0, SbVec3f *objPos=0, SbBool flag=FALSE) const

Detailed Description

VolumeViz Base class for detail information about picking in a data volume.

A successful pick operation returns an SoPickedPoint object. If the picked geometry is an SoVolumeSkin or SoVolumeRender, use the getDetail method and cast the result to the appropriate class (SoVolumeSkinDetail or SoVolumeRenderDetail) to get extra information about the location of the pick.

SoVolumeDetail 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:

This class returns information about the data values in the picked voxels. SoVolumeRenderDetail also returns information about the mapped RGBA colors of the picked voxels.

GPU picking vs. CPU picking

VolumeViz can compute the picked voxel(s) and voxel colors on the GPU.
GPU picking is generally faster than CPU picking, but more importantly it is the only way to be sure of getting the correct result if the application is using a custom shader (see SoVolumeShader and VVizComputeFragmentColor) to compute voxel color and opacity. CPU picking always uses the color and opacity values assigned by the SoTransferFunction node. Therefore the result should be the same when using SoTransferFunction to assign color and opacity, but when using a custom shader the CPU picking algorithm is not able to know the color and opacity assigned by the shader.
Important: To enable GPU picking
  • The realValue parameter must be false when calling the getXXX methods.
  • The SoRayPickAction must be aware of the SoSceneManager.
    SoHandleEventAction does this automatically, so it is not necessary for the application to take any action when using an SoEventCallback node and calling the getPickedPoint() method. However if the application creates its own instance of SoRayPickAction, then it must call the method SoAction::setSceneManager() on that instance. If the scene manager is not specified, a warning message is issued and CPU picking is done.
Also be aware of the following trade-off. If the realValue parameter is set to false, the voxel value returned may be based on lower resolution (sub-sampled) data. The values should be approximately the same, but to be sure of getting values from the full resolution data, set the realValue parameter to true.

Limitations:

SEE ALSO

SoDetail, SoFenceSliceDetail, SoVolumeRenderDetail, SoVolumeSkinDetail, SoVolumeRender, SoVolumeSkin


Constructor & Destructor Documentation

SoVolumeDetail::SoVolumeDetail (  ) 

Constructor.

virtual SoVolumeDetail::~SoVolumeDetail (  )  [virtual]

Destructor.


Member Function Documentation

virtual SoDetail* SoVolumeDetail::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.

Implements SoDetail.

Reimplemented in SoFenceSliceDetail, SoVolumeRenderDetail, and SoVolumeSkinDetail.

static SoType SoVolumeDetail::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoDetail.

Reimplemented in SoFenceSliceDetail, SoVolumeRenderDetail, and SoVolumeSkinDetail.

virtual SoDEPRECATED SbBool SoVolumeDetail::getFirstNonTransparentValue ( unsigned int *  value,
SbVec3s pos = 0,
SbVec3f objPos = 0,
SbBool  flag = FALSE 
) const [inline, virtual]
Deprecated:

Deprecated since Open Inventor 6000
No longer used. Use getFirstNonTransparentValue( unsigned int*, SbVec3i32*, SbVec3f*, SbBool ).
virtual SbBool SoVolumeDetail::getFirstNonTransparentValue ( double &  value,
SbVec3i32 pos,
SbVec3f objPos = 0,
SbBool  realValue = FALSE 
) const [virtual]

Returns the floating point value of the first non-transparent voxel along the pick ray (if any) and its position in object and data space.

Returns FALSE if not found.

If the realValue parameter is TRUE, VolumeViz will return the actual voxel 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 voxel value from the (possibly subsampled) data currently in memory.

Warning:
To use GPU picking, you must specify realValue = FALSE.
virtual SbBool SoVolumeDetail::getFirstNonTransparentValue ( int64_t &  value,
SbVec3i32 pos,
SbVec3f objPos = 0,
SbBool  realValue = FALSE 
) const [virtual]

Returns the integer value of the first non-transparent voxel along the pick ray (if any) and its position in object and data space.

Returns FALSE if not found.

If the realValue parameter is TRUE, VolumeViz will return the actual voxel 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 voxel value from the (possibly subsampled) data currently in memory.

Warning:
To use GPU picking, you must specify realValue = FALSE.
SoDEPRECATED int SoVolumeDetail::getProfileDataPos ( SbVec3s  profile[2] = 0  )  const [inline]
Deprecated:

Deprecated since Open Inventor 6000
No longer used. Use getProfileDataPos( SbVec3i32 profile[2] ).
int SoVolumeDetail::getProfileDataPos ( SbVec3i32  profile[2]  )  const

Returns the number of values along the profile and the profile position in data space (voxel coordinates).

Specifically the profile parameter contains the IJK coordinates of the first and last points on the profile. The number of values is the number of of voxels intersected by the pick ray.

void SoVolumeDetail::getProfileObjectPos ( SbVec3f  profile[2]  )  const

Returns the profile position in object space (world coordinates).

Specifically the profile parameter contains the XYZ coordinates of the first and last points on the profile.

SoDEPRECATED int64_t SoVolumeDetail::getProfileValue ( int  index,
SbVec3s pos = 0,
SbVec3f objPos = 0,
SbBool  realValue = FALSE 
) const [inline]
Deprecated:

Deprecated since Open Inventor 6000
No longer used. Use getProfileValue(int, SbVec3i32*, SbVec3f*, SbBool).
int64_t SoVolumeDetail::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.

The number of values along the profile can be queried using the getProfileDataPos() method. However index is automatically clamped to the valid range of values.

If realValue is TRUE, VolumeViz will return the actual voxel 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 voxel value from the (possibly subsampled) data currently in memory.

Warning:
To use GPU picking, you must specify realValue = FALSE.
double SoVolumeDetail::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.

The number of values along the profile can be queried using the getProfileDataPos() method. However index is automatically clamped to the valid range of values.

If realValue is TRUE, VolumeViz will return the actual voxel 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 voxel value from the (possibly subsampled) data currently in memory.

Warning:
To use GPU picking, you must specify realValue = FALSE.
virtual SoType SoVolumeDetail::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Implements SoTypedObject.

Reimplemented in SoFenceSliceDetail, SoVolumeRenderDetail, and SoVolumeSkinDetail.


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

Open Inventor by FEI reference manual, generated on 13 Jun 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/