Purpose

The SoView2DSmartBinaryBrush module allows to interactively create or correct binary mask images with a connected DrawVoxels3D module.

It does not provide visual feedback yet, other Open Inventor modules can be used to provide that feedback (see DrawVoxels3DPreview).

Usage

Connect to a 2D viewer to the inventor output and the base output of the DrawVoxels3D module inputDrawVoxels3D. Segmentation/Correction can be interactively performed by clicking and moving the mouse. Whether parts will be added or removed is decided automatically depending on the start position of the interaction (inside or outside of the current mask image). This decision can be inverted by the Invert add/remove decision, which can i.e. be combined with SoKeyGrabber. Foreground and background label values can be specified by Mask value and Background value respectively.

Windows

Default Panel

../../../Projects/SoView2DSmartBrush/Modules/mhelp/Images/Screenshots/SoView2DSmartBinaryBrush._default.png

Input Fields

inputDrawVoxels3D

name: inputDrawVoxels3D, type: MLBase

A connected DrawVoxels3D is required for the module to work.

Output Fields

self

name: self, type: SoNode

Inventor node, to be connected to a 2D viewer.

Parameter Fields

Visible Fields

Editing On

name: editingOn, type: Bool, default: TRUE

see SoView2DExtension.editingOn

Button1

name: button1, type: Enum, default: PRESSED

see SoView2DExtension.button1

Button2

name: button2, type: Enum, default: IGNORED

see SoView2DExtension.button2

Button3

name: button3, type: Enum, default: IGNORED

see SoView2DExtension.button3

Shift

name: shift, type: Enum, default: IGNORED

see SoView2DExtension.shift

Control

name: control, type: Enum, default: IGNORED

see SoView2DExtension.control

Alt

name: alt, type: Enum, default: IGNORED

see SoView2DExtension.alt

Mask value

name: inputLabelValue, type: Double, default: 1

Voxel write value. This value is used to define if a voxel is inside the mask or not, and is written into the output image

Background value

name: inputBackgroundValue, type: Double, default: 0

Background value. This value is witten into the output image if it is removed from the mask.

Invert add/remove decision

name: inputShouldInvert, type: Bool, default: FALSE

Invert add/remove decision. If FALSE, the smart brush will add voxels, if started from within the mask and remove voxels otherwise. If true, it will be the opposite behaviour

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoView2DExtension.interactionProviderID

drawingOn

name: drawingOn, type: Bool, default: TRUE

see SoView2DExtension.drawingOn

maskValid

name: maskValid, type: Bool, persistent: no

fixZOn

name: fixZOn, type: Bool, default: TRUE

color

name: color, type: Color, default: 1 1 1

see SoView2DExtension.color

selectionTolerance

name: selectionTolerance, type: Float, default: 4

needsValidVoxel

name: needsValidVoxel, type: Bool, default: FALSE

see SoView2DExtension.needsValidVoxel

wantsAllEvents

name: wantsAllEvents, type: Bool, default: FALSE

wantsKeyEvents

name: wantsKeyEvents, type: Bool, default: FALSE

wantsMouseWheelEvents

name: wantsMouseWheelEvents, type: Bool, default: FALSE

setEventHandled

name: setEventHandled, type: Bool, default: FALSE

see SoView2DExtension.setEventHandled

ignoreHandledEvents

name: ignoreHandledEvents, type: Bool, default: FALSE

see SoView2DExtension.ignoreHandledEvents

createNewMode

name: createNewMode, type: Bool, default: FALSE

see SoView2DExtension.createNewMode

createNewModeRequest

name: createNewModeRequest, type: Trigger

see SoView2DExtension.createNewModeRequest

renderOnSlab

name: renderOnSlab, type: Bool, default: FALSE

clipToSlice

name: clipToSlice, type: Bool, default: FALSE

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

see SoView2DExtension.cursorShape

singleClicked

name: singleClicked, type: Trigger, persistent: no

doubleClicked

name: doubleClicked, type: Trigger, persistent: no