T
- pixel type of sourceS
- source typepublic class PositionableWrappedIterableInterval<T,S extends IterableInterval<T>> extends PositionableInterval implements PositionableIterableInterval<T>
IterableInterval
Positionable
by wrapping its cursors
with an offset.Modifier and Type | Field and Description |
---|---|
protected S |
source |
currentOffset, initialMax, initialMin
position
n
Modifier | Constructor and Description |
---|---|
protected |
PositionableWrappedIterableInterval(PositionableWrappedIterableInterval<T,S> other) |
|
PositionableWrappedIterableInterval(S source) |
Modifier and Type | Method and Description |
---|---|
PositionableWrappedIterableInterval<T,S> |
copy()
Make a copy of this
PositionableIterableInterval which can be
positioned independently. |
Cursor<T> |
cursor()
Returns a
RealCursor that iterates with optimal speed without
calculating the location at each iteration step. |
T |
firstElement()
Get the first element of this
IterableRealInterval . |
Object |
iterationOrder()
Returns the iteration order of this
IterableRealInterval . |
Iterator<T> |
iterator() |
Cursor<T> |
localizingCursor()
Returns a
RealLocalizable Iterator that calculates its
location at each iteration step. |
long |
size()
Returns the number of elements in this
Function . |
bck, dimension, dimensions, fwd, max, max, max, min, min, min, move, move, move, move, move, origin, realMax, realMax, realMax, realMin, realMin, realMin, setPosition, setPosition, setPosition, setPosition, setPosition, toString
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
origin
forEach, spliterator
dimension, max, max, max, maxAsLongArray, maxAsPoint, min, min, min, minAsLongArray, minAsPoint, realMax, realMin
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMin
allPositive, allPositive, dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositive
numDimensions
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, positionAsLongArray, positionAsPoint
localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
protected final S extends IterableInterval<T> source
public PositionableWrappedIterableInterval(S source)
protected PositionableWrappedIterableInterval(PositionableWrappedIterableInterval<T,S> other)
public long size()
IterableRealInterval
Returns the number of elements in this Function
.
size
in interface IterableRealInterval<T>
public T firstElement()
IterableRealInterval
IterableRealInterval
. 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()
IterableRealInterval
IterableRealInterval
. 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
.FlatIterationOrder
public Cursor<T> 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 Cursor<T> 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 PositionableWrappedIterableInterval<T,S> copy()
PositionableIterableInterval
PositionableIterableInterval
which can be
positioned independently.copy
in interface PositionableIterableInterval<T>
Copyright © 2015–2022 ImgLib2. All rights reserved.