Package net.imglib2.img.array
Class AbstractArrayCursor<T extends NativeType<T>>
java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.AbstractCursorInt<T>
net.imglib2.img.array.AbstractArrayCursor<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
Iterator<T>
,Cursor<T>
,EuclideanSpace
,Iterator
,Localizable
,RealCursor<T>
,RealLocalizable
,Sampler<T>
- Direct Known Subclasses:
ArrayCursor
,ArraySubIntervalCursor
- Author:
- Stephan Preibisch, Stephan Saalfeld, Christian Dietz, Tobias Pietzsch
-
Field Summary
FieldsModifier and TypeFieldDescriptionSource imageprotected final int
Last indexprotected final int
Offset of this cursorprotected final int
Size of this cursorprotected final T
An instance of TFields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractArrayCursor
(AbstractArrayCursor<T> cursor) TODO JavadocAbstractArrayCursor
(ArrayImg<T, ?> img, int offset, int size) TODO Javadoc -
Method Summary
Modifier and TypeMethodDescriptionvoid
fwd()
Move forward.get()
Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSampler
points at.int
getIntPosition
(int dim) Return the current position in a given dimension.boolean
hasNext()
Returns true if another step forward is possible.void
jumpFwd
(long steps) Highly recommended to override this with a more efficient version.void
localize
(int[] position) Write the current position into the passed array.void
reset()
Reset theIterator
, that is put it to where it would be if newly created.toString()
Methods inherited from class net.imglib2.AbstractCursorInt
copy, copyCursor, getDoublePosition, getFloatPosition, getLongPosition, localize, localize, localize, next, remove
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
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
offset
protected final int offsetOffset of this cursor -
size
protected final int sizeSize of this cursor -
type
An instance of T -
img
Source image -
lastIndex
protected final int lastIndexLast index
-
-
Constructor Details
-
AbstractArrayCursor
TODO Javadoc- Parameters:
cursor
-
-
AbstractArrayCursor
TODO Javadoc- Parameters:
img
-offset
-size
-
-
-
Method Details
-
get
Description copied from interface:Sampler
Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSampler
points at. -
hasNext
public boolean hasNext()Description copied from interface:Iterator
Returns true if another step forward is possible.- Returns:
- true, if there is another step forward is possible, otherwise false
-
jumpFwd
public void jumpFwd(long steps) Description copied from class:AbstractCursorInt
Highly recommended to override this with a more efficient version.- Specified by:
jumpFwd
in interfaceIterator
- Overrides:
jumpFwd
in classAbstractCursorInt<T extends NativeType<T>>
- Parameters:
steps
- number of steps to move forward
-
fwd
public void fwd()Description copied from interface:Iterator
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. -
toString
- Overrides:
toString
in classAbstractCursorInt<T extends NativeType<T>>
-
getIntPosition
public int getIntPosition(int dim) Description copied from interface:Localizable
Return the current position in a given dimension.- Parameters:
dim
- dimension- Returns:
- dimension of current position
-
localize
public void localize(int[] position) Description copied from interface:Localizable
Write the current position into the passed array.- Parameters:
position
- receives current position
-