SoVolumeClippingGroup Class Reference
[Nodes]

VolumeViz Clipping a volume with a 3D object. More...

#include <VolumeViz/nodes/SoVolumeClippingGroup.h>

Inheritance diagram for SoVolumeClippingGroup:
SoGroup SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Classes

struct  NotEnoughLayerCBData
 struct given to notEnoughLayerCB.
struct  SoVolumeClippingInfos

Public Types

typedef void SoVolumeClippingGroupCB (SoVolumeClippingGroup *mgr, void *userData)

Public Member Functions

virtual SoType getTypeId () const
 SoVolumeClippingGroup ()
void setNotEnoughPassCallback (SoVolumeClippingGroupCB *f, void *userData)

Static Public Member Functions

static SoType getClassTypeId ()
static SbBool isSupported (SoState *state=NULL)
static unsigned int getMaxNumPasses (SoState *state=NULL)

Public Attributes

SoSFInt32 numPasses
SoSFBool clipOutside

Detailed Description

VolumeViz Clipping a volume with a 3D object.

VolumeViz supports clipping a volume against any closed 3D polygonal shape defined by standard Open Inventor geometry. This is done using the SoVolumeClippingGroup node. Polygon clipping can remove the voxels outside the shape or the voxels inside the shape. Polygon clipping can be used in seismic applications to clip outside a fault block or geobody, in medical applications to cut away an arbitrary region, in core sample applications to apply cylindrical clipping and many other uses.

When this node is in the scene graph before a VolumeViz rendering node, all shapes under the SoVolumeClippingGroup will be used to clip the volume. These shapes will not be displayed.

The geometry defined under SoVolumeClippingGroup must represent a set of closed surfaces otherwise the result is unpredictable.

The clipping group may include transform nodes, e.g. SoTransform, to scale, rotate and translate the geometry. The transformed geometry will be used for clipping.

In general, do not put draggers or manipulators, e.g. SoTabBoxDragger, in the clipping group. The geometry of the dragger will also be used for clipping and the results may be unexpected. One exception is if the dragger is configured to use the clipping shape as "proxy" geometry (see SoInteractionKit::setPartAsPath()). A better solution is to put the dragger in the scene graph outside the clipping group, add a transform node to the clipping group and connect the fields of the dragger to the fields of the transform node (see SoField::connectFrom()).

The clipping result is based on the odd-winding rule, so the result is not simply the union or the intersection of the closed surfaces. If the goal is to define a clipping shape which is the result of the intersection/union of multiple closed surfaces, consider using the SoCSGShape node as a child of SoVolumeClippingGroup.

In some cases the number of passes specified may not be enough to clip correctly with the specified geometry. The numPasses field allows you to increase the clipping quality, for example when using shapes with a lot of concavity. To query the maximum allowed number of passes, which depends on your graphics card, use the static method getMaxNumPasses(). The setNotEnoughPassCallback() method allows the application to be notified when numPasses is not sufficient.

Standard clipplanes (see SoClipPlane) affect VolumeViz rendering nodes, but the VolumeViz specific clipping nodes generally provide better performance and allow much more complex clipping. Simple axis-aligned clipping can be done more efficiently using the SoROI node. The SoUniformGridClipping or SoUniformGridProjectionClipping nodes clip against height-field surfaces (e.g. seismic horizons). The SoVolumeMask node clips against a boolean mask volume on a per-voxel basis.

Notes:

EXAMPLE

FILE FORMAT/DEFAULT

SEE ALSO

SoVolumeRender, SoUniformGridClipping, SoShaderProgram, SoVolumeRenderingQuality, SoVolumeIsosurface, SoCSGShape, SoPreferences

See related examples:

MedicalMIP, MedicalFreeHandCutting, MedicalSimpleClippingGroup, MedicalVolumePipeClipping, MedicalRotateROI, VViz-template-SG, CSGClippingGroup, SimpleClippingGroup, VolumePipeClipping, VolRend


Member Typedef Documentation

Callback prototype.


Constructor & Destructor Documentation

SoVolumeClippingGroup::SoVolumeClippingGroup (  ) 

Default constructor.


Member Function Documentation

static SoType SoVolumeClippingGroup::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoGroup.

static unsigned int SoVolumeClippingGroup::getMaxNumPasses ( SoState state = NULL  )  [static]

Returns the maximum number of passes supported by the hardware.

virtual SoType SoVolumeClippingGroup::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoGroup.

static SbBool SoVolumeClippingGroup::isSupported ( SoState state = NULL  )  [static]

Indicates if volume clipping is supported by your graphics board.

When using a debug build of Open Inventor, some "no context available" warning messages may be generated. You can ignore them or see SoGLExtension for an example of using SoGLContext to avoid them.

void SoVolumeClippingGroup::setNotEnoughPassCallback ( SoVolumeClippingGroupCB f,
void *  userData 
)

Set a callback to be called when there are not enough passes (see numPasses) to properly apply the clipping.


Member Data Documentation

If TRUE, voxels inside the clipping object will be drawn, voxels outside will be clipped.

Default is TRUE. Note that if the VolumeClippingGroup is empty, setting clipOutside to TRUE will clip everything and setting it to FALSE will clip nothing.

Number of passes used to do the clipping.

Increasing this number increases the image quality but decreases performance. Default is 2 and maximum is SoVolumeClippingGroup::getMaxNumPasses().


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

Open Inventor Toolkit reference manual, generated on 11 Nov 2019
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/