RegionGrowingMacro

MacroModule
genre Region
author Jan-Martin Kuhnigk
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: 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: MLBase

The current marker list

viewerSelf (hidden)

name: viewerSelf, type: SoNode

The viewer's 'self' node.

Parameter Fields

Visible Fields

Update Mode

name: autoUpdateMode, type: Enum, default: AutoClear, deprecated name: autoUpdate

Defines the auto-update behavior of this module. In Auto-Update mode, the module updates on any input image or parameter change. In Auto-Clear, the module is auto-cleared when the input image changes.

Values:

Title Name Description
Auto-Clear AutoClear Auto-Clear on input image change.
Auto-Update AutoUpdate Auto-Update on any input image or parameter change.

Auto generate thresholds

name: autoThreshold, type: Bool, default: TRUE

If checked, the module automatically generates threshold.

Otherwise, the thresholds can be set manually.

Neighborhood Relation

name: basicNeighborhoodType, type: Enum, default: BNBH_3D_6_XYZ

Defines the neighborhood relation for the region growing algorithm.

Values:

Title Name
2D-4-Neighborhood (x,y) BNBH_2D_4_XY
3D-6-Neighborhood (x,y,z) BNBH_3D_6_XYZ
4D-8-Neighborhood (x,y,z,t) BNBH_4D_8_XYZT

Override Nbhd. Relation to

name: extendedNeighborhoodType, type: Enum, default: ENBH_2D_4_XZ

Defines an extended neighborhood relation.

Values:

Title Name
1D-2-Neighborhood (x) ENBH_1D_2_X
1D-2-Neighborhood (y) ENBH_1D_2_Y
1D-2-Neighborhood (z) ENBH_1D_2_Z
2D-4-Neighborhood (x,y) ENBH_2D_4_XY
2D-4-Neighborhood (x,z) ENBH_2D_4_XZ
2D-4-Neighborhood (y,z) ENBH_2D_4_YZ
2D-8-Neighborhood (x,y) ENBH_2D_8_XY
2D-8-Neighborhood (x,z) ENBH_2D_8_XZ
2D-8-Neighborhood (y,z) ENBH_2D_8_YZ
3D-5-Neighborhood (x-,y,z) ENBH_3D_5_XmYZ
3D-5-Neighborhood (x+,y,z) ENBH_3D_5_XpYZ
3D-5-Neighborhood (x,y-,z) ENBH_3D_5_XYmZ
3D-5-Neighborhood (x,y+,z) ENBH_3D_5_XYpZ
3D-5-Neighborhood (x,y,z-) ENBH_3D_5_XYZm
3D-5-Neighborhood (x,y,z+) ENBH_3D_5_XYZp
3D-6-Neighborhood (x,y,z) ENBH_3D_6_XYZ
3D-18-Neighborhood (x,y,z) ENBH_3D_18_XYZ
3D-26-Neighborhood (x,y,z) ENBH_3D_26_XYZ
4D-8-Neighborhood (x,y,z,t) ENBH_4D_8_XYZT
4D-56-Neighborhood (x,y,z,t) ENBH_4D_56_XYZT
4D-80-Neighborhood (x,y,z,t) ENBH_4D_80_XYZT

Interval Size (%)

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

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

Lower Threshold

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

Sets the lower threshold manually.

Unit Label

name: unitLabel, type: String, default: HU

Sets a label string for the used unit type.

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.

Seed points

name: noSeeds, type: Integer, default: 0

Shows the number of set seed points.

Segmented volume (ml):

name: volumeCount, type: Double, default: 0

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

Operator status

name: status, type: String, default: No valid input image detected.

Shows information about the module.

Output up-to-date

name: outputValid, type: Bool, default: FALSE

Shows whether the current output is valid.

Update

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

If pressed, the module computes anew.

Abort

name: stop, type: Trigger

If pressed, a current computation is aborted.

Clear

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

If pressed, the current output image is cleared.

Specify Thresholds...

name: unitType, type: Enum, default: UnitTypeHounsfieldUnits

Defines a unit type that is used for the value thresholds.

Values:

Title Name
as gray value UnitTypeGrayValue
in Hounsfield units UnitTypeHounsfieldUnits

Stop if Volume Exceeds (ml)

name: maxVolume, type: Double, default: 100

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

Enabled

name: maxVolumeEnabled, type: Bool, default: FALSE

If checked, the segmentation is limited in its volume.

Auto detect

name: autoUpdateUnitType, type: Bool, default: TRUE

If checked, the module automatically detects on base of DICOM tags the unit type.

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 mostly 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, else we use the maximum precision.

Thus, 'Auto' is usually best, but if you don't 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

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

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 Markers

name: removeAll, type: Trigger

If pressed, all set markers are removed.

Hidden Fields

isInit

name: isInit, type: Bool, default: TRUE

stretchOutputOverTime

name: stretchOutputOverTime, type: Bool, default: FALSE

voxelCount

name: voxelCount, type: Integer, default: 0

startButtonActive

name: startButtonActive, type: Bool, default: FALSE

abortButtonActive

name: abortButtonActive, type: Bool, default: FALSE

theProgressBar

name: theProgressBar, type: Double, default: 0

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: []