public class OctagonStrel extends AbstractSeparableStrel
SquareStrel
Strel.Shape
BACKGROUND, FOREGROUND
Modifier | Constructor and Description |
---|---|
|
OctagonStrel(int size)
Creates a new octagonal structuring element of a given orthogonal
diameter.
|
|
OctagonStrel(int size,
int offset)
Creates a new octagonal structuring element of a given orthogonal
diameter and with a given offset.
|
protected |
OctagonStrel(int squareSize,
int diagSize,
int squareOffset,
int diagOffset)
Creates the octagonal structuring element by specifying both square and
diagonal sizes and offsets.
|
Modifier and Type | Method and Description |
---|---|
Collection<InPlaceStrel> |
decompose()
Returns a decomposition into four structuring elements, corresponding to
horizontal, vertical, and diagonal linear structuring elements.
|
static OctagonStrel |
fromDiameter(int diam)
Creates an octagon-shape structuring element with specified diameter.
|
static OctagonStrel |
fromRadius(int radius)
Creates an octagon-shape structuring element with 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.
|
OctagonStrel |
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 OctagonStrel(int size)
size
- the orthogonal diameter of the octagonpublic OctagonStrel(int size, int offset)
size
- the orthogonal diameter of the octagonoffset
- the position of the reference pixel in each directionIllegalArgumentException
- if size is negative or zeroIllegalArgumentException
- if offset is negative or greater than sizeprotected OctagonStrel(int squareSize, int diagSize, int squareOffset, int diagOffset)
squareSize
- the length of the sides in orthogonal directionsdiagSize
- the length of the sides in diagonal directionssquareOffset
- the offset in orthogonal directionsdiagOffset
- the offset in diagonal directionsIllegalArgumentException
- if a size is negative or zeroIllegalArgumentException
- if an offset is negative or greater than sizepublic static final OctagonStrel fromDiameter(int diam)
diam
- the orthogonal diameter of the octagonpublic static final OctagonStrel fromRadius(int radius)
radius
- the radius of the octagonpublic Collection<InPlaceStrel> decompose()
SeparableStrel.decompose()
,
LinearHorizontalStrel
,
LinearVerticalStrel
,
LinearDiagUpStrel
,
LinearDiagDownStrel
public int[][] getMask()
Strel
public int[][] getShifts()
Strel
public int[] getSize()
Strel
public int[] getOffset()
Strel
public OctagonStrel reverse()
SeparableStrel
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.