Package net.imglib2.iterator
Class LocalizingZeroMinIntervalIterator
java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.AbstractInterval
net.imglib2.iterator.IntervalIterator
net.imglib2.iterator.LocalizingIntervalIterator
net.imglib2.iterator.LocalizingZeroMinIntervalIterator
- All Implemented Interfaces:
Dimensions
,EuclideanSpace
,Interval
,Iterator
,Localizable
,RealInterval
,RealLocalizable
Use this class to iterate a virtual rectangular
Interval
whose
min coordinates are at 0n in flat order, that
is: row by row, plane by plane, cube by cube, ... This is useful for
iterating an arbitrary interval in a defined order. For that, connect a
LocalizingZeroMinIntervalIterator
to a Positionable
.
...
LocalizingZeroMinIntervalIterator i = new LocalizingZeroMinIntervalIterator(image);
RandomAccess<T> s = image.randomAccess();
while (i.hasNext()) {
i.fwd();
s.setPosition(i);
s.type().performOperation(...);
...
}
...
Note that LocalizingZeroMinIntervalIterator
is the right choice in
situations where, for each pixel, you want to localize and/or set
the Positionable
[Sampler
], that is in a dense sampling
situation. For localizing sparsely (e.g. under an external condition), use
ZeroMinIntervalIterator
instead.- Author:
- Stephan Preibisch, Stephan Saalfeld
-
Field Summary
Fields inherited from class net.imglib2.iterator.LocalizingIntervalIterator
position
Fields inherited from class net.imglib2.iterator.IntervalIterator
dimensions, index, lastIndex, steps
Fields inherited from class net.imglib2.AbstractInterval
max, min
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
Constructor Summary
ConstructorsConstructorDescriptionLocalizingZeroMinIntervalIterator
(int[] dimensions) LocalizingZeroMinIntervalIterator
(long[] dimensions) LocalizingZeroMinIntervalIterator
(Interval interval) -
Method Summary
Methods inherited from class net.imglib2.iterator.LocalizingIntervalIterator
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize
Methods inherited from class net.imglib2.iterator.IntervalIterator
create, dimension, dimensions, getIndex, hasNext, toString
Methods inherited from class net.imglib2.AbstractInterval
max, max, max, min, min, min, realMax, realMax, realMax, realMin, realMin, realMin
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Constructor Details
-
LocalizingZeroMinIntervalIterator
public LocalizingZeroMinIntervalIterator(long[] dimensions) -
LocalizingZeroMinIntervalIterator
public LocalizingZeroMinIntervalIterator(int[] dimensions) -
LocalizingZeroMinIntervalIterator
-
-
Method Details
-
fwd
public void fwd()Description copied from interface:Iterator
Move forward.- Specified by:
fwd
in interfaceIterator
- Overrides:
fwd
in classLocalizingIntervalIterator
-
jumpFwd
public void jumpFwd(long i) Description copied from interface:Iterator
Move steps × forward.- Specified by:
jumpFwd
in interfaceIterator
- Overrides:
jumpFwd
in classLocalizingIntervalIterator
- Parameters:
i
- number of steps to move forward
-
reset
public void reset()Description copied from interface:Iterator
Reset theIterator
, that is put it to where it would be if newly created.- Specified by:
reset
in interfaceIterator
- Overrides:
reset
in classLocalizingIntervalIterator
-