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
positionFields inherited from class net.imglib2.iterator.IntervalIterator
dimensions, index, lastIndex, stepsFields inherited from class net.imglib2.AbstractInterval
max, minFields 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, localizeMethods inherited from class net.imglib2.iterator.IntervalIterator
create, dimension, dimensions, getIndex, hasNext, toStringMethods inherited from class net.imglib2.AbstractInterval
max, max, max, min, min, min, realMax, realMax, realMax, realMin, realMin, realMinMethods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:IteratorMove forward.- Specified by:
fwdin interfaceIterator- Overrides:
fwdin classLocalizingIntervalIterator
-
jumpFwd
public void jumpFwd(long i) Description copied from interface:IteratorMove steps × forward.- Specified by:
jumpFwdin interfaceIterator- Overrides:
jumpFwdin classLocalizingIntervalIterator- Parameters:
i- number of steps to move forward
-
reset
public void reset()Description copied from interface:IteratorReset theIterator, that is put it to where it would be if newly created.- Specified by:
resetin interfaceIterator- Overrides:
resetin classLocalizingIntervalIterator
-