- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- org.scijava.ops.image.image.integral.IntegralCursor<T>
-
- All Implemented Interfaces:
Iterator<T>,Cursor<T>,EuclideanSpace,Iterator,Localizable,RealCursor<T>,RealLocalizable,Sampler<T>
public class IntegralCursor<T> extends AbstractEuclideanSpace implements Cursor<T>
A cursor implementation that returns specific corner values ofRectangleNeighborhoods. The cursor returns, for example in 2D, the values at the following positions:- (neighMin, neighMin),
- (neighMax-1, neighMin),
- (neighMax-1, neighMax-1), and
- (neighMin, neighMax-1).
getCornerRepresentation()with 0s encoding (neighMin) and 1s encoding (neighMax-1). The iteration order follows the (binary-reflected) Gray code pattern such that only one dimension of the target position is modified per move.- Author:
- Stefan Helfrich (University of Konstanz)
- See Also:
- http://en.wikipedia.org /wiki/Gray_code
-
-
Field Summary
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Modifier Constructor Description IntegralCursor(RectangleNeighborhood<T> neighborhood)protectedIntegralCursor(IntegralCursor<T> cursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegralCursor<T>copy()IntegralCursor<T>copyCursor()voidfwd()Tget()intgetCornerRepresentation()doublegetDoublePosition(int d)floatgetFloatPosition(int d)intgetIntPosition(int d)longgetLongPosition(int d)booleanhasNext()voidjumpFwd(long steps)voidlocalize(double[] position)voidlocalize(float[] position)voidlocalize(int[] position)voidlocalize(long[] position)Tnext()voidremove()voidreset()-
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.EuclideanSpace
numDimensions
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Methods inherited from interface net.imglib2.Localizable
localize, positionAsLongArray, positionAsPoint
-
Methods inherited from interface net.imglib2.RealLocalizable
localize, positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Constructor Detail
-
IntegralCursor
public IntegralCursor(RectangleNeighborhood<T> neighborhood)
-
IntegralCursor
protected IntegralCursor(IntegralCursor<T> cursor)
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public T next()
-
copy
public IntegralCursor<T> copy()
-
copyCursor
public IntegralCursor<T> copyCursor()
- Specified by:
copyCursorin interfaceCursor<T>- Specified by:
copyCursorin interfaceRealCursor<T>
-
getCornerRepresentation
public int getCornerRepresentation()
-
getFloatPosition
public float getFloatPosition(int d)
- Specified by:
getFloatPositionin interfaceLocalizable- Specified by:
getFloatPositionin interfaceRealLocalizable
-
getDoublePosition
public double getDoublePosition(int d)
- Specified by:
getDoublePositionin interfaceLocalizable- Specified by:
getDoublePositionin interfaceRealLocalizable
-
getIntPosition
public int getIntPosition(int d)
- Specified by:
getIntPositionin interfaceLocalizable
-
getLongPosition
public long getLongPosition(int d)
- Specified by:
getLongPositionin interfaceLocalizable
-
localize
public void localize(long[] position)
- Specified by:
localizein interfaceLocalizable
-
localize
public void localize(float[] position)
- Specified by:
localizein interfaceRealLocalizable
-
localize
public void localize(double[] position)
- Specified by:
localizein interfaceRealLocalizable
-
localize
public void localize(int[] position)
- Specified by:
localizein interfaceLocalizable
-
-