public abstract class AbstractStrel extends AbstractStrel3D implements Strel
Strel.Shape
BACKGROUND, FOREGROUND
Constructor and Description |
---|
AbstractStrel() |
Modifier and Type | Method and Description |
---|---|
ij.process.ImageProcessor |
addBorder(ij.process.ImageProcessor image)
Adds a border around the image, to avoid edge effects when performing
morphological closing or opening.
|
ij.process.ImageProcessor |
closing(ij.process.ImageProcessor image)
Performs a morphological closing on the input image, by applying first a
dilation, then an erosion with the reversed structuring element.
|
ij.ImageStack |
closing(ij.ImageStack stack)
Performs a morphological closing on the input stack, by applying first a
dilation, then an erosion with the reversed structuring element.
|
protected static int[][] |
convertMaskToShifts(int[][] mask)
Converts the specified (binary) mask into a series of shifts, assuming
the offset of the mask is located at its center.
|
ij.process.ImageProcessor |
cropBorder(ij.process.ImageProcessor image)
Retrieve the portion of image that corresponds to the original image
before adding border.
|
ij.process.ImageProcessor |
dilation(ij.process.ImageProcessor image)
Implements a default algorithm for dilation, that consists in iterating
over the neighbors of each pixel to compute the maximum value.
|
ij.ImageStack |
dilation(ij.ImageStack stack)
Implements a default algorithm for dilation, that consists in iterating
over the neighbors of each pixel to compute the maximum value.
|
ij.process.ImageProcessor |
erosion(ij.process.ImageProcessor image)
Implements a default algorithm for erosion, that consists in iterating
over the neighbors of each pixel to compute the minimum value.
|
ij.ImageStack |
erosion(ij.ImageStack stack)
Implements a default algorithm for erosion, that consists in iterating
over the neighbors of each pixel to compute the minimum value.
|
String |
getChannelName()
Returns the name of the channel currently processed, or null by default.
|
int[][][] |
getMask3D()
Returns the structuring element as a mask.
|
int[][] |
getShifts3D()
Returns the structuring element as a set of shifts.
|
ij.process.ImageProcessor |
opening(ij.process.ImageProcessor image)
Performs a morphological opening on the input image, by applying first an
erosion, then a dilation with the reversed structuring element.
|
ij.ImageStack |
opening(ij.ImageStack stack)
Performs a morphological opening on the input stack, by applying first an
erosion, then a dilation with the reversed structuring element.
|
void |
setChannelName(String channelName)
Sets the name of the currently processed channel.
|
addBorder, convertMaskToShifts, cropBorder, fireProgressChanged, fireProgressChanged, fireStatusChanged, fireStatusChanged, showProgress, showProgress
addAlgoListener, removeAlgoListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMask, getOffset, getShifts, getSize, reverse
showProgress, showProgress
addAlgoListener, removeAlgoListener
protected static final int[][] convertMaskToShifts(int[][] mask)
mask
- a binary mask as a 2D array (first index is y, second is x)public ij.process.ImageProcessor addBorder(ij.process.ImageProcessor image)
image
- the image to padcropBorder(ImageProcessor)
public ij.process.ImageProcessor cropBorder(ij.process.ImageProcessor image)
ImageProcessor result = strel.cropBorder(strel.addBorder(inputImage));
image
- the image to cropaddBorder(ImageProcessor)
public ij.process.ImageProcessor dilation(ij.process.ImageProcessor image)
getShifts()
method.dilation
in interface Strel
image
- the input imageStrel.getShifts()
,
erosion(ImageProcessor)
public ij.process.ImageProcessor erosion(ij.process.ImageProcessor image)
getShifts()
method.erosion
in interface Strel
image
- the input imageStrel.getShifts()
,
dilation(ImageProcessor)
public ij.process.ImageProcessor closing(ij.process.ImageProcessor image)
closing
in interface Strel
image
- the input imagedilation(ij.process.ImageProcessor)
,
erosion(ij.process.ImageProcessor)
,
opening(ij.process.ImageProcessor)
,
Strel3D.reverse()
public ij.process.ImageProcessor opening(ij.process.ImageProcessor image)
opening
in interface Strel
image
- the input imagedilation(ij.process.ImageProcessor)
,
erosion(ij.process.ImageProcessor)
,
closing(ij.process.ImageProcessor)
,
Strel3D.reverse()
public int[][][] getMask3D()
Strel3D
public int[][] getShifts3D()
Strel3D
getShifts3D
in interface Strel3D
public void setChannelName(String channelName)
setChannelName
in interface Strel
channelName
- the name of the currently processed channelpublic String getChannelName()
getChannelName
in interface Strel
public ij.ImageStack dilation(ij.ImageStack stack)
AbstractStrel3D
getShifts()
method.dilation
in interface Strel3D
dilation
in class AbstractStrel3D
stack
- the input imageStrel3D.getShifts3D()
,
AbstractStrel3D.erosion(ImageStack)
public ij.ImageStack erosion(ij.ImageStack stack)
AbstractStrel3D
getShifts()
method.erosion
in interface Strel3D
erosion
in class AbstractStrel3D
stack
- the input imageStrel3D.getShifts3D()
,
AbstractStrel3D.dilation(ImageStack)
public ij.ImageStack closing(ij.ImageStack stack)
AbstractStrel3D
closing
in interface Strel3D
closing
in class AbstractStrel3D
stack
- the input imageAbstractStrel3D.dilation(ImageStack)
,
AbstractStrel3D.erosion(ImageStack)
,
AbstractStrel3D.opening(ImageStack)
,
Strel3D.reverse()
public ij.ImageStack opening(ij.ImageStack stack)
AbstractStrel3D
opening
in interface Strel3D
opening
in class AbstractStrel3D
stack
- the input imageAbstractStrel3D.dilation(ImageStack)
,
AbstractStrel3D.erosion(ImageStack)
,
AbstractStrel3D.closing(ImageStack)
,
Strel3D.reverse()
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.