Class Reconstruction

java.lang.Object
inra.ijpb.morphology.Reconstruction
Direct Known Subclasses:
GeodesicReconstruction

public abstract class Reconstruction
extends java.lang.Object

Morphological reconstruction for grayscale or binary images. Most algorithms works for any data type.

This class provides a collection of static methods for commonly used operations, such as border removal or holes filling.

Example of use:


 ImageProcessor mask = IJ.getImage().getProcessor();
 ImageProcessor marker = mask.createProcessor(mask.getWidth(), mask.getHeight());
 marker.set(20, 10, 255); 
 ImageProcessor rec = Reconstruction.reconstructByDilation(marker, mask, 4);
 ImagePlus res = new ImagePlus("Reconstruction", rec);
 res.show(); 
 
Author:
David Legland
See Also:
Reconstruction3D, FloodFill
  • Method Summary

    Modifier and Type Method Description
    static ij.process.ImageProcessor fillHoles​(ij.process.ImageProcessor image)
    Fills the holes in the input image, by (1) inverting the image, (2) performing a morphological reconstruction initialized with inverted image boundary and (3) by inverting the result.
    static ij.process.ImageProcessor killBorders​(ij.process.ImageProcessor image)
    Removes the border of the input image, by performing a morphological reconstruction initialized with image boundary.
    static ij.process.ImageProcessor reconstructByDilation​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask)
    Static method to computes the morphological reconstruction by dilation of the marker image under the mask image.
    static ij.process.ImageProcessor reconstructByDilation​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask, int connectivity)
    Static method to computes the morphological reconstruction by dilation of the marker image under the mask image.
    static ij.process.ImageProcessor reconstructByErosion​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask)
    Static method to computes the morphological reconstruction by erosion of the marker image over the mask image.
    static ij.process.ImageProcessor reconstructByErosion​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask, int connectivity)
    Static method to computes the morphological reconstruction by erosion of the marker image over the mask image.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • killBorders

      public static final ij.process.ImageProcessor killBorders​(ij.process.ImageProcessor image)
      Removes the border of the input image, by performing a morphological reconstruction initialized with image boundary.
      Parameters:
      image - the image to process
      Returns:
      a new image with borders removed
      See Also:
      fillHoles(ImageProcessor)
    • fillHoles

      public static final ij.process.ImageProcessor fillHoles​(ij.process.ImageProcessor image)
      Fills the holes in the input image, by (1) inverting the image, (2) performing a morphological reconstruction initialized with inverted image boundary and (3) by inverting the result.
      Parameters:
      image - the image to process
      Returns:
      a new image with holes filled
      See Also:
      killBorders(ImageProcessor)
    • reconstructByDilation

      public static final ij.process.ImageProcessor reconstructByDilation​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask)
      Static method to computes the morphological reconstruction by dilation of the marker image under the mask image.
      Parameters:
      marker - input marker image
      mask - mask image
      Returns:
      the result of morphological reconstruction
    • reconstructByDilation

      public static final ij.process.ImageProcessor reconstructByDilation​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask, int connectivity)
      Static method to computes the morphological reconstruction by dilation of the marker image under the mask image.
      Parameters:
      marker - input marker image
      mask - mask image
      connectivity - planar connectivity (4 or 8)
      Returns:
      the result of morphological reconstruction
    • reconstructByErosion

      public static final ij.process.ImageProcessor reconstructByErosion​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask)
      Static method to computes the morphological reconstruction by erosion of the marker image over the mask image.
      Parameters:
      marker - input marker image
      mask - mask image
      Returns:
      the result of morphological reconstruction
    • reconstructByErosion

      public static final ij.process.ImageProcessor reconstructByErosion​(ij.process.ImageProcessor marker, ij.process.ImageProcessor mask, int connectivity)
      Static method to computes the morphological reconstruction by erosion of the marker image over the mask image.
      Parameters:
      marker - input marker image
      mask - mask image
      connectivity - planar connectivity (4 or 8)
      Returns:
      the result of morphological reconstruction