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: 10.12.3.0 (10.12.3.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, objPos, false).
Public methodGetFirstNonTransparentValue(Int64, SbVec3i32)
Calls GetFirstNonTransparentValue(value, pos, objPos, 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

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

Public methodGetProfileObjectPos

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

Public methodGetProfileValue(Int32, SbVec3i32)
Calls GetProfileValue(index, pos, objPos, 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 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

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.

See Also