Dilate and erode
Description
Applies binary dilate or erode operations to an image in the workspace. Dilate will expand all foreground-labelled regions by a specified number of pixels, while erode will shrink all foreground-labelled regions by the same ammount.This image must be 8-bit and have the logic black foreground (intensity 0) and white background (intensity 255). If 2D operations are applied on higher dimensionality images the operations will be performed in a slice-by-slice manner. All operations (both 2D and 3D) use the plugin "MorphoLibJ".
Parameters
- Input image (default = "") Image from workspace to apply dilate or erode operation to. This must be an 8-bit binary image (255 = background, 0 = foreground).
- Apply to input image (default = "true") When selected, the post-operation image will overwrite the input image in the workspace. Otherwise, the image will be saved to the workspace with the name specified by the "Output image" parameter.
- Output image (default = "") If "Apply to input image" is not selected, the post-operation image will be saved to the workspace with this name. This image will be 8-bit with black minima (intensity 0) on a white background (intensity 255).
- Filter mode (default = "Dilate 3D") Controls what sort of dilate or erode operation is performed on the input image:
- "Dilate 2D" Change any foreground-connected background pixels to foreground. This effectively expands objects by one pixel. Uses ImageJ implementation.
- "Dilate 3D" Change any foreground-connected background pixels to foreground. This effectively expands objects by one pixel. Uses MorphoLibJ implementation.
- "Erode 2D" Change any background-connected foreground pixels to background. This effectively shrinks objects by one pixel. Uses ImageJ implementation.
- "Erode 3D" Change any background-connected foreground pixels to background. This effectively shrinks objects by one pixel. Uses MorphoLibJ implementation.
- Number of iterations (default = "1") Number of times the operation will be run on a single image. Effectively, this allows objects to be dilated or eroded by a specific number of pixels.