Class Cross3x3Strel

All Implemented Interfaces:
Algo, Strel, InPlaceStrel, InPlaceStrel3D, Strel3D

public class Cross3x3Strel
extends AbstractInPlaceStrel
Structuring element representing a 3x3 cross, that considers the center pixels together with the four orthogonal neighbors.
Author:
David Legland
  • Constructor Details

    • Cross3x3Strel

      public Cross3x3Strel()
  • Method Details

    • getSize

      public int[] getSize()
      Description copied from interface: Strel
      Returns the size of the structuring element, as an array of size in each direction. The first index corresponds to the number of pixels in the x direction.
      Returns:
      the size of the structuring element
    • getMask

      public int[][] getMask()
      Description copied from interface: Strel
      Returns the structuring element as a mask. Each value is either 0 or 255. The first index corresponds to the y position, and the second index to the x direction.
      Returns:
      the mask of the structuring element
    • getOffset

      public int[] getOffset()
      Description copied from interface: Strel
      Returns the offset in the mask. The first value corresponds to the shift in the x direction.
      Returns:
      the offset in the mask
    • getShifts

      public int[][] getShifts()
      Description copied from interface: Strel
      Returns the structuring element as a set of shifts. The size of the result is N-by-2, where N is the number of elements of the structuring element. The first value corresponds to the shift in the x direction.
      Returns:
      a set of shifts
    • reverse

      public InPlaceStrel reverse()
      Returns this structuring element, as is is self-reverse.
      Returns:
      the reversed structuring element
      See Also:
      InPlaceStrel.reverse()
    • inPlaceDilation

      public void inPlaceDilation​(ij.process.ImageProcessor image)
      Description copied from interface: InPlaceStrel
      Performs dilation of the image given as argument, and stores the result in the same image.
      Parameters:
      image - the input image to dilate
    • inPlaceErosion

      public void inPlaceErosion​(ij.process.ImageProcessor image)
      Description copied from interface: InPlaceStrel
      Performs erosion of the image given as argument, and stores the result in the same image.
      Parameters:
      image - the input image to erode