11.44. ITK Label Contour Image Filter

From a label image, keeps only the boundary pixels of each labeled region.

Group (Subgroup)

ITKImageLabel (ImageLabel)

Description

This filter takes a label image (one where each region has a unique integer value) and keeps only the pixels that lie on the contour (outer boundary) of each labeled region. Object pixels are those whose value differs from the Background Value. Pixels that sit on a region’s border keep their original label, while all interior pixels are set to the Background Value. The result is an outline of every region, with each outline retaining the label of the region it bounds.

Use this filter when you need the edges of segmented regions — for example to overlay region boundaries on an image or to measure perimeters — rather than the filled regions themselves.

Parameter Guidance

  • Background Value — the pixel value treated as background. Any pixel equal to this value is ignored, and interior (non-boundary) object pixels are reset to it. The default is 0.

  • Fully Connected — controls connectivity. Off uses face-only connectivity. On uses face+edge+corner connectivity, which produces thicker contours. Turn this On for objects that are 1 pixel wide or that connect along diagonals.

Required Input Sources

A label image (cell data on an Image Geometry), such as the output of the ITK Connected Component Image Filter or a segmentation filter.

Input Parameter(s)

Parameter Name

Parameter Type

Parameter Notes

Description

Fully Connected

Bool

Set/Get whether the connected components are defined strictly by face connectivity or by face+edge+vertex connectivity. Default is FullyConnectedOff. NOTE For objects that are 1 pixel wide, use FullyConnectedOn.

Background Value

Scalar Value

Float64

Set/Get the background value used to identify the objects and mark the pixels not on the border of the objects.

Input Cell Data

Parameter Name

Parameter Type

Parameter Notes

Description

Image Geometry

Geometry Selection

Image

Select the Image Geometry Group from the DataStructure.

Input Cell Data

Array Selection

Allowed Types: int8, uint8, int16, uint16, int32, uint32, int64, uint64

The image data that will be processed by this filter.

Output Cell Data

Parameter Name

Parameter Type

Parameter Notes

Description

Output Cell Data

DataObjectName

The result of the processing will be stored in this Data Array inside the same group as the input data.

See Also

Example Pipelines

DREAM3D-NX Help

If you need help, need to file a bug report or want to request a new feature, please head over to the DREAM3DNX-Issues GitHub site where the community of DREAM3D-NX users can help answer your questions.