Package net.imglib2
Interface Localizable
-
- All Superinterfaces:
EuclideanSpace,RealLocalizable
- All Known Subinterfaces:
Cursor<T>,LocalizableSampler<T>,LocalizableSpliterator<T>,OutOfBounds<T>,RandomAccess<T>,RealOutOfBounds<T>
- All Known Implementing Classes:
AbstractArrayCursor,AbstractArrayLocalizingCursor,AbstractConvertedCursor,AbstractConvertedRandomAccess,AbstractCursor,AbstractCursorInt,AbstractLocalizable,AbstractLocalizableInt,AbstractLocalizingCursor,AbstractLocalizingCursorInt,AbstractLongListImg.LongListCursor,AbstractLongListImg.LongListLocalizingCursor,AbstractLongListImg.LongListRandomAccess,AbstractOutOfBoundsMirror,AbstractOutOfBoundsValue,AbstractProjector2D,AbstractWrappedLocalizable,AbstractWrappedPositionableLocalizable,ArrayCursor,ArrayImgXYByteProjector,ArrayImgXYShortProjector,ArrayLocalizingCursor,ArrayLocalizingSpliterator,ArrayLocalizingSubIntervalCursor,ArrayRandomAccess,ArraySpliterator,ArraySubIntervalCursor,BiConvertedCursor,BiConvertedRandomAccess,BundleView.BundleRandomAccess,CellCursor,CellGrid.CellIntervalsRA,CellLocalizingCursor,CellRandomAccess,CellSpliterator,CompositeView.CompositeRandomAccess,CompositeXYProjector,CompositeXYRandomAccessibleProjector,ConvertedCursor,ConvertedRandomAccess,CursorSpliterator,FullSourceMapMixedRandomAccess,FullSourceMapSlicingRandomAccess,FunctionRandomAccessible.FunctionRandomAccess,FunctionView.FunctionRandomAccess,Grid.CellIntervalsRA,HyperSlice.HyperSliceRandomAccess,HyperSlicesView.HyperSlicesViewRandomAccess,InflateView.InflateRandomAccess,InterleaveView.InterleaveRandomAccess,IntervalIterator,IterableIntervalProjector2D,ListCursor,ListLocalizingCursor,ListRandomAccess,Localizables.LocationRandomAccess,LocalizableSamplerWrapper,LocalizingIntervalIterator,LocalizingZeroMinIntervalIterator,MixedRandomAccess,NtreeCursor,NtreeRandomAccess,OffsetableIntervalIterator,OffsetableLocalizingIntervalIterator,OutOfBoundsBorder,OutOfBoundsConstantValue,OutOfBoundsMirrorDoubleBoundary,OutOfBoundsMirrorExpWindowing,OutOfBoundsMirrorSingleBoundary,OutOfBoundsPeriodic,OutOfBoundsRandomValue,PlanarCursor,PlanarCursor1D,PlanarCursor2D,PlanarImgXYByteProjector,PlanarImgXYShortProjector,PlanarLocalizingCursor,PlanarLocalizingCursor1D,PlanarLocalizingCursor2D,PlanarPlaneSubsetCursor,PlanarPlaneSubsetLocalizingCursor,PlanarRandomAccess,PlanarRandomAccess1D,PlanarSpliterator,Point,PointSample,PointSampleList.PointSampleListCursor,PositionRandomAccessible.PositionRandomAccess,RandomAccessibleIntervalCursor,RandomAccessibleOnRealRandomAccessible.RandomAccessOnRealRandomAccessible,RandomAccessiblePair.RandomAccess,RandomAccessibleProjector2D,SamplingProjector2D,SlicingCursor,SlicingRandomAccess,StackView.DefaultRA,StackView.MoveAllSlicesRA,SubsampleView.SubsampleRandomAccess,TransformRandomAccess,TranslationRandomAccess,Volatile2DRandomAccessibleProjector,WriteConvertedCursor,WriteConvertedRandomAccess,ZeroMinIntervalIterator
public interface Localizable extends RealLocalizable
TheLocalizableinterface can localize itself in an n-dimensional discrete space. Not onlyCursors can use this interface, it might be used by much more classes asRandomAccesss can take anyLocalizableas input for where they should move to.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default doublegetDoublePosition(int d)Return the current position in a given dimension.default floatgetFloatPosition(int d)Return the current position in a given dimension.default intgetIntPosition(int d)Return the current position in a given dimension.longgetLongPosition(int d)Return the current position in a given dimension.default voidlocalize(int[] position)Write the current position into the passed array.default voidlocalize(long[] position)Write the current position into the passed array.default voidlocalize(Positionable position)Write the current position into the passedPositionable.default voidlocalize(RealPositionable position)Write the current position into the passedPositionable.default long[]positionAsLongArray()Allocate and return a long array containing the localizable's position.default PointpositionAsPoint()Allocate and return aPointcontaining the localizable's position.-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.RealLocalizable
localize, localize, positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Method Detail
-
localize
default void localize(int[] position)
Write the current position into the passed array.- Parameters:
position- receives current position, length must be ≥EuclideanSpace.numDimensions()
-
localize
default void localize(long[] position)
Write the current position into the passed array.- Parameters:
position- receives current position, length must be ≥EuclideanSpace.numDimensions()
-
localize
default void localize(Positionable position)
Write the current position into the passedPositionable. Note for developers: This default implementation forwards toPositionable.setPosition(Localizable), so don't do the same there.- Parameters:
position- receives current position,EuclideanSpace.numDimensions()must be ≥EuclideanSpace.numDimensions()
-
localize
default void localize(RealPositionable position)
Description copied from interface:RealLocalizableWrite the current position into the passedPositionable. Note for developers: This default implementation forwards toRealPositionable.setPosition(RealLocalizable), so don't do the same there.- Specified by:
localizein interfaceRealLocalizable- Parameters:
position- receives current positionEuclideanSpace.numDimensions()must be ≥EuclideanSpace.numDimensions()
-
getIntPosition
default int getIntPosition(int d)
Return the current position in a given dimension.- Parameters:
d- dimension- Returns:
- dimension of current position
-
positionAsLongArray
default long[] positionAsLongArray()
Allocate and return a long array containing the localizable's position. Please note that his method allocates a new array each time which introduces notable overhead in both compute and memory. If you query it frequently, you should allocate a dedicated array first and reuse it withlocalize(long[]).- Returns:
- the position
-
positionAsPoint
default Point positionAsPoint()
Allocate and return aPointcontaining the localizable's position. Please note that his method allocates a newPointeach time which introduces notable overhead in both compute and memory. If you query it frequently, you should allocate a dedicatedPointfirst and reuse it withlocalize(Positionable).- Returns:
- the position
-
getLongPosition
long getLongPosition(int d)
Return the current position in a given dimension.- Parameters:
d- dimension- Returns:
- dimension of current position
-
getFloatPosition
default float getFloatPosition(int d)
Description copied from interface:RealLocalizableReturn the current position in a given dimension.- Specified by:
getFloatPositionin interfaceRealLocalizable- Parameters:
d- dimension- Returns:
- dimension of current position
-
getDoublePosition
default double getDoublePosition(int d)
Description copied from interface:RealLocalizableReturn the current position in a given dimension.- Specified by:
getDoublePositionin interfaceRealLocalizable- Parameters:
d- dimension- Returns:
- dimension of current position
-
-