Class Reconstruction3D

java.lang.Object
inra.ijpb.morphology.Reconstruction3D

public abstract class Reconstruction3D
extends java.lang.Object

Morphological reconstruction for 8-bits grayscale or binary stacks.

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

Example of use:


 ImageStack mask = IJ.getImage().getStack();
 int bitDepth = mask.getBitDepth();
 ImageStack marker = ImageStack.create(mask.getWidth(), mask.getHeight(), mask.getSize(), bitDepth);
 marker.set(30, 20, 10, 255); 
 ImageStack rec = Reconstruction3D.reconstructByDilation(marker, mask, 6);
 ImagePlus res = new ImagePlus("Reconstruction", rec);
 res.show(); 
 
Author:
David Legland
See Also:
Reconstruction, FloodFill3D
  • Method Summary

    Modifier and Type Method Description
    static ij.ImageStack fillHoles​(ij.ImageStack 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.ImageStack killBorders​(ij.ImageStack image)
    Removes the border of the input image, by performing a morphological reconstruction initialized with image boundary.
    static ij.ImageStack reconstructByDilation​(ij.ImageStack marker, ij.ImageStack mask)
    Static method to computes the morphological reconstruction by dilation of the marker image under the mask image.
    static ij.ImageStack reconstructByDilation​(ij.ImageStack marker, ij.ImageStack mask, int connectivity)
    Static method to computes the morphological reconstruction by dilation of the marker image under the mask image.
    static ij.ImageStack reconstructByDilation​(ij.ImageStack marker, ij.ImageStack mask, int connectivity, ij.ImageStack binaryMask)
    Static method to computes the morphological reconstruction by dilation of the marker image under the mask image, but restricted to a binary mask.
    static ij.ImageStack reconstructByErosion​(ij.ImageStack marker, ij.ImageStack mask)
    Static method to computes the morphological reconstruction by erosion of the marker image over the mask image.
    static ij.ImageStack reconstructByErosion​(ij.ImageStack marker, ij.ImageStack 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.ImageStack killBorders​(ij.ImageStack 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(ImageStack)
    • fillHoles

      public static final ij.ImageStack fillHoles​(ij.ImageStack 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(ImageStack)
    • reconstructByDilation

      public static final ij.ImageStack reconstructByDilation​(ij.ImageStack marker, ij.ImageStack 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 3D morphological reconstruction
    • reconstructByDilation

      public static final ij.ImageStack reconstructByDilation​(ij.ImageStack marker, ij.ImageStack 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 - 3d connectivity (6 or 26)
      Returns:
      the result of 3D morphological reconstruction
    • reconstructByDilation

      public static final ij.ImageStack reconstructByDilation​(ij.ImageStack marker, ij.ImageStack mask, int connectivity, ij.ImageStack binaryMask)
      Static method to computes the morphological reconstruction by dilation of the marker image under the mask image, but restricted to a binary mask.
      Parameters:
      marker - input marker image
      mask - mask image
      connectivity - 3d connectivity (6 or 26)
      binaryMask - binary mask to restrict area of application
      Returns:
      morphological reconstruction by dilation of input image
    • reconstructByErosion

      public static final ij.ImageStack reconstructByErosion​(ij.ImageStack marker, ij.ImageStack 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 3D morphological reconstruction
    • reconstructByErosion

      public static final ij.ImageStack reconstructByErosion​(ij.ImageStack marker, ij.ImageStack 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 - 3d connectivity (6 or 26)
      Returns:
      the result of 3D morphological reconstruction