Package net.imglib2.img.array
Class AbstractArrayLocalizingCursor<T extends NativeType<T>>
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractLocalizableInt
-
- net.imglib2.AbstractLocalizingCursorInt<T>
-
- net.imglib2.img.array.AbstractArrayLocalizingCursor<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
java.util.Iterator<T>,Cursor<T>,EuclideanSpace,Iterator,Localizable,RealCursor<T>,RealLocalizable,Sampler<T>,Typed<T>
- Direct Known Subclasses:
ArrayLocalizingCursor,ArrayLocalizingSubIntervalCursor
public abstract class AbstractArrayLocalizingCursor<T extends NativeType<T>> extends AbstractLocalizingCursorInt<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayImg<T,?>imgThe underlying sourceArrayImg.protected intlastIndexLast index.protected int[]maxMaximum of theArrayImgin every dimension.protected intoffsetOffset of this cursor.protected intsizeSize of this cursor.protected TtypeAn instance of T.private IndextypeIndex-
Fields inherited from class net.imglib2.AbstractLocalizableInt
position
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractArrayLocalizingCursor(AbstractArrayLocalizingCursor<T> cursor)TODO JavadocAbstractArrayLocalizingCursor(ArrayImg<T,?> img, int offset, int size)TODO Javadoc
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfwd()Move forward.Tget()Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.TgetType()Get an instance ofT.booleanhasNext()Returns true if another step forward is possible.voidjumpFwd(long steps)Move steps × forward.voidreset()Reset theIterator, that is put it to where it would be if newly created.-
Methods inherited from class net.imglib2.AbstractLocalizingCursorInt
copy
-
Methods inherited from class net.imglib2.AbstractLocalizableInt
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.Cursor
copyCursor
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Localizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize, positionAsLongArray, positionAsPoint
-
Methods inherited from interface net.imglib2.RealCursor
next
-
Methods inherited from interface net.imglib2.RealLocalizable
localize, localize, positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Field Detail
-
size
protected final int size
Size of this cursor.
-
offset
protected final int offset
Offset of this cursor.
-
type
protected final T extends NativeType<T> type
An instance of T.
-
typeIndex
private final Index typeIndex
-
img
protected final ArrayImg<T extends NativeType<T>,?> img
The underlying sourceArrayImg.
-
lastIndex
protected final int lastIndex
Last index.
-
max
protected final int[] max
Maximum of theArrayImgin every dimension. This is used to check isOutOfBounds().
-
-
Constructor Detail
-
AbstractArrayLocalizingCursor
protected AbstractArrayLocalizingCursor(AbstractArrayLocalizingCursor<T> cursor)
TODO Javadoc- Parameters:
cursor-
-
-
Method Detail
-
get
public T get()
Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.
-
getType
public T getType()
Description copied from interface:TypedGet an instance ofT.It should not be assumed that the returned
Tinstance is an independent copy. In particular, repeated calls togetType()may return the same instance.- Returns:
- an instance of
T
-
hasNext
public boolean hasNext()
Returns true if another step forward is possible.- Returns:
- true, if there is another step forward is possible, otherwise false
-
fwd
public void fwd()
Move forward.
-
jumpFwd
public void jumpFwd(long steps)
Move steps × forward.Highly recommended to override this with a more efficient version.
- Parameters:
steps- number of steps to move forward
-
reset
public void reset()
Reset theIterator, that is put it to where it would be if newly created.
-
-