Interface IterableRealInterval<T>
-
- Type Parameters:
T
-
- All Superinterfaces:
EuclideanSpace
,java.lang.Iterable<T>
,RealInterval
- All Known Subinterfaces:
Img<T>
,IterableInterval<T>
,NativeImg<T,A>
- All Known Implementing Classes:
AbstractCellImg
,AbstractConvertedIterableInterval
,AbstractConvertedIterableRandomAccessibleInterval
,AbstractImg
,AbstractListImg
,AbstractLongListImg
,AbstractNativeImg
,ARGBScreenImage
,ArrayImg
,ArrayImgAWTScreenImage
,ByteAWTScreenImage
,CellImg
,ConvertedIterableInterval
,DiscreteFrequencyDistribution
,DoubleAWTScreenImage
,FloatAWTScreenImage
,Histogram1d
,HistogramNd
,ImgView
,IntAWTScreenImage
,IntervalView
,IterableRandomAccessibleInterval
,KDTree
,LazyCellImg
,LazyCellImg.LazyCells
,ListImg
,NtreeImg
,PlanarImg
,PointSampleList
,RealPointSampleList
,ShortAWTScreenImage
,UnsignedByteAWTScreenImage
,UnsignedIntAWTScreenImage
,UnsignedShortAWTScreenImage
,WriteConvertedIterableInterval
,WriteConvertedIterableRandomAccessibleInterval
public interface IterableRealInterval<T> extends RealInterval, java.lang.Iterable<T>
f:Rn∈[0,s]→T
A function over real space and a finite set of elements in the target domain T. All target elements T can be accessed through Iterators. There is an iterator that tracks its source location at each move and one that calculates it on request only. Depending on the frequency of requesting the source location, either of them is optimal in terms of speed. Iteration order is constant for an individual
IterableRealInterval
but not further specified.- Author:
- Stephan Saalfeld
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RealCursor<T>
cursor()
Returns aRealCursor
that iterates with optimal speed without calculating the location at each iteration step.T
firstElement()
Get the first element of thisIterableRealInterval
.java.lang.Object
iterationOrder()
Returns the iteration order of thisIterableRealInterval
.RealCursor<T>
localizingCursor()
Returns aRealLocalizable
Iterator
that calculates its location at each iteration step.long
size()
Returns the number of elements in thisFunction
.-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
-
-
-
Method Detail
-
cursor
RealCursor<T> cursor()
Returns a
RealCursor
that iterates with optimal speed without calculating the location at each iteration step. Localization is performed on demand.Use this where localization is required rarely/ not for each iteration.
- Returns:
- fast iterating iterator
-
localizingCursor
RealCursor<T> localizingCursor()
Returns a
RealLocalizable
Iterator
that calculates its location at each iteration step. That is, localization is performed with optimal speed.Use this where localization is required often/ for each iteration.
- Returns:
- fast localizing iterator
-
size
long size()
Returns the number of elements in this
Function
.- Returns:
- number of elements
-
firstElement
T firstElement()
Get the first element of thisIterableRealInterval
. This is a shortcut forcursor().next()
. This can be used to create a new variable of type T usingfirstElement().createVariable()
, which is useful in generic methods to store temporary results, e.g., a running sum over pixels in theIterableRealInterval
.- Returns:
- the first element in iteration order.
-
iterationOrder
java.lang.Object iterationOrder()
Returns the iteration order of thisIterableRealInterval
. If the returned object equals (Object.equals(Object)
) the iteration order of anotherIterableRealInterval
f then they can be copied by synchronous iteration. That is, having anIterator
on this and anotherIterator
on f, moving both in synchrony will point both of them to corresponding locations in their source domain. In other words, this and f have the same iteration order and means and the same number of elements.- Returns:
- the iteration order of this
IterableRealInterval
. - See Also:
FlatIterationOrder
-
-