Surround

MLModule

genre

Contour

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

MLKernel

definition

MLKernel.def

see also

IntervalThreshold

keywords

Intervall, Threshold, Border, Boundary, Outline, Contour

Purpose

The module Surround calculates the boundaries of an image object whose gray values are in a defined gray 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 module with a preprocessed image. Enter a Lower Threshold and Upper Threshold to define the gray 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 that differs broadly from the rest of the gray values of the input image.

The border will change its appearance in dependence of the chosen dimension and neighborhood. 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

Field Index

2D Neighborhood: Enum

Outer Border Value: Double

3D Neighborhood: Enum

Output boundaries only: Bool

Border Handling: Enum

Upper Threshold: Double

Border Location: Enum

Use (max - min) / 2: Bool

Dimension: Enum

Use 2D: Bool

Fill Value: Double

Use max: Bool

Inner Border Value: Double

Lower Threshold: Double

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 neighbor 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.

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 Neighborhood

name: neighbourhood2DSelect, type: Enum, default: 4

Defines the 2D neighborhood.

Values:

Title

Name

Description

​4

​4

​The four neighbors are significant for the calculation, as they share faces with the considered voxel in the x and y dimensions.

​8

​8

​The eight neighbors are significant for the calculation, as they share faces and edges with the considered voxel in the x and y dimensions.

3D Neighborhood

name: neighbourhood3DSelect, type: Enum, default: 6

Defines the 3D neighborhood.

Values:

Title

Name

Description

​6

​6

​The six neighbors are significant for the calculation, as they share faces and edges with the considered voxel in the x, y, and z dimensions.

​18

​18

​The 18 neighbors are significant for the calculation, as they share faces and edges with the considered voxel in the x, y, and z dimensions.

​26

​26

​The 26 neighbors are significant for the calculation, as they share faces and edges with the considered voxel in the x, y, and z dimensions.

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 gray value interval of the image object which shall be surrounded.

Upper Threshold

name: upperThreshold, type: Double, default: 4095

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

Outer Border Value

name: outerBorderValue, type: Double, default: 1

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

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

Inner Border Value

name: innerBorderValue, type: Double, default: 1

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

The Inner Border Value will be use if field Use (max - min) / 2 is unchecked.

Output boundaries only

name: onlyBorder, type: Bool, default: TRUE

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

Use max

name: takeMax, type: Bool, default: FALSE

If checked, the maximum gray value of the input image is taken as Outer Border Value.

Use (max - min) / 2

name: takeMiddle, type: Bool, default: FALSE

If checked, the middle gray 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.