ITK Pre-Processing Algorithm Wrappers in Python/OpeningByReconstruction
From FarsightWiki
Opening by Reconstruction Image Filter
Opening by Reconstruction is implemented using the itkOpeningByReconstructionImageFilter class in ITK. This algorithm is different from the morphogical opening. First, the image is subject to normal grayscale erosion. Then, the dilation is performed with reconstruction. The result of applying this filter is the following - small regions of the foreground that cannot contain the structuring element are removed. The shapes of the remaining foreground regions is preserved. Unless the parameter PreserveIntensities is selected, the intensities of the brightest pixels are brought down.
Parameters:
- 1. Radius - this describes the radius of the structuring element used. As of now, the binary ball structuring element is used.
- 2. PreserveIntensities - this is a binary variable, where it takes 1 (for True) and 0 (for False). The assigned true, then the intensities of the foreground regions that are reconstructed are maintained as the original image.
- 3. FullyConnected - this describes the connectedness of the pixels. It is a binary variable with values 1 (for True) and 0 (for False). If FullyConnected is False, then the connectivity of pixels is defined as only face connectivity. This corresponds to the 4-neighbour connectivity for 2-D images and 6-neighbour connectivity for 3-D images. If FullyConnected is chosen to be True, then the connectivity of pixels is defined as face+edge+vertex connectivity. This is also known as 8-neighbour connectivity in 2-D images and 26-neighbour connectivity in 3-D images.