T - public class DiamondTipsNeighborhood<T> extends AbstractLocalizable implements Neighborhood<T>
Neighborhood that iterates through the tips of a
multi-dimensional diamond.
Though it has very few direct applications, it is used in structuring element decomposition for mathematical morphology.
| Modifier and Type | Class and Description |
|---|---|
class |
DiamondTipsNeighborhood.LocalCursor |
positionn| Constructor and Description |
|---|
DiamondTipsNeighborhood(long[] position,
long radius,
RandomAccess<T> sourceRandomAccess)
Creates a new diamond tip neighborhood.
|
| Modifier and Type | Method and Description |
|---|---|
DiamondTipsNeighborhood.LocalCursor |
cursor()
Returns a
RealCursor that iterates with optimal speed without
calculating the location at each iteration step. |
long |
dimension(int d)
Default implementation of
Dimensions.dimension(int). |
void |
dimensions(long[] dimensions)
Write the number of pixels in each dimension into long[].
|
static <T> DiamondTipsNeighborhoodFactory<T> |
factory() |
T |
firstElement()
Get the first element of this
IterableRealInterval. |
Interval |
getStructuringElementBoundingBox() |
Object |
iterationOrder()
Returns the iteration order of this
IterableRealInterval. |
Iterator<T> |
iterator() |
DiamondTipsNeighborhood.LocalCursor |
localizingCursor()
Returns a
RealLocalizable Iterator that calculates its
location at each iteration step. |
long |
max(int d)
Get the maximum in dimension d.
|
void |
max(long[] max)
Write the maximum of each dimension into long[].
|
void |
max(Positionable max)
Sets a
Positionable to the maximum of this Interval |
long |
min(int d)
Get the minimum in dimension d.
|
void |
min(long[] min)
Write the minimum of each dimension into long[].
|
void |
min(Positionable min)
Sets a
Positionable to the minimum of this Interval |
void |
realMax(double[] max)
Write the maximum of each dimension into double[].
|
double |
realMax(int d)
Get the maximum in dimension d.
|
void |
realMax(RealPositionable max)
Sets a
RealPositionable to the maximum of this Interval |
void |
realMin(double[] min)
Write the minimum of each dimension into double[].
|
double |
realMin(int d)
Get the minimum in dimension d.
|
void |
realMin(RealPositionable min)
Sets a
RealPositionable to the minimum of this Interval |
long |
size()
Returns the number of elements in this
Function. |
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizenumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratormaxAsLongArray, maxAsPoint, minAsLongArray, minAsPointmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointallPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositivenumDimensionsgetDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, positionAsLongArray, positionAsPointlocalize, localize, localize, positionAsDoubleArray, positionAsRealPointpublic DiamondTipsNeighborhood(long[] position,
long radius,
RandomAccess<T> sourceRandomAccess)
position - the central position of the diamond.radius - the diamond radius in all dimensions.sourceRandomAccess - a RandomAccess on the target source.public static <T> DiamondTipsNeighborhoodFactory<T> factory()
public DiamondTipsNeighborhood.LocalCursor cursor()
IterableRealInterval
Returns a RealCursor that iterates with optimal speed without
calculating the location at each iteration step. Localization is
performed on demand.
Use this where localization is required rarely/ not for each iteration.
cursor in interface IterableInterval<T>cursor in interface IterableRealInterval<T>public DiamondTipsNeighborhood.LocalCursor localizingCursor()
IterableRealInterval
Returns a RealLocalizable Iterator that calculates its
location at each iteration step. That is, localization is performed with
optimal speed.
Use this where localization is required often/ for each iteration.
localizingCursor in interface IterableInterval<T>localizingCursor in interface IterableRealInterval<T>public long size()
IterableRealInterval
Returns the number of elements in this Function.
size in interface IterableRealInterval<T>public T firstElement()
IterableRealIntervalIterableRealInterval. This is a
shortcut for cursor().next().
This can be used to create a new variable of type T using
firstElement().createVariable(), which is useful in generic
methods to store temporary results, e.g., a running sum over pixels in
the IterableRealInterval.firstElement in interface IterableRealInterval<T>public Object iterationOrder()
IterableRealIntervalIterableRealInterval. If the
returned object equals (Object.equals(Object)) the iteration
order of another IterableRealInterval f then they can be
copied by synchronous iteration. That is, having an Iterator on
this and another Iterator on f, moving both in synchrony
will point both of them to corresponding locations in their source
domain. In other words, this and f have the same iteration order
and means and the same number of elements.iterationOrder in interface IterableRealInterval<T>IterableRealInterval.FlatIterationOrderpublic double realMin(int d)
RealIntervalrealMin in interface IntervalrealMin in interface RealIntervald - dimensionpublic void realMin(double[] min)
RealIntervalrealMin in interface RealIntervalpublic void realMin(RealPositionable min)
RealIntervalRealPositionable to the minimum of this IntervalrealMin in interface RealIntervalpublic double realMax(int d)
RealIntervalrealMax in interface IntervalrealMax in interface RealIntervald - dimensionpublic void realMax(double[] max)
RealIntervalrealMax in interface RealIntervalpublic void realMax(RealPositionable max)
RealIntervalRealPositionable to the maximum of this IntervalrealMax in interface RealIntervalpublic long min(int d)
Intervalpublic void min(long[] min)
Intervalpublic void min(Positionable min)
IntervalPositionable to the minimum of this Intervalpublic long max(int d)
Intervalpublic void max(long[] max)
Intervalpublic void max(Positionable max)
IntervalPositionable to the maximum of this Intervalpublic void dimensions(long[] dimensions)
Dimensionsdimensions in interface Dimensionspublic long dimension(int d)
IntervalDimensions.dimension(int).dimension in interface Dimensionsdimension in interface Intervalpublic Interval getStructuringElementBoundingBox()
getStructuringElementBoundingBox in interface Neighborhood<T>Copyright © 2015–2022 ImgLib2. All rights reserved.