Class BiConvertedRealCursor<A,B,C>
java.lang.Object
net.imglib2.converter.AbstractConvertedRealCursor<A,C>
net.imglib2.converter.read.BiConvertedRealCursor<A,B,C>
- All Implemented Interfaces:
Iterator<C>, EuclideanSpace, Iterator, RealCursor<C>, RealLocalizable, Sampler<C>, Typed<C>
TODO
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Cprotected final BiConverter<? super A, ? super B, ? super C> protected final Supplier<BiConverter<? super A, ? super B, ? super C>> protected final RealCursor<B> Fields inherited from class AbstractConvertedRealCursor
source -
Constructor Summary
ConstructorsConstructorDescriptionBiConvertedRealCursor(RealCursor<A> sourceA, RealCursor<B> sourceB, Supplier<BiConverter<? super A, ? super B, ? super C>> converterSupplier, Supplier<? extends C> convertedSupplier) Creates a copy of c for conversion that can be accessed throughget().BiConvertedRealCursor(RealCursor<A> sourceA, RealCursor<B> sourceB, BiConverter<? super A, ? super B, ? super C> converter, Supplier<? extends C> convertedSupplier) Creates a copy of c for conversion that can be accessed throughget(). -
Method Summary
Modifier and TypeMethodDescriptioncopy()voidfwd()Move forward.get()Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.getType()Get an instance ofT.booleanhasNext()The correct logic would be to returnsourceA.hasNext() && sourceB.hasNext()but we test only sourceA for efficiency.voidjumpFwd(long steps) Move steps × forward.voidremove()voidreset()Reset theIterator, that is put it to where it would be if newly created.Methods inherited from class AbstractConvertedRealCursor
getDoublePosition, getFloatPosition, localize, localize, numDimensionsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemainingMethods inherited from interface RealCursor
copyCursor, nextMethods inherited from interface RealLocalizable
localize, positionAsDoubleArray, positionAsRealPoint
-
Field Details
-
converterSupplier
-
converter
-
sourceB
-
convertedSupplier
-
converted
-
-
Constructor Details
-
BiConvertedRealCursor
public BiConvertedRealCursor(RealCursor<A> sourceA, RealCursor<B> sourceB, Supplier<BiConverter<? super A, ? super B, ? super C>> converterSupplier, Supplier<? extends C> convertedSupplier) Creates a copy of c for conversion that can be accessed throughget().- Parameters:
sourceA-sourceB-converterSupplier-convertedSupplier-
-
BiConvertedRealCursor
public BiConvertedRealCursor(RealCursor<A> sourceA, RealCursor<B> sourceB, BiConverter<? super A, ? super B, ? super C> converter, Supplier<? extends C> convertedSupplier) Creates a copy of c for conversion that can be accessed throughget().- Parameters:
sourceA-sourceB-converter-convertedSupplier-
-
-
Method Details
-
get
-
getType
-
jumpFwd
public void jumpFwd(long steps) Description copied from interface:IteratorMove steps × forward.Highly recommended to override this with a more efficient version.
-
fwd
-
reset
-
hasNext
public boolean hasNext()The correct logic would be to returnsourceA.hasNext() && sourceB.hasNext()but we test only sourceA for efficiency. Make sure that sourceA is the smallerIterableInterval. -
remove
-
copy
- Specified by:
copyin interfaceRealCursor<A>- Specified by:
copyin interfaceSampler<A>- Specified by:
copyin classAbstractConvertedRealCursor<A,C> - 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)
-