Package net.imglib2
Interface RealRandomAccess<T>
-
- All Superinterfaces:
EuclideanSpace,Positionable,RealLocalizable,RealPositionable,Sampler<T>,Typed<T>
- All Known Subinterfaces:
RealOutOfBounds<T>
- All Known Implementing Classes:
AbstractConvertedRealRandomAccess,BiConvertedRealRandomAccess,ClampingNLinearInterpolatorRealType,ClampingNLinearInterpolatorVolatileARGB,ClampingNLinearInterpolatorVolatileRealType,ConvertedRealRandomAccess,FloorInterpolator,FunctionRealRandomAccessible.RealFunctionRealRandomAccess,InverseDistanceWeightingInterpolator,LanczosInterpolator,LinearRealRandomAccessibleStackInterpolator,Localizables.RealLocationRealRandomAccess,NearestNeighborInterpolator,NearestNeighborRealRandomAccessibleStackInterpolator,NearestNeighborSearchInterpolator,NLinearInterpolator,NLinearInterpolator1D,NLinearInterpolator2D,NLinearInterpolator3D,NLinearInterpolatorARGB,RealOutOfBoundsRealRandomAccess,RealPointSample,RealPositionRealRandomAccessible.RealPositionRealRandomAccess
public interface RealRandomAccess<T> extends RealLocalizable, RealPositionable, Sampler<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description RealRandomAccess<T>copy()default RealRandomAccess<T>copyRealRandomAccess()Deprecated.default TsetPositionAndGet(double... position)Convenience method that moves theRealRandomAccessto the given position and gets the value at that position.default TsetPositionAndGet(float... position)Convenience method that moves theRealRandomAccessto the given position and gets the value at that position.default TsetPositionAndGet(RealLocalizable position)Convenience method that moves theRealRandomAccessto the given position and gets the value at that position.-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Positionable
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
-
Methods inherited from interface net.imglib2.RealLocalizable
getDoublePosition, getFloatPosition, localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
-
Methods inherited from interface net.imglib2.RealPositionable
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
-
-
-
-
Method Detail
-
copyRealRandomAccess
@Deprecated default RealRandomAccess<T> copyRealRandomAccess()
Deprecated.
-
copy
RealRandomAccess<T> copy()
- Specified by:
copyin interfaceSampler<T>- Returns:
- - A new
Samplerin the same state accessing the same values. It does NOT copy T, just the state of theSampler. Otherwise use T.copy() if available. Sampler.copy().get() == Sampler.get(), i.e. both hold the same value, not necessarily the same instance (this is the case for anArrayCursorfor example)
-
setPositionAndGet
default T setPositionAndGet(double... position)
Convenience method that moves theRealRandomAccessto the given position and gets the value at that position. It's a shortcut for:setPosition( position ); get();WARNING: The return value is invalidated by next call to
setPositionAndGet(double...)orRealPositionable.setPosition(net.imglib2.RealLocalizable).// This is wrong!!! a = randomAccess.setPositionAndGet( positionA ); b = randomAccess.setPositionAndGet( positionB ); // this invalidates "a" !!! wrongDifference = a.getRealDouble() - b.getRealDouble(); // Correct: // Use individual RandomAccesses to query a and b a = randomAccess_A.setPositionAndGet( positionA ); b = randomAccess_B.setPositionAndGet( positionB ); // this is fine because a different RandomAccess is used difference = a.getRealDouble() - b.getRealDouble();
-
setPositionAndGet
default T setPositionAndGet(float... position)
Convenience method that moves theRealRandomAccessto the given position and gets the value at that position. It's a shortcut for:setPosition( position ); get();WARNING: The return value is invalidated by next call to
setPositionAndGet(double...)orRealPositionable.setPosition(net.imglib2.RealLocalizable).// This is wrong!!! a = randomAccess.setPositionAndGet( positionA ); b = randomAccess.setPositionAndGet( positionB ); // this invalidates "a" !!! wrongDifference = a.getRealDouble() - b.getRealDouble(); // Correct: // Use individual RandomAccesses to query a and b a = randomAccess_A.setPositionAndGet( positionA ); b = randomAccess_B.setPositionAndGet( positionB ); // this is fine because a different RandomAccess is used difference = a.getRealDouble() - b.getRealDouble();
-
setPositionAndGet
default T setPositionAndGet(RealLocalizable position)
Convenience method that moves theRealRandomAccessto the given position and gets the value at that position. It's a shortcut for:setPosition( position ); get();WARNING: The return value is invalidated by next call to
setPositionAndGet(double...)orRealPositionable.setPosition(net.imglib2.RealLocalizable).// This is wrong!!! a = randomAccess.setPositionAndGet( positionA ); b = randomAccess.setPositionAndGet( positionB ); // this invalidates "a" !!! wrongDifference = a.getRealDouble() - b.getRealDouble(); // Correct: // Use individual RandomAccesses to query a and b a = randomAccess_A.setPositionAndGet( positionA ); b = randomAccess_B.setPositionAndGet( positionB ); // this is fine because a different RandomAccess is used difference = a.getRealDouble() - b.getRealDouble();
-
-