Package net.imglib2.stream
Interface RealLocalizableSpliterator<T>
-
- Type Parameters:
T- pixel type
- All Superinterfaces:
EuclideanSpace,RealLocalizable,Sampler<T>,java.util.Spliterator<T>,Typed<T>
- All Known Subinterfaces:
LocalizableSpliterator<T>
- All Known Implementing Classes:
ArrayLocalizingSpliterator,ArraySpliterator,CellSpliterator,CursorSpliterator,PlanarSpliterator,RealCursorSpliterator
public interface RealLocalizableSpliterator<T> extends java.util.Spliterator<T>, RealLocalizable, Sampler<T>
ASpliterator<T>which is Localizable similar to a Cursor.The location of the Spliterator reflects the location of the element passed to the
ConsumerinSpliterator.tryAdvance(java.util.function.Consumer<? super T>)orSpliterator.forEachRemaining(java.util.function.Consumer<? super T>)(at the time the element is passed, and until the next element is passed).Similar to
RealCursor,RealLocalizableSpliteratorusually comes in two flavors:IterableRealInterval.spliterator()computes location only on demand, andIterableRealInterval.localizingSpliterator()preemptively tracks location on every step.
To make the
RealLocalizableproperty available in aStream, use theStreamsutility class to createStream<RealLocalizableSampler<T>>(which internally wrapsRealLocalizableSpliterator).Corresponding to the
RealLocalizableSpliteratorflavors,Streams.localizable(IterableRealInterval)computes element location only on demand, andStreams.localizing(IterableRealInterval)tracks location on every step.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.Spliterator
java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,T_CONS extends java.lang.Object,T_SPLITR extends java.util.Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RealLocalizableSpliterator<T>copy()RealLocalizableSpliterator<T>trySplit()-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.RealLocalizable
getDoublePosition, getFloatPosition, localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Method Detail
-
trySplit
RealLocalizableSpliterator<T> trySplit()
- Specified by:
trySplitin interfacejava.util.Spliterator<T>
-
copy
RealLocalizableSpliterator<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)
-
-