Skip to main content
Version: Next

Morphological

The Morphological post processing steps are used to modify the shape and boundaries of classified objects. Examples include fill holes in classified tissue, remove noise, separate merged objects and erode or dilate objects. This section describes what each Morphological step does and how they can be configured.

Erode

The Erode step reduces the size of a label by replacing its boundary with another chosen label. This operation is also known as erosion.

OptionDescription
LabelChoose the label to erode.
WithChoose the label used to replace the eroded label.
PixelsChoose the size of the kernel (convolution matrix) used for erosion. The Erode step uses a circular kernel, where the Pixels setting can be interpreted as the diameter of the circle. Larger values result in greater label reduction.
Apply from image borderToggles whether the image border counts as part of the surrounding label.

Original Image
Image after postprocessing
Image before and after Erosion. Here the green label is being eroded, and Apply from image border is not enabled (Lung fibrosis Tissue).

Dilate

The Dilate step increases the size of a label by extending its boundary outwards with a selected label. This operation is known as dilation.

OptionDescription
Object LabelChoose the label to dilate.
WithChoose the label used to extend the boundary of the dilated label.
PixelsChoose the size of the kernel (convolution matrix) used for dilation. The Dilate step uses a circular kernel where the Pixels setting can be interpreted as the diameter of the circle. Larger values result in greater label increase.
Avoid merging objectsIf enabled, an exclusion distance is applied to prevent objects from merging when their dilation boundaries overlap. This only applies when the overlap occurs between different objects.
Exclude labelsChoose which labels, if any, should not be affected by the dilation.

Original Image
Image after postprocessing
Image before and after Dilation. Here the green label is being dilated, and Avoid merging objects is not enabled (Lung fibrosis Tissue).

Open

The Open step corresponds to an erosion followed by a dilation. This will remove small/thin parts of the label objects.

OptionDescription
LabelChoose a label to open.
WithChoose the label used to replace the opened label.
PixelsChoose how many pixels the label should be opened with.
Apply from image borderToggles whether the image border counts as part of the surrounding label.

Original Image
Image after postprocessing
Image before and after Opening. Here the blue label is opened, and the pink label shows the small/thin part affected by the opening. Apply from image border is not enabled. (Breast P63CK719)

Close

The Close step corresponds to a dilation followed by an erosion. This will smooth the edges and fill small holes within the label objects.

OptionDescription
LabelChoose a label to close.
WithChoose the label used to replace the closed label.
PixelsChoose how many pixels the label should be closed with.
Exclude labelsHighlight one or more labels that should remain uninfluenced by the close step.

Original Image
Image after postprocessing
Image before and after closing. Here the blue label is closed, and the pink label shows the holes and edges that are filled and smoothed by the opening.(Breast P63CK719)

Skeletonize

The Skeletonize step creates a skeleton, which is a line of pixels that follows the centerline of each labeled object. If an object contains appendices or other irregularities, the skeleton branches to follow these structures.

OptionDescription
LabelChoose the label to skeletonize. After skeletonization, the skeleton will have this value.
New labelChoose the label used for replacing the label pixels which are not part of the resulting skeleton.
Branch pointsChoose the label used for the pixels placed where the skeleton branches.
End pointsChoose the label used for the pixels placed where the skeleton ends.
Prune until --- EndpointsToggle on this option to limit the number of endpoints in each object skeleton. Enter the maximum number of endpoints to retain.

Original Image
Objects seperated, no Separate object surroundings
Objects seperated, Separate object surroundings, surroundings width = 3µm
Illustration of a workflow using skeletonization. In the original image (left), the goal is to label the cell membrane (the brown border surrounding each cell) while keeping individual cells separated. The middle image shows the result of skeletonization, where a one-pixel-wide line is generated along the center of the cell membrane label. The image on the right shows a later stage of the analysis, where the skeleton has been used to separate adjacent cells and the cell membrane, cell body, and nuclei have been clearly labeled. (HER2 IHC)

Fill Holes

This Fill Holes step fills all holes within the chosen label.

OptionDescription
Object labelChoose the label whose holes should be filled.
Fill labelChoose the label which should fill the holes.

Original Image
Image after postprocessing
Image before and after the Fill Holes step. Here the label its being filled with to closer all holes.

Separate Objects

The Separate Objects step separates individual objects, that have been merged into one label by a classification. The separation is based on the shape and size of the objects. It is also possible to separate the entire image into regions using the objects as templates.

OptionDescription
Object labelThe label defining the objects to be separated.
Separator labelThe label which should be used as the separating label. This should be a neutral label, not used anywhere else.
Background labelsDefine which label(s) that make(s) up the background.
Object diameterThe approximate mean diameter of the objects to be separated in the image. This parameter should be in the units used. To measure the diameter and set the unit, use the Measure-tool.
Separate object surroundingsIf checked the entire image will be separated into regions using the objects in the chosen label as a template. If unchecked the separation is only done inside the chosen object.
Surroundings widthIf Separate object surroundings is selected this option is available. Define how far out the object boarder can go in units used. This will affect the size of the regions.
Assume that objects are ellipticAssumes that the separated objects are elliptic. If this is not the case and their elliptic score is lower after separation, the objects will stay merged.
Object heatmapUses a chosen feature from the pre-processing step to assist the separation. The feature should enhance edges (in light colors) and the background (in dark colors). The influence is decided by the span of pixel values, where the range from 0-255 should be default and weighs the heatmap and the distance transform equally. If the span is wider the heatmap will have higher influence than the distance transform and vice versa.

Original Image
Image with labels
Objects seperated, no Separate object surroundings
Objects seperated, Separate object surroundings, surroundings width = 3µm
The same tissue is shown 4 times, from left to right: Original Image. Image with labels. Objects separated with 'Separate object surroundings' unchecked. Objects separated with 'Separate object surroundings' checked and 'Surroundings width' = 3 µm. (Lung Tissue Ki67 stain).

Separate by Watershed

This step will separate the object-label between seeds that are defined by the seeds-label. The resulting borders between the seeds are labeled with the separator-label. This is done using a watershed algorithm. The watershed algorithm uses a feature image to grow from the lowest pixel values (darkest) and up towards higher pixel values (bright), using the seeds as starting points. Hence the feature image should be constructed such that the pixels for the seed area have low values and pixels at the borders have high values.

Unlike the Separate Objects step, there is no need to specify object size since the algorithm allows unlimited growth within an object, which can follow irregular shapes.

OptionDescription
SeedsThe label defining the starting points for the watershed algorithm.
ObjectsThe label defining objects to be distributed between seeds.
SeparatorThe label used to replace the borders occurring from the object separation.
FeatureThe feature image used by the watershed algorithm. The pixel values at the borders need to be high (bright), while the pixel values at the seeds needs to be low (dark).

Outline Cells

The Outline cells post processing step will try to outline a given label as if it was a nucleus, by means of interpolation with an already existing membrane label. This step is usually used when the membrane detection has not been good enough. The processing step has four input parameters:

OptionDescription
Object centerDefines the nucleus label.
Outer limitsDefines the membrane label.
Max distanceDefines the maximum distance the outline is allowed to expand (radius from nucleus).
DelimiterDefines the label of the outline.

Circumscribed Rectangle

Circumscribed Rectangle creates the smallest possible rectangle around a given label, whereas inscribed rectangle creates the largest possible rectangle within a given label.

OptionDescription
LabelChoose label of which to find the circumscribed/inscribed rectangle.
CircumscribedChoose the label assigned to the circumscribed rectangle - choose "Don't use" to ignore.
InscribedChoose the label assigned to the inscribed rectangle - choose "Don't use" to ignore.
Allow rotationIf selected the rectangles are allowed to be rotated, otherwise they are always parallel to the sides of the image.

Mark Center of Mass

This post process step finds the given labels center of mass, per object, and marks it with another label. The width parameter is the diameter of the circle that marks the center of mass.

OptionDescription
LabelThe label that will have its center of mass calculated.
Mark withThe label that will mark the point in which the located center of mass is.
WidthThe width of the marked label.