SoVolumeDetail Class |
Base class for detail information about picking in a data volume.
Namespace: OIV.VolumeViz.Details
The SoVolumeDetail type exposes the following members.
Name | Description | |
---|---|---|
SoVolumeDetail | Constructor. |
Name | Description | |
---|---|---|
Clone | (Inherited from SoDetail.) | |
Copy | Returns an instance that is a copy of this instance. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
GetFirstNonTransparentValue(Double, SbVec3i32) | Calls GetFirstNonTransparentValue(value, pos, objPos, false). | |
GetFirstNonTransparentValue(Int64, SbVec3i32) | Calls GetFirstNonTransparentValue(value, pos, objPos, false). | |
GetFirstNonTransparentValue(Double, SbVec3i32, SbVec3f) | Calls GetFirstNonTransparentValue(value, pos, objPos, false). | |
GetFirstNonTransparentValue(Int64, SbVec3i32, SbVec3f) | Calls GetFirstNonTransparentValue(value, pos, objPos, false). | |
GetFirstNonTransparentValue(Double, SbVec3i32, SbVec3f, Boolean) | 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. | |
GetFirstNonTransparentValue(Int64, SbVec3i32, SbVec3f, Boolean) | Returns the integer value of the first non-transparent voxel along the pick ray (if any) and its position in object and data space. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetProfileDataPos | Returns the number of values along the profile and the profile position in data space (voxel coordinates). | |
GetProfileObjectPos | Returns the profile position in object space (world coordinates). | |
GetProfileValue(Int32, SbVec3i32) | Calls GetProfileValue(index, pos, objPos, false). | |
GetProfileValue(Int32, SbVec3i32, SbVec3f) | Calls GetProfileValue(index, pos, objPos, false). | |
GetProfileValue(Int32, SbVec3i32, SbVec3f, Boolean) | Returns the index'th value (as an integer) and its position in object and data space. | |
GetProfileValueD(Int32, SbVec3i32, SbVec3f) | Calls GetProfileValueD(index, pos, objPos, false). | |
GetProfileValueD(Int32, SbVec3i32, SbVec3f, Boolean) | Returns the index'th value (as a double) and its position in object and data space. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
SetDetails | ||
ToString | Returns a string that represents the current object. (Inherited from Object.) |
A successful pick operation returns an OIV.Inventor.SoPickedPoint object. If the picked geometry is an OIV.VolumeViz.Nodes.SoVolumeSkin or OIV.VolumeViz.Nodes.SoVolumeRender, use the getDetail method and cast the result to the appropriate class (OIV.VolumeViz.Details.SoVolumeSkinDetail or OIV.VolumeViz.Details.SoVolumeRenderDetail) to get extra information about the location of the pick.
OIV.VolumeViz.Details.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:
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
This class returns information about the data values in the picked voxels. OIV.VolumeViz.Details.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 OIV.VolumeViz.Nodes.SoVolumeShader and VVizComputeFragmentColor) to compute voxel color and opacity. CPU picking always uses the color and opacity values assigned by the OIV.LDM.Nodes.SoTransferFunction node. Therefore the result should be the same when using OIV.LDM.Nodes.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 OIV.Inventor.Actions.SoRayPickAction must be aware of the OIV.Inventor.SoSceneManager. OIV.Inventor.Actions.SoHandleEventAction does this automatically, so it is not necessary for the application to take any action when using an OIV.Inventor.Nodes.SoEventCallback node and calling the getPickedPoint() method. However if the application creates its own instance of OIV.Inventor.Actions.SoRayPickAction, then it must call the method OIV.Inventor.Actions.SoAction.SetSceneManager(OIV.Inventor.SoSceneManager) 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:If multiple volumes are being combined under an OIV.LDM.Nodes.SoMultiDataSeparator, the detail class only returns values for the first volume in the scene graph.
Because picking returns actual values of voxel, there may be a small difference between what you see on screen and what you get with picking. When visualizing a volume using LINEAR or CUBIC interpolation, you visualize interpolated data. Picking returns informations such as voxel value, voxel postion, etc... so picking return information of voxel values, not interpolated one. Visible areas may be not pickable and unvisibke areas may be pickable. When using NEAREST interpolation for rendering, picking matches what is displayed.