ITK Pre-Processing Algorithm Wrappers in Python/ClosingByReconstruction

From FarsightWiki
Jump to: navigation, search

Closing by Reconstruction Image Filter

Closing by Reconstruction is implemented using the itkClosingByReconstructionImageFilter class in ITK. This algorithm is different from the morphogical closing. First, the image is subject to normal grayscale dilation. Then, the erosion is performed with reconstruction. The result of applying this filter is the following - small regions of the background image embed within foreground (smaller than the structuring element) are removed. The shapes of the structures are preserved. Unless the parameter PreserveIntensities is selected, the contrast of the dark regions of the image is increased.

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.

Back to main page

Now, we present some examples to show the effect of the various parameters when applying the closing operation (with reconstruction) on the input image seg_orig. Figures 1, 2, and 3 shows the result obtained by applying the filter with the radius of the structuring element to be fixed at 1, 3, and 5, respectively. When the radius is 1, some of the holes in the image are not filled, for example, the one inside the object in the bottom right part of the image. This hole is filled when the radius is increased to 3 or 5. However, as the radius increases, even the gap between different objects starts getting filled ("closed") and this may not be a very desirable. Hence, the radius value should be chosen carefully. Comparison of figures 2 and 4 show the effect of the parameter PreserveIntensities. Figures 2 and 5 show how the switching the FullyConnected parameter affects the output image.

Fig. 1: PreserveIntensites = True, Radius = 1, FullyConnected = True
Fig. 2: PreserveIntensites = True, Radius = 3, FullyConnected = True
Fig. 3: PreserveIntensites = True, Radius = 5, FullyConnected = True
Fig. 4: PreserveIntensites = False, Radius = 3, FullyConnected = True
Fig. 5: PreserveIntensites = True, Radius = 3, FullyConnected = False
Personal tools