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
public class LocalizingZeroMinIntervalIterator extends LocalizingIntervalIterator
Use this class to iterate a virtual rectangularInterval
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 aLocalizingZeroMinIntervalIterator
to aPositionable
.... LocalizingZeroMinIntervalIterator i = new LocalizingZeroMinIntervalIterator(image); RandomAccess<T> s = image.randomAccess(); while (i.hasNext()) { i.fwd(); s.setPosition(i); s.type().performOperation(...); ... } ...
LocalizingZeroMinIntervalIterator
is the right choice in situations where, for each pixel, you want to localize and/or set thePositionable
[Sampler
], that is in a dense sampling situation. For localizing sparsely (e.g. under an external condition), useZeroMinIntervalIterator
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
Constructors Constructor Description LocalizingZeroMinIntervalIterator(int[] dimensions)
LocalizingZeroMinIntervalIterator(long[] dimensions)
LocalizingZeroMinIntervalIterator(Interval interval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fwd()
Move forward.void
jumpFwd(long i)
Move steps × forward.void
reset()
Reset theIterator
, that is put it to where it would be if newly created.-
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 Detail
-
LocalizingZeroMinIntervalIterator
public LocalizingZeroMinIntervalIterator(long[] dimensions)
-
LocalizingZeroMinIntervalIterator
public LocalizingZeroMinIntervalIterator(int[] dimensions)
-
LocalizingZeroMinIntervalIterator
public LocalizingZeroMinIntervalIterator(Interval interval)
-
-
Method Detail
-
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
-
-