public class SquareStrel extends AbstractSeparableStrel
OctagonStrel
,
LinearHorizontalStrel
,
LinearVerticalStrel
Strel.Shape
BACKGROUND, FOREGROUND
Constructor and Description |
---|
SquareStrel(int size)
Creates a new square structuring element of a given size.
|
SquareStrel(int size,
int offset)
Creates a new square structuring element of a given size and
with a given offset.
|
Modifier and Type | Method and Description |
---|---|
Collection<InPlaceStrel> |
decompose()
Decompose this separable structuring element into a set of smaller
structuring elements that can be used to accelerate processing.
|
static SquareStrel |
fromDiameter(int diam)
Creates a new square-shape structuring element with the specified diameter
(equal to square side length).
|
static SquareStrel |
fromRadius(int radius)
Creates a new square-shape structuring element with the specified radius.
|
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.
|
SquareStrel |
reverse()
The reversed structuring element of a separable strel is also separable.
|
algoProgressChanged, algoStatusChanged, closing, dilation, erosion, opening
addBorder, closing, convertMaskToShifts, cropBorder, dilation, erosion, getChannelName, getMask3D, getShifts3D, opening, setChannelName
addBorder, convertMaskToShifts, cropBorder, fireProgressChanged, fireProgressChanged, fireStatusChanged, fireStatusChanged, showProgress, showProgress
addAlgoListener, removeAlgoListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChannelName, setChannelName
closing, dilation, erosion, getMask3D, getShifts3D, opening, showProgress, showProgress
addAlgoListener, removeAlgoListener
public SquareStrel(int size)
size
- the length of each side of the squarepublic SquareStrel(int size, int offset)
size
- the length of each side of the squareoffset
- the position of the reference pixel in each directionpublic static final SquareStrel fromDiameter(int diam)
diam
- the side length of the squarepublic static final SquareStrel fromRadius(int radius)
radius
- the radius of the squarepublic Collection<InPlaceStrel> decompose()
SeparableStrel
public int[][] getMask()
Strel
public int[] getOffset()
Strel
public int[][] getShifts()
Strel
public int[] getSize()
Strel
public SquareStrel reverse()
SeparableStrel
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.