Base class for detail information about picking in a data volume. More...
#include <VolumeViz/details/SoVolumeDetail.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
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). | |
virtual SoDetail * | copy () const |
Returns an instance that is a copy of 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 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. | |
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
Limitations:
SoDetail, SoFenceSliceDetail, SoVolumeRenderDetail, SoVolumeSkinDetail, SoVolumeRender, SoVolumeSkin
Definition at line 123 of file SoVolumeDetail.h.
SoVolumeDetail::SoVolumeDetail | ( | ) |
Constructor.
|
virtual |
Destructor.
|
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 |
Returns the type identifier for this class.
|
virtual |
Retrieves the value and position of the first non-transparent voxel along the pick ray (if any).
Depending on the argument realValue, the voxel value is either fetched from the real value in full resolution data or fetched from the displayed data tile on the GPU which is not necessarily in full resolution. Fetching the data in full resolution may require a read from the disk if the full-resolution data is not currently in memory.
[out] | value | the double value of the first non-transparent voxel along the pick ray. |
[out] | pos | the position of the picked voxel in data space (IJK voxel coordinates) |
[out] | objPos | the position of the picked voxel in object space (XYZ world coordinates). |
[in] | realValue | if TRUE, the integer value is fetched from the full resolution data. If FALSE, it returns the voxel value from the (possibly subsampled) data currently in GPU memory, thus the voxel value that is displayed in the render area. The displayed voxel is not necessarily in full resolution. |
|
virtual |
Retrieves the value and position of the first non-transparent voxel along the pick ray (if any).
Depending on the argument realValue, the voxel value is either fetched from the real value in full resolution data or fetched from the displayed data tile on the GPU which is not necessarily in full resolution. Fetching the data in full resolution may require a read from the disk if the full-resolution data is not currently in memory.
[out] | value | the integer value of the first non-transparent voxel along the pick ray. |
[out] | pos | the position of the picked voxel in data space (IJK voxel coordinates) |
[out] | objPos | the position of the picked voxel in object space (XYZ world coordinates). |
[in] | realValue | if TRUE, the integer value is fetched from the full resolution data. If FALSE, it returns the voxel value from the (possibly subsampled) data currently in GPU memory, thus the voxel value that is displayed in the render area. The displayed voxel is not necessarily in full resolution. |
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.
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.
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.
|
virtual |
Returns the type identifier for this specific instance.
Implements SoTypedObject.
Reimplemented in SoFenceSliceDetail, SoVolumeRenderDetail, and SoVolumeSkinDetail.