Click or drag to resize
SoVolumeDetail Class

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

Inheritance Hierarchy

Namespace: OIV.VolumeViz.Details
Assembly: OIV.VolumeViz (in OIV.VolumeViz.dll) Version: 9.9.17.0 (9.9.17.0)
Syntax
public class SoVolumeDetail : SoDetail

The SoVolumeDetail type exposes the following members.

Constructors
  NameDescription
Public methodSoVolumeDetail

Constructor.

Top
Methods
  NameDescription
Public methodClone (Inherited from SoDetail.)
Public methodCopy

Returns an instance that is a copy of this instance.

(Overrides SoDetailCopy.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetFirstNonTransparentValue(Double, SbVec3i32)
Calls GetFirstNonTransparentValue(value, pos, OIV.Inventor.SbVec3f(), false).
Public methodGetFirstNonTransparentValue(Int64, SbVec3i32)
Calls GetFirstNonTransparentValue(value, pos, OIV.Inventor.SbVec3f(), false).
Public methodGetFirstNonTransparentValue(Double, SbVec3i32, SbVec3f)
Calls GetFirstNonTransparentValue(value, pos, objPos, false).
Public methodGetFirstNonTransparentValue(Int64, SbVec3i32, SbVec3f)
Calls GetFirstNonTransparentValue(value, pos, objPos, false).
Public methodGetFirstNonTransparentValue(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.

Public methodGetFirstNonTransparentValue(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.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetProfileDataPos Obsolete.
Calls GetProfileDataPos((cli.array<OIV.Inventor.SbVec3s>^)nullptr).
Public methodGetProfileDataPos(SbVec3i32)

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

Public methodGetProfileDataPos(SbVec3s) Obsolete.

Obsoletesince Open Inventor 6000 No longer used.

Public methodGetProfileObjectPos

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

Public methodGetProfileValue(Int32, SbVec3i32)
Calls GetProfileValue(index, pos, OIV.Inventor.SbVec3f(), false).
Public methodGetProfileValue(Int32, SbVec3i32, SbVec3f)
Calls GetProfileValue(index, pos, objPos, false).
Public methodGetProfileValue(Int32, SbVec3i32, SbVec3f, Boolean)

Returns the index'th value (as an integer) and its position in object and data space.

Public methodGetProfileValueD(Int32, SbVec3i32, SbVec3f)
Calls GetProfileValueD(index, pos, objPos, false).
Public methodGetProfileValueD(Int32, SbVec3i32, SbVec3f, Boolean)

Returns the index'th value (as a double) and its position in object and data space.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetDetails
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

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:

  • 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. 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:
  • If multiple volumes are being combined under an 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 invisible areas may be pickable. When using NEAREST interpolation for rendering, picking matches what is displayed.

See Also