Interface IterableInterval<T>
-
- All Superinterfaces:
Dimensions,EuclideanSpace,Interval,java.lang.Iterable<T>,IterableRealInterval<T>,RealInterval,Typed<T>
- All Known Subinterfaces:
Img<T>,NativeImg<T,A>,RandomAccessibleInterval<T>,SubIntervalIterable<T>
- All Known Implementing Classes:
AbstractCellImg,AbstractConvertedIterableInterval,AbstractConvertedIterableRandomAccessibleInterval,AbstractConvertedRandomAccessibleInterval,AbstractImg,AbstractListImg,AbstractLongListImg,AbstractNativeImg,ARGBScreenImage,ArrayImg,ArrayImgAWTScreenImage,BiConvertedIterableInterval,BiConvertedRandomAccessibleInterval,ByteAWTScreenImage,CellGrid.CellIntervals,CellImg,CompositeIntervalView,ConvertedIterableInterval,ConvertedRandomAccessibleInterval,DiscreteFrequencyDistribution,DoubleAWTScreenImage,FloatAWTScreenImage,Grid.CellIntervals,Histogram1d,HistogramNd,ImgView,IntAWTScreenImage,IntervalView,IterableRandomAccessibleInterval,IterableTransformBuilder.IterableIntervalView,IterableTransformBuilder.Slice,IterableTransformBuilder.SubInterval,LazyCellImg,LazyCellImg.LazyCells,ListImg,NtreeImg,PlanarImg,PointSampleList,ShortAWTScreenImage,StackView,SubsampleIntervalView,UnsignedByteAWTScreenImage,UnsignedIntAWTScreenImage,UnsignedShortAWTScreenImage,WriteConvertedIterableInterval,WriteConvertedIterableRandomAccessibleInterval,WriteConvertedRandomAccessibleInterval
public interface IterableInterval<T> extends IterableRealInterval<T>, Interval
AnIterableRealIntervalwhose elements are located at integer coordinates.An
IterableIntervalis not guaranteed to iterate over all coordinates of its containingInterval. In the typical case of a hyperrectangular image, it will do so; however, there are someIterableIntervals which visit only a subset of theIntervalcoordinates. For example, theimglib2-roilibrary provides means to model regions of interest (ROIs), along with the ability to iterate over coordinates within a particular ROI; see e.g.net.imglib2.roi.labeling.LabelRegion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Cursor<T>cursor()Returns aRealCursorthat iterates with optimal speed without calculating the location at each iteration step.Cursor<T>localizingCursor()Returns aRealLocalizableIteratorthat calculates its location at each iteration step.default LocalizableSpliterator<T>localizingSpliterator()Creates aLocalizableSpliteratorover the elements of thisIterableInterval.default LocalizableSpliterator<T>spliterator()Creates aLocalizableSpliteratorover the elements of thisIterableInterval.-
Methods inherited from interface net.imglib2.Dimensions
dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPoint
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Interval
dimension, max, max, max, maxAsLongArray, maxAsPoint, min, min, min, minAsLongArray, minAsPoint, realMax, realMin
-
Methods inherited from interface net.imglib2.IterableRealInterval
firstElement, getType, iterationOrder, iterator, parallelStream, size, stream
-
Methods inherited from interface net.imglib2.RealInterval
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMin
-
-
-
-
Method Detail
-
cursor
Cursor<T> cursor()
Description copied from interface:IterableRealIntervalReturns a
RealCursorthat 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.
- Specified by:
cursorin interfaceIterableRealInterval<T>- Returns:
- fast iterating iterator
-
localizingCursor
Cursor<T> localizingCursor()
Description copied from interface:IterableRealIntervalReturns a
RealLocalizableIteratorthat 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.
- Specified by:
localizingCursorin interfaceIterableRealInterval<T>- Returns:
- fast localizing iterator
-
spliterator
default LocalizableSpliterator<T> spliterator()
Creates aLocalizableSpliteratorover the elements of thisIterableInterval. The returnedSpliteratoriterates with optimal speed without calculating the location at each iteration step. Localization is performed on demand.The default implementation wraps a
Cursoron the interval. The createdSpliteratorreportsSpliterator.SIZED,Spliterator.SUBSIZED,Spliterator.ORDEREDandSpliterator.NONNULL.- Specified by:
spliteratorin interfacejava.lang.Iterable<T>- Specified by:
spliteratorin interfaceIterableRealInterval<T>
-
localizingSpliterator
default LocalizableSpliterator<T> localizingSpliterator()
Creates aLocalizableSpliteratorover the elements of thisIterableInterval. The returnedSpliteratorcalculates its location at each iteration step. That is, localization is performed with optimal speed.The default implementation wraps a
localizingCursoron the interval. The createdSpliteratorreportsSpliterator.SIZED,Spliterator.SUBSIZED,Spliterator.ORDEREDandSpliterator.NONNULL.- Specified by:
localizingSpliteratorin interfaceIterableRealInterval<T>
-
-