Package net.imglib2.img.array
Class ArrayLocalizingSpliterator<T extends NativeType<T>>
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractLocalizableInt
-
- net.imglib2.img.array.ArrayLocalizingSpliterator<T>
-
- Type Parameters:
T- pixel type
- All Implemented Interfaces:
java.util.Spliterator<T>,EuclideanSpace,Localizable,RealLocalizable,Sampler<T>,LocalizableSpliterator<T>,RealLocalizableSpliterator<T>,Typed<T>
class ArrayLocalizingSpliterator<T extends NativeType<T>> extends AbstractLocalizableInt implements LocalizableSpliterator<T>
LocalizableSpliterator for ArrayImg. Keeps track of 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>>
-
-
Constructor Summary
Constructors Constructor Description ArrayLocalizingSpliterator(ArrayImg<T,?> img, int origin, int fence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcharacteristics()ArrayLocalizingSpliterator<T>copy()longestimateSize()voidforEachRemaining(java.util.function.Consumer<? super T> action)private voidfwd()Tget()Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.TgetType()Get an instance ofT.private voidnextLine()booleantryAdvance(java.util.function.Consumer<? super T> action)ArrayLocalizingSpliterator<T>trySplit()-
Methods inherited from class net.imglib2.AbstractLocalizableInt
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Localizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize, positionAsLongArray, positionAsPoint
-
Methods inherited from interface net.imglib2.RealLocalizable
localize, localize, positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Field Detail
-
img
private final ArrayImg<T extends NativeType<T>,?> img
-
type
private final T extends NativeType<T> type
-
index
private final Index index
-
fence
private final int fence
-
-
Method Detail
-
tryAdvance
public boolean tryAdvance(java.util.function.Consumer<? super T> action)
- Specified by:
tryAdvancein interfacejava.util.Spliterator<T extends NativeType<T>>
-
fwd
private void fwd()
-
forEachRemaining
public void forEachRemaining(java.util.function.Consumer<? super T> action)
- Specified by:
forEachRemainingin interfacejava.util.Spliterator<T extends NativeType<T>>
-
nextLine
private void nextLine()
-
trySplit
public ArrayLocalizingSpliterator<T> trySplit()
- Specified by:
trySplitin interfaceLocalizableSpliterator<T extends NativeType<T>>- Specified by:
trySplitin interfaceRealLocalizableSpliterator<T extends NativeType<T>>- Specified by:
trySplitin interfacejava.util.Spliterator<T extends NativeType<T>>
-
estimateSize
public long estimateSize()
- Specified by:
estimateSizein interfacejava.util.Spliterator<T extends NativeType<T>>
-
characteristics
public int characteristics()
- Specified by:
characteristicsin interfacejava.util.Spliterator<T extends NativeType<T>>
-
copy
public ArrayLocalizingSpliterator<T> copy()
- Specified by:
copyin interfaceLocalizableSpliterator<T extends NativeType<T>>- Specified by:
copyin interfaceRealLocalizableSpliterator<T extends NativeType<T>>- Specified by:
copyin interfaceSampler<T extends NativeType<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)
-
get
public T get()
Description copied from interface:SamplerAccess the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.- Specified by:
getin interfaceSampler<T extends NativeType<T>>
-
getType
public T getType()
Description copied from interface:TypedGet an instance ofT.It should not be assumed that the returned
Tinstance is an independent copy. In particular, repeated calls togetType()may return the same instance.- Specified by:
getTypein interfaceSampler<T extends NativeType<T>>- Specified by:
getTypein interfaceTyped<T extends NativeType<T>>- Returns:
- an instance of
T
-
-