Package inra.ijpb.morphology.strel
Class Cross3x3Strel
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.morphology.strel.AbstractStrel3D
inra.ijpb.morphology.strel.AbstractStrel
inra.ijpb.morphology.strel.AbstractInPlaceStrel
inra.ijpb.morphology.strel.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
-
Nested Class Summary
Nested classes/interfaces inherited from interface inra.ijpb.morphology.Strel
Strel.Shape
Nested classes/interfaces inherited from interface inra.ijpb.morphology.Strel3D
Strel3D.Shape
-
Field Summary
Fields inherited from interface inra.ijpb.morphology.Strel
BACKGROUND, FOREGROUND
Fields inherited from interface inra.ijpb.morphology.Strel3D
BACKGROUND, FOREGROUND
-
Constructor Summary
Constructors Constructor Description Cross3x3Strel()
-
Method Summary
Modifier and Type Method Description int[][]
getMask()
Returns the structuring element as a mask.int[]
getOffset()
Returns the offset in the mask.int[][]
getShifts()
Returns the structuring element as a set of shifts.int[]
getSize()
Returns the size of the structuring element, as an array of size in each direction.void
inPlaceDilation(ij.process.ImageProcessor image)
Performs dilation of the image given as argument, and stores the result in the same image.void
inPlaceErosion(ij.process.ImageProcessor image)
Performs erosion of the image given as argument, and stores the result in the same image.InPlaceStrel
reverse()
Returns this structuring element, as is is self-reverse.Methods inherited from class inra.ijpb.morphology.strel.AbstractInPlaceStrel
closing, closing, dilation, dilation, erosion, erosion, inPlaceDilation, inPlaceErosion, opening, opening
Methods inherited from class inra.ijpb.morphology.strel.AbstractStrel
addBorder, cropBorder, getChannelName, getMask3D, getShifts3D, setChannelName
Methods inherited from class inra.ijpb.morphology.strel.AbstractStrel3D
addBorder, cropBorder, showProgress, showProgress
Methods inherited from class inra.ijpb.algo.AlgoStub
addAlgoListener, removeAlgoListener
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface inra.ijpb.algo.Algo
addAlgoListener, removeAlgoListener
Methods inherited from interface inra.ijpb.morphology.Strel
getChannelName, setChannelName
Methods inherited from interface inra.ijpb.morphology.Strel3D
getMask3D, getShifts3D, showProgress, showProgress
-
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
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
-