# Closing

Apply the morphological closing operation on a binary mask. The morphological closing of a binary mask $$I$$ is defined as the erosion of the silation of the mask: $$\textrm{Closing}\left(I\right) = \textrm{Erosion}\left(\textrm{Dilation}\left(I\right)\right)$$.

This filter removes small background structures such as holes in the mask. The size of the affected structures is controlled by the shape and size of the kernel.

## Inputs

Type: Image4DBool, Required, Single

## Outputs

#### Out

A binary mask with the same spatial properties as the input mask.

Type: Image4DBool

## Settings

#### Kernel Selection

The shape of the structuring element.

Values: Annulus, Ball, Box, Cross

The radius of the kernel in the X direction, specified in voxels.

The radius of the kernel in the Y direction, specified in voxels.