public class DiamondStrel extends AbstractSeparableStrel
LinearDiagDownStrel
,
LinearDiagUpStrel
,
ShiftedCross3x3Strel
Strel.Shape
BACKGROUND, FOREGROUND
Constructor and Description |
---|
DiamondStrel(int size)
Creates a new diamond structuring element of given diameter.
|
DiamondStrel(int size,
int offset)
Creates a new diamond structuring element with a given diameter and 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 DiamondStrel |
fromDiameter(int diam)
Creates a new diamond-shape structuring element with the specified
diameter.
|
static DiamondStrel |
fromRadius(int radius)
Creates a new diamond-shape structuring element with the specified radius
(such that diameter equals 2 * radius + 1).
|
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.
|
SeparableStrel |
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 DiamondStrel(int size)
size
- the diameter of the diamond, that must be oddIllegalArgumentException
- if size is negative or zeroIllegalArgumentException
- if size is evenpublic DiamondStrel(int size, int offset)
size
- the diameter of the diamond, that must be oddoffset
- the position of the reference pointIllegalArgumentException
- if size is negative or zeroIllegalArgumentException
- if size is evenIllegalArgumentException
- if offset is negative or greater than sizepublic static final DiamondStrel fromDiameter(int diam)
diam
- the diameter of the diamondpublic static final DiamondStrel fromRadius(int radius)
radius
- the radius of the diamondpublic int[] getSize()
Strel
public int[][] getMask()
Strel
public int[] getOffset()
Strel
public int[][] getShifts()
Strel
public SeparableStrel reverse()
SeparableStrel
public Collection<InPlaceStrel> decompose()
SeparableStrel
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.