RegionGrowingMacro

MacroModule

genre

Region

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

definition

segmentation.def

see also

RegionGrowing, SoView2DMarkerEditor, SoView2DOverlay

keywords

segmentation, fill, thresholding

Purpose

The module RegionGrowingMacro wraps the module RegionGrowing by adding a viewer and a marker editor to simplify its usage.

Usage

Click somewhere in the viewer to set one or more seeds, then adjust the thresholds and press Update to perform the region growing.

Details

See RegionGrowing and SoView2DMarkerEditor for details on the region growing algorithm and the marker handling.

Windows

Default Panel

../../../Modules/Macros/Segmentation/mhelp/Images/Screenshots/RegionGrowingMacro._default.png

Input Fields

inImage

name: inImage, type: Image, deprecated name: inputImage

input image

inMarkers

name: inMarkers, type: ListBase(MLBase)

Externally provided marker list to use instead of an internal one.

Output Fields

outMask

name: outMask, type: Image, deprecated name: outputImage

segmentation result mask

outImage

name: outImage, type: Image, deprecated name: outputmaskedInput

masked input image

outMarkers

name: outMarkers, type: XMarkerList(MLBase)

The current marker list

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

viewerSelf (hidden)

name: viewerSelf, type: SoNode

The viewer’s ‘self’ node.

Parameter Fields

Field Index

/: Double

isInit: Bool

progress: Double

Abort: Trigger

isUpdatePossible: Bool

Remove All Seed Markers: Trigger

Allow extended neighborhood relations: Bool

Lower Threshold: Double

Segmented Volume:: Double

Auto detect: Bool

markerString: String

Show outer object boundaries only: Bool

Automatic (based on average seed value and threshold interval size): Bool

Maximal Number (0 = unlim.): Integer

showPartialResults: Bool

Blend Mode: Enum

Neighborhood Relation: Enum

Specify Thresholds...: Enum

cCoord: Integer

Number of Valid Seeds: Integer

Stop if Volume Exceeds (ml): Double

Clear: Trigger

numSegmentedVoxels: Integer

stretchOutputOverTime: Bool

Color for Segmented Area: Color

Operator status: String

Threshold Interval Size [%]: Double

Delete on click: Bool

Output Up-to-Date: Bool

uCoord: Integer

Enable Upper Volume Limit: Bool

Overflow Mode: Enum

Unit Label: String

Incremental Updates: Enum

Overlay Transparency: Float

Update: Trigger

Internal Accuracy: Enum

Override Nbhd. Relation to: Enum

Update Mode: Enum

Invert result mask: Bool

Persistent markers: Bool

Upper Threshold: Double

isAbortPossible: Bool

Pos Fill Value: Double

Visible Fields

Update Mode

name: autoUpdateMode, type: Enum, default: AutoClear

Defines the auto-update behavior of this module.

Values:

Title

Name

Deprecated Name

Description

​Auto-Clear

​AutoClear

​AutoClearOnImageChange,Off

​Auto-Clear on input image change.

​Auto-Update

​AutoUpdate

​Auto-Update on any input image or parameter change.

Automatic (based on average seed value and threshold interval size)

name: enableAutoThresholdInterval, type: Bool, default: TRUE, deprecated name: autoThreshold

If checked, the module automatically generates threshold values.

Otherwise, the threshold values can be set manually.

Threshold Interval Size [%]

name: autoThresholdIntervalSizeInPercent, type: Double, default: 5, minimum: 0, maximum: 100, deprecated name: intervalSize

Sets an interval size as percent for the automatic threshold generation.

Neighborhood Relation

name: basicNeighborhoodType, type: Enum, default: BNBH_3D_6_XYZ

Defines the neighborhood relation for the region growing algorithm.

Values:

Title

Name

Deprecated Name

​2D-4-Neighborhood (x,y)

​BNBH_2D_4_XY

​2D-4-Neighborhood (x,y)

​3D-6-Neighborhood (x,y,z)

​BNBH_3D_6_XYZ

​3D-6-Neighborhood (x,y,z)

​4D-8-Neighborhood (x,y,z,t)

​BNBH_4D_8_XYZT

​4D-8-Neighborhood (x,y,z,t)

Override Nbhd. Relation to

name: extendedNeighborhoodType, type: Enum, default: ENBH_2D_4_XZ

Defines an extended neighborhood relation.

Values:

Title

Name

Deprecated Name

​1D-2-Neighborhood (x)

​ENBH_1D_2_X

​1D-2-Neighborhood (x)

​1D-2-Neighborhood (y)

​ENBH_1D_2_Y

​1D-2-Neighborhood (y)

​1D-2-Neighborhood (z)

​ENBH_1D_2_Z

​1D-2-Neighborhood (z)

​2D-4-Neighborhood (x,y)

​ENBH_2D_4_XY

​2D-4-Neighborhood (x,y)

​2D-4-Neighborhood (x,z)

​ENBH_2D_4_XZ

​2D-4-Neighborhood (x,z)

​2D-4-Neighborhood (y,z)

​ENBH_2D_4_YZ

​2D-4-Neighborhood (y,z)

​2D-8-Neighborhood (x,y)

​ENBH_2D_8_XY

​2D-8-Neighborhood (x,y)

​2D-8-Neighborhood (x,z)

​ENBH_2D_8_XZ

​2D-8-Neighborhood (x,z)

​2D-8-Neighborhood (y,z)

​ENBH_2D_8_YZ

​2D-8-Neighborhood (y,z)

​3D-5-Neighborhood (x-,y,z)

​ENBH_3D_5_XmYZ

​3D-5-Neighborhood (x-,y,z)

​3D-5-Neighborhood (x+,y,z)

​ENBH_3D_5_XpYZ

​3D-5-Neighborhood (x+,y,z)

​3D-5-Neighborhood (x,y-,z)

​ENBH_3D_5_XYmZ

​3D-5-Neighborhood (x,y-,z)

​3D-5-Neighborhood (x,y+,z)

​ENBH_3D_5_XYpZ

​3D-5-Neighborhood (x,y+,z)

​3D-5-Neighborhood (x,y,z-)

​ENBH_3D_5_XYZm

​3D-5-Neighborhood (x,y,z-)

​3D-5-Neighborhood (x,y,z+)

​ENBH_3D_5_XYZp

​3D-5-Neighborhood (x,y,z+)

​3D-6-Neighborhood (x,y,z)

​ENBH_3D_6_XYZ

​3D-6-Neighborhood (x,y,z)

​3D-18-Neighborhood (x,y,z)

​ENBH_3D_18_XYZ

​3D-18-Neighborhood (x,y,z)

​3D-26-Neighborhood (x,y,z)

​ENBH_3D_26_XYZ

​3D-26-Neighborhood (x,y,z)

​4D-8-Neighborhood (x,y,z,t)

​ENBH_4D_8_XYZT

​4D-8-Neighborhood (x,y,z,t)

​4D-56-Neighborhood (x,y,z,t)

​ENBH_4D_56_XYZT

​4D-56-Neighborhood (x,y,z,t)

​4D-80-Neighborhood (x,y,z,t)

​ENBH_4D_80_XYZT

​4D-80-Neighborhood (x,y,z,t)

Lower Threshold

name: lowerThreshold, type: Double, default: -1228.75

Sets the lower threshold manually.

Upper Threshold

name: upperThreshold, type: Double, default: -819.25

Sets the upper threshold manually.

Allow extended neighborhood relations

name: useExtendedNBH, type: Bool, default: FALSE

If checked, extended neighborhood relations are active.

Checking this option will slow down the algorithm.

Number of Valid Seeds

name: numValidSeeds, type: Integer, persistent: no, deprecated name: noSeeds

Shows the number of set seed points.

Segmented Volume:

name: segmentedVolume_ml, type: Double, persistent: no, deprecated name: volumeCount

Shows the volume of the segmented portion of the image in milliliters.

Operator status

name: status, type: String, persistent: no

Shows information about the module.

Output Up-to-Date

name: outputValid, type: Bool, persistent: no

Shows whether the current output is valid.

Update

name: update, type: Trigger, deprecated name: Go

When pressed, the module computes anew.

Abort

name: abort, type: Trigger, deprecated name: stop

When pressed, a current computation is aborted.

Clear

name: clear, type: Trigger, deprecated name: FlushMem

When pressed, the current output image is cleared.

Specify Thresholds…

name: unitType, type: Enum, default: UnitTypeHounsfieldUnits

Defines a unit type that is used for the threshold values.

Values:

Title

Name

Deprecated Name

​as gray value

​UnitTypeGrayValue

​as gray value

​in Hounsfield units

​UnitTypeHounsfieldUnits

​in Hounsfield units

Unit Label

name: unitLabel, type: String, persistent: no

Sets a label string for the used unit type.

Stop if Volume Exceeds (ml)

name: upperVolumeLimit_ml, type: Double, default: 100, deprecated name: maxVolume

Sets a limit for the segmented volume in milliliter; if that is reached in the process, the segmentation stops.

Enable Upper Volume Limit

name: enableUpperVolumeLimit, type: Bool, default: FALSE, deprecated name: maxVolumeEnabled

If checked, the segmentation is limited in its volume.

Auto detect

name: autoUpdateUnitType, type: Bool, default: TRUE

If checked, the module automatically detects the unit types based on DICOM tags.

Pos Fill Value

name: posFillValue, type: Double, default: -1

Sets a voxel value for the segmentation mask.

/

name: negFillValue, type: Double, default: 0

Sets a voxel value for the segmentation mask’s background.

Invert result mask

name: invertResult, type: Bool, default: FALSE

If checked, the output segmentation mask is inverted.

Show outer object boundaries only

name: showOuterBoundariesOnly, type: Bool, default: FALSE

If checked, only the boundaries of the segmentation masks are generated.

Incremental Updates

name: incrementalUpdateMode, type: Enum, default: Smart

Defines the incremental update mode.

Values:

Title

Name

​Disable

​Disable

​Smart

​Smart

​Force

​Force

Internal Accuracy

name: internalAccuracy, type: Enum, default: Auto

Defines threshold accuracy but also memory consumption. Using Auto is most likely the best choice.

Internally, the input image data is rescaled to an integer image on which the region growing is performed. This parameter can be used to specify the amount of bits that the module shall use to encode the image data.

This is the policy for the Auto mode: 1. For integer input images, the smallest accuracy is used that is sufficient to capture the input image’s min/max range (e.g., [0, 63] -> 6-bit, [0, 64] -> 14-bit). 2. For float input image, it is not possible to automatically determine the required precision. We therefore use 30 bits for floats with 4 bytes (=32-bit) or less; otherwise, we use the maximum precision.

Thus, Auto is usually best, but if you do not need the accuracy and want to save memory (e.g., for floating-point images that only contain values of 0 and 1), it might be sometimes desirable to select a lower accuracy.

Values:

Title

Name

​Auto-Detect

​Auto

​6 Bit

​6Bit

​14 Bit

​14Bit

​30 Bit

​30Bit

​60 Bit

​60Bit

Persistent markers

name: markerPersistence, type: Bool, default: FALSE

If checked, the set markers are saved with saving the network containing the module.

Delete on click

name: deleteMarkerOnClick, type: Bool, default: TRUE

If checked, set markers can be deleted by clicking on them.

Overflow Mode

name: markerOverflowMode, type: Enum, default: None

Defines the marker overflow mode.

Needs to have a Maximal Number (0 = unlim.) set.

Values:

Title

Name

​None

​None

​Remove First

​RemoveFirst

​Remove Last

​RemoveLast

​Remove All

​RemoveAll

​Remove New

​RemoveNew

Maximal Number (0 = unlim.)

name: maxMarkers, type: Integer, default: 0, minimum: 0

Sets a maximum number of markers.

If this number is exceeded, the Overflow Mode determines what happens on placing an additional marker.

Color for Segmented Area

name: baseColor, type: Color, default: 1 0.420675009489059 0

Sets a base color for the overlay showing the segmented area.

Blend Mode

name: blendMode, type: Enum, default: BLEND_BLEND

Defines a blend mode for the overlay showing the segmented area.

Values:

Title

Name

​Replace

​BLEND_REPLACE

​Add

​BLEND_ADD

​Blend

​BLEND_BLEND

​Maximum

​BLEND_MAXIMUM

​Minimum

​BLEND_MINIMUM

​Reverse Subtract

​BLEND_REVERSE_SUBTRACT

​Subtract

​BLEND_SUBTRACT

​Premultiplied Blend

​BLEND_PREMULTIPLIED_BLEND

​Screen

​BLEND_SCREEN

Overlay Transparency

name: overlayAlpha, type: Float, default: 0.5, minimum: 0, maximum: 1

Sets a transparency value for the overlay showing the segmented area.

Remove All Seed Markers

name: removeAll, type: Trigger

When pressed, all set markers are removed.

Hidden Fields

isInit

name: isInit, type: Bool, default: TRUE

stretchOutputOverTime

name: stretchOutputOverTime, type: Bool, default: FALSE

numSegmentedVoxels

name: numSegmentedVoxels, type: Integer, persistent: no, deprecated name: voxelCount

isUpdatePossible

name: isUpdatePossible, type: Bool, persistent: no, deprecated name: startButtonActive

isAbortPossible

name: isAbortPossible, type: Bool, persistent: no, deprecated name: abortButtonActive

progress

name: progress, type: Double, persistent: no, deprecated name: theProgressBar

cCoord

name: cCoord, type: Integer, default: 0

uCoord

name: uCoord, type: Integer, default: 0

showPartialResults

name: showPartialResults, type: Bool, default: FALSE

If checked, the module outputs partial segmentation results.

markerString

name: markerString, type: String, default: []