public interface Strel extends Strel3D
// Creates a 5x5 square structuring element
Strel strel = Strel.Shape.SQUARE.fromRadius(2);
// applies dilation on current image
ImageProcessor image = IJ.getImage().getProcessor();
ImageProcessor dilated = strel.dilation(image);
// Display results
new ImagePlus("dilated", dilated).show();
Modifier and Type | Interface and Description |
---|---|
static class |
Strel.Shape
An enumeration of the different possible structuring element shapes.
|
Modifier and Type | Field and Description |
---|---|
static int |
BACKGROUND
Default value for background pixels.
|
static int |
FOREGROUND
Default value for foreground pixels.
|
Modifier and Type | Method and Description |
---|---|
ij.process.ImageProcessor |
closing(ij.process.ImageProcessor image)
Performs a morphological closing of the input image with this structuring
element, and returns the result in a new ImageProcessor.
|
ij.process.ImageProcessor |
dilation(ij.process.ImageProcessor image)
Performs a morphological dilation of the input image with this
structuring element, and returns the result in a new ImageProcessor.
|
ij.process.ImageProcessor |
erosion(ij.process.ImageProcessor image)
Performs an morphological erosion of the input image with this
structuring element, and returns the result in a new ImageProcessor.
|
String |
getChannelName()
Returns the name of the channel currently processed, or null by default.
|
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.
|
ij.process.ImageProcessor |
opening(ij.process.ImageProcessor image)
Performs a morphological opening of the input image with this structuring
element, and returns the result in a new ImageProcessor.
|
Strel |
reverse()
Returns a reversed (i.e.
|
void |
setChannelName(String channelName)
Sets the name of the currently processed channel, for process monitoring.
|
closing, dilation, erosion, getMask3D, getShifts3D, opening, showProgress, showProgress
addAlgoListener, removeAlgoListener
static final int BACKGROUND
static final int FOREGROUND
int[] getSize()
int[][] getMask()
int[] getOffset()
int[][] getShifts()
Strel reverse()
ij.process.ImageProcessor dilation(ij.process.ImageProcessor image)
image
- the input imageerosion(ij.process.ImageProcessor)
,
closing(ij.process.ImageProcessor)
,
opening(ij.process.ImageProcessor)
ij.process.ImageProcessor erosion(ij.process.ImageProcessor image)
image
- the input imagedilation(ij.process.ImageProcessor)
,
closing(ij.process.ImageProcessor)
,
opening(ij.process.ImageProcessor)
ij.process.ImageProcessor closing(ij.process.ImageProcessor image)
image
- the input imagedilation(ij.process.ImageProcessor)
,
erosion(ij.process.ImageProcessor)
,
opening(ij.process.ImageProcessor)
,
reverse()
ij.process.ImageProcessor opening(ij.process.ImageProcessor image)
image
- the input imagedilation(ij.process.ImageProcessor)
,
erosion(ij.process.ImageProcessor)
,
closing(ij.process.ImageProcessor)
,
reverse()
void setChannelName(String channelName)
channelName
- the name of the currently processed channelString getChannelName()
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.