Module: Connected Components ()

Description:

This module searches for connected regions in a 3D image volume. In the case of a gray value image the regions are detected based on thresholding, i.e., a connected region is a set of adjacent voxels with intensity values lying inside a user-defined range. In the case of a label image, i.e., an image where the intensity values represent different materials (tissues or regions), the module looks for connected regions within each label and eventually assigns it new labels. The module is useful for quantifying large numbers of small items in a 3D image volume. If the items provide sufficient contrast to the background and do not touch each other, Connected Components can be used directly with the gray image volume. Otherwise, it is recommended to create a binary image with one of 's segmentation tools. See also the documentation of the Segmentation Editor and the Multi-Thresholding module for details. If the number of connected components is larger than the output data type's data range, the module will issue a warning in the Console and assign the same label to multiple components. In this case, you may want to change the output data type and repeat the computation. Press the Apply button to start the computation.

Connections:

Data [required]
Image data set to be analyzed. Only byte, short, ushort, and integer fields are supported.

Ports:

Info

Once the computation has been performed, this port displays the number of detected regions, the volume of the smallest and the largest region, and the average volume.

Input image

If Gray image is checked, a binary segmentation is performed prior to analyzing connected regions. The segmentation is done according to the intensity range specified in port Intensity. If Label image is checked, voxel values are considered labels and connectivity is analyzed for each label.

Intensity

If port Input image is set to Gray image, voxels with values outside the specified intensity range are considered to be part of the background. This port will be insensitive if in port Input image the Label image option is selected.

Connectivity

This port defines the connectivity type. In the case of Face voxels with a common face are considered connected. In the case of Edge voxels with at least one common edge are considered connected, and, in the case of Corner, voxels with at least one common vertex are considered connected.

Size

Minimal and maximal size in voxels of the regions. Regions smaller or larger than this range are considered part of the background. If Max is zero no upper size limit will be implied.

Result

Output

If Label image is checked, a scalar field will be created. Voxels which were considered to belong to a region are set to some non-zero value, while background voxels are set to zero. Different connected regions will be assigned different values, so that the regions can be visualized using color coding. Depending on the output type (see below) the region labels are not unique if more components are found than are representable with the selected output type. The regions can be visualized in 3D by using e.g., an Isosurface module with threshold 0.5.

If Spreadsheet is checked, a Spreadsheet object will be created, containing a table with the size and position of all detected regions.

Output type

The output type defines the maximum number of labels in the output field. This also corresponds to the maximum number of objects to be detected (excluding background). These are:

Exterior

If preserve is checked, all voxels labeled as background (= 0) in the input label image will be assigned to background in the output image, independent of whether they are connected or not. Otherwise, if multiple regions are found in the backgrond label, the first region encountered will be labeled as background and all others will be assigned non-background labels.

if ignore is checked, voxels labeled as background resp. exterior (voxel value == 0) in the input label image are ignored. No exterior regions are listed in the resulting spreadsheet. This may save a lot of computing time when there are big exterior regions and they can safely be ignored in the output.

This port will be insensitive if in port Input image the Gray image option is selected.