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:
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 Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR> -
Field Summary
FieldsFields inherited from class AbstractLocalizableInt
positionFields inherited from class AbstractEuclideanSpace
nFields inherited from interface Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcopy()longvoidforEachRemaining(Consumer<? super T> action) private voidfwd()get()Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.getType()Get an instance ofT.private voidnextLine()booleantryAdvance(Consumer<? super T> action) trySplit()Methods inherited from class AbstractLocalizableInt
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizeMethods inherited from class AbstractEuclideanSpace
numDimensionsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EuclideanSpace
numDimensionsMethods inherited from interface Localizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize, positionAsLongArray, positionAsPointMethods inherited from interface RealLocalizable
localize, localize, positionAsDoubleArray, positionAsRealPointMethods inherited from interface Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
img
-
type
-
index
-
fence
private final int fence
-
-
Constructor Details
-
ArrayLocalizingSpliterator
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<T extends NativeType<T>>
-
fwd
private void fwd() -
forEachRemaining
- Specified by:
forEachRemainingin interfaceSpliterator<T extends NativeType<T>>
-
nextLine
private void nextLine() -
trySplit
- Specified by:
trySplitin interfaceLocalizableSpliterator<T extends NativeType<T>>- Specified by:
trySplitin interfaceRealLocalizableSpliterator<T extends NativeType<T>>- Specified by:
trySplitin interfaceSpliterator<T extends NativeType<T>>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<T extends NativeType<T>>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<T extends NativeType<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
-
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
-