Back to module list
Binary operations 2D
Description
Applies stock ImageJ binary operations to an image in the workspace. This image must be 8-bit and have the logic black foreground (intensity 0) and white background (intensity 255). All operations are performed in 2D, with higher dimensionality stacks being processed slice-by-slice.
Parameters
- Input image (default = "") Image from workspace to apply binary 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.
- Filter mode (default = "Dilate") Controls which binary operation will be applied. All operations assume the default ImageJ logic of black objects on a white background. The operations are described in full at [WEBSITE]:
- "Dilate" Change any foreground-connected background pixels to foreground. This effectively expands objects by one pixel.
- "Distance map" Create a 32-bit greyscale image where the value of each foreground pixel is equal to its Euclidean distance to the nearest background pixel.
- "Erode" Change any background-connected foreground pixels to background. This effectively shrinks objects by one pixel.
- "Fill holes" Change all background pixels in a region which is fully enclosed by foreground pixels to foreground.
- "Outline" Convert all non-background-connected foreground pixels to background. This effectively creates a fully-background image, except for the outer band of foreground pixels.
- "Skeletonise" Repeatedly applies the erode process until each foreground region is a single pixel wide.
- "Ultimate points" Repeatedly applies the erode process until each foreground is reduced to a single pixel. The value of the remaining, isolated foreground pixels are equal to their equivalent, pre-erosion distance map values. This process outputs a 32-bit greyscale image.
- "Voronoi" Creates an image subdivided by lines such that all pixels contained within an enclosed region are closest to the same contiguous object in the input binary image.
- "Watershed" Peforms a distance-based watershed transform on the image. This process is able to split separate regions of a single connected foreground region as long as the sub-regions are connected by narrow necks (e.g. snowman shape). Background lines are drawn between each sub-region such that they are no longer connected.
- Number of iterations (default = "1") Number of times the operation will be run on a single image. For example, this allows objects to be eroded further than one pixel in a single step.
- Count (default = "1") The minimum number of connected background or foreground for an erosion or dilation process to occur, respectively.