Surround

MLModule
genre Contour
status stable
author Regina Ochotzki
package MeVisLab/Standard
dll MLKernel
definition MLKernel.def
see also IntervalThresh
keywords Intervall, Threshold, Surround, Border, Boundary, Outline, Contour

Purpose

The Surround module calculates the boundaries of an image object whose grey values are in a defined grey value interval.

It is possible to calculate and draw the boundaries inside the object, outside the object or both (inside and outside at the same time).

Usage

It is useful to feed this operator with a preprocessed image. Enter a Lower Threshold and Upper Threshold to define the grey value interval.

Then enter either the Inner Border Value or the Outer Border Value (or both) according to which Border Location you use.

To see the border more clearly, it is recommended to choose a border value which differs broad from the rest of the grey values of the input image.

The border will change its appearance in dependence of the chosen dimension and neighbourhood. Additionally you can select a Border Handling affecting the image borders.

Windows

Default Panel

../../../Modules/ML/MLKernel/mhelp/Images/Screenshots/Surround._default.png

Input Fields

input0

name: input0, type: Image

Output Fields

output0

name: output0, type: Image

Parameter Fields

Visible Fields

Border Handling

name: borderHandling, type: Enum, default: PadSrcClamp, deprecated name: EdgeMode

Defines the border handling mode.

See Border Handling in Kernel Operations for details.

Values:

Title Name Description
No Pad NoPad The kernel filters only those voxels of the input image which can be filtered correctly without accessing voxels outside the input image. Hence the output image is shrinked by the unfiltered border voxels.
Pad Src Fill PadSrcFill The input image is virtually expanded by a voxel border so that the kernel can filter all input image voxels correctly. These border voxels are filled with Fill Value.
Pad Dst Fill PadDstFill The kernel filters only those voxels of the input image which can be filtered correctly without accessing voxels outside the input image. The unfiltered border voxels are filled with the Fill Value in the output image.
Pad Dst Fill With Orig PadDstFillWithOrig The kernel filters only those voxels of the input image which can be filtered correctly without accessing voxels outside the input image. The unfiltered border voxels are passed to the output image.
Pad Src Undefined PadSrcUndefined The input image is virtually expanded by a voxel border so that the kernel can filter all input image voxels correctly. These border voxels are left undefined.
Pad Dst Undefined PadDstUndefined The kernel filters only those voxels of the input image which can be filtered correctly without accessing voxels outside the input image. The unfiltered border voxels are left undefined in the output image.
Pad Src Clamp PadSrcClamp The input image is virtually expanded by a voxel border so that the kernel can filter all input image voxels correctly. These border voxels are filled with the value of the nearest neighbour voxel.

Fill Value

name: fillValue, type: Double, default: 0

Sets the fill value for certain Border Handling modes.

Dimension

name: dimensionSelect, type: Enum, default: 2D

Defines the dimension this module works on. kernel.

Values:

Title Name Description
2d 2D 2D kernel with extension 3*3*1*1*1*1
3d 3D 3D kernel with extension 3*3*3*1*1*1

2D Neighbourhood

name: neighbourhood2DSelect, type: Enum, default: 4

Defines the 2D neighborhood.

Values:

Title Name Description
4 4 The 4 neighbours are significant for the calculation which are sharing the faces with the considered voxel in x and y dimension.
8 8 The 8 neighbours are significant for the calculation which are sharing the faces and edges with the considered voxel in x and y dimension.

3D Neighbourhood

name: neighbourhood3DSelect, type: Enum, default: 6

Defines the 3D neighborhood.

Values:

Title Name Description
6 6 The 6 neighbours are significant for the calculation which are sharing the faces with the considered voxel in x, y and z dimension.
18 18 The 18 neighbours are significant for the calculation which are sharing the faces and edges with the considered voxel in x, y and z dimension.
26 26 The 26 neighbours are significant for the calculation which are sharing the faces, edges and vertices with the considered voxel in x, y and z dimension.

Border Location

name: borderLocation, type: Enum, default: Inner Border

Defines which border will be calculated and drawn.

Values:

Title Name
Inner Border Inner Border
Outer Border Outer Border
Both Both

Lower Threshold

name: lowerThreshold, type: Double, default: 1

Sets the lower threshold of the grey value interval of the image object which shall be surrounded.

Upper Threshold

name: upperThreshold, type: Double, default: 4095

Sets the upper threshold of the grey value interval of the image object which shall be surrounded.

Outer Border Value

name: outerBorderValue, type: Double, default: 4095

Sets the grey value in which the outer border shall appear.

The Outer Border Value will be use if field Use Max Value is unchecked.

Inner Border Value

name: innerBorderValue, type: Double, default: 2047

Sets the grey value in which the inner border shall appear.

The Inner Border Value will be use if field Use 0.5 * (Max/Min) is unchecked.

Output boundaries only

name: onlyBorder, type: Bool, default: FALSE

If checked, only at the boundaries values will be set, otherwise the values are set to 0.

Use Max Value

name: takeMax, type: Bool, default: TRUE

If checked, the max grey value of the input image is taken as Outer Border Value.

Use 0.5 * (Max/Min)

name: takeMiddle, type: Bool, default: TRUE

If checked, the middle grey value of the input image is taken as Inner Border Value.

Use 2D

name: twoDim, type: Bool, default: TRUE

If checked, the module only works on 2D slices.