public class DiamondStrel extends AbstractSeparableStrel
LinearDiagDownStrel,
LinearDiagUpStrel,
ShiftedCross3x3StrelStrel.ShapeBACKGROUND, 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, openingaddBorder, closing, convertMaskToShifts, cropBorder, dilation, erosion, getChannelName, getMask3D, getShifts3D, opening, setChannelNameaddBorder, convertMaskToShifts, cropBorder, fireProgressChanged, fireProgressChanged, fireStatusChanged, fireStatusChanged, showProgress, showProgressaddAlgoListener, removeAlgoListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChannelName, setChannelNameclosing, dilation, erosion, getMask3D, getShifts3D, opening, showProgress, showProgressaddAlgoListener, removeAlgoListenerpublic 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()
Strelpublic int[][] getMask()
Strelpublic int[] getOffset()
Strelpublic int[][] getShifts()
Strelpublic SeparableStrel reverse()
SeparableStrelpublic Collection<InPlaceStrel> decompose()
SeparableStrelCopyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.