public interface IterableInterval<T> extends IterableRealInterval<T>, Interval
IterableRealInterval whose elements are located at integer
coordinates.
An IterableInterval is not guaranteed to iterate over all
coordinates of its containing Interval. In the typical case of a
hyperrectangular image, it will do so; however, there are some
IterableIntervals which visit only a subset of the Interval
coordinates. For example, the imglib2-roi library 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.
| Modifier and Type | Method and Description |
|---|---|
Cursor<T> |
cursor()
Returns a
RealCursor that iterates with optimal speed without
calculating the location at each iteration step. |
Cursor<T> |
localizingCursor()
Returns a
RealLocalizable Iterator that calculates its
location at each iteration step. |
default LocalizableSpliterator<T> |
localizingSpliterator()
Creates a
LocalizableSpliterator over the elements of this IterableInterval. |
default LocalizableSpliterator<T> |
spliterator()
Creates a
LocalizableSpliterator over the elements of this IterableInterval. |
firstElement, getType, iterationOrder, iterator, parallelStream, size, streamdimension, max, max, max, maxAsLongArray, maxAsPoint, min, min, min, minAsLongArray, minAsPoint, realMax, realMinmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMinallPositive, allPositive, dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositivenumDimensionsCursor<T> cursor()
IterableRealInterval
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.
cursor in interface IterableRealInterval<T>Cursor<T> localizingCursor()
IterableRealInterval
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.
localizingCursor in interface IterableRealInterval<T>default LocalizableSpliterator<T> spliterator()
LocalizableSpliterator over the elements of this IterableInterval. The returned Spliterator iterates with optimal
speed without calculating the location at each iteration step.
Localization is performed on demand.
The default implementation wraps a Cursor on the interval. The
created Spliterator reports Spliterator.SIZED, Spliterator.SUBSIZED, Spliterator.ORDERED and Spliterator.NONNULL.
spliterator in interface Iterable<T>spliterator in interface IterableRealInterval<T>default LocalizableSpliterator<T> localizingSpliterator()
LocalizableSpliterator over the elements of this IterableInterval. The returned Spliterator calculates its
location at each iteration step. That is, localization is performed with
optimal speed.
The default implementation wraps a localizing
Cursor on the interval. The created Spliterator reports
Spliterator.SIZED, Spliterator.SUBSIZED, Spliterator.ORDERED and Spliterator.NONNULL.
localizingSpliterator in interface IterableRealInterval<T>Copyright © 2009–2025 ImgLib2. All rights reserved.