SoVolumeCutting

InventorModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoVolumeCutting
definition SoVolumeCutting.def
see also UndoManager
keywords mask

Purpose

The SoVolumeCutting module allows to interactively cut away parts of a volume. The user can draw a 2D contour on a 3D viewer and the extruded intersection is cut away. The input volume is used as reference volume for the output mask. Its image data will not be requested, only its image dimensions and world matrix.

The module should be placed late into the Open Inventor scene, so that the 2D contour is really drawn on top.

The output mask volume is suitable to be used with the SoGVRMaskVolume, which allows to cut away the rendered volume on-the-fly.

The module uses managed interactions, have a look at: Managed Interaction.

Tips

If you need a finer or coarser mask volume, you can use a Resample3D module to modify the input volume (the resampled data will never be requested).

Note that the module does not clear its undo stack on input image change. in an application, you’d need to add a FieldListener to the module’s input image field and trigger a clearing of the undo stack explicitly if so desired.

Windows

Default Panel

../../../Modules/Inventor/SoVolumeCutting/mhelp/Images/Screenshots/SoVolumeCutting._default.png

Input Fields

inImage

name: inImage, type: Image

The reference image for the output mask.

inUndoContext

name: inUndoContext, type: UndoContext(MLBase)

Add the output from an UndoManager to receive undo facilities.

For accessing this object via scripting see the Scripting Reference: MLUndoContextWrapper.

Output Fields

outImage

name: outImage, type: Image

An 8bit mask volume which contains 0 for cutaway parts and 255 for everything else.

self

name: self, type: SoNode

The Open Inventor node that should be placed into the scene for cutting. It should be placed late into the scene so that the 2D overlays are really drawn on top.

Parameter Fields

Field Index

Add Mode: Enum Reset: Trigger
Button: Enum  
cutAdded: Trigger  
cutMode: Enum  
Enabled: Bool  
interactionProviderID: String  
Line Color: Color  
Line Width: Float  

Visible Fields

Line Color

name: lineColor, type: Color, default: 1 1 1

Color used for drawing the cutting lines.

Line Width

name: lineWidth, type: Float, default: 1, minimum: 1, maximum: 32

Width used for drawing the cutting lines.

Enabled

name: enabled, type: Bool, default: TRUE

Enables the drawing of new cutting areas.

Reset

name: reset, type: Trigger

Restore the whole volume. (This is an undoable operation if an UndoManager is connected.)

Add Mode

name: addMode, type: Enum, default: AlwaysAdd

Defines how new cuts are handled.

Values:

Title Name Description
Always Add AlwaysAdd All cuts are added to existing cuts.
Add With Shift AddWithShift New cuts replace old cuts if the Shift key is not pressed.

Button

name: button, type: Enum, default: LeftButton

Which mouse button to use for drawing. This can always be overridden with SoInteractionMapping.

Values:

Title Name
Left Button LeftButton
Middle Button MiddleButton
Right Button RightButton

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

cutAdded

name: cutAdded, type: Trigger, persistent: no

This trigger is touched whenever a new cut is added.

cutMode

name: cutMode, type: Enum, default: RemoveExterior

This setting defines what is cut from the volume.

Values:

Title Name Description
Exterior RemoveExterior The exterior of the cut is removed, the interior remains.
Interior RemoveInterior The interior of the cut is removed.