public class BiConvertedRealCursor<A,B,C> extends AbstractConvertedRealCursor<A,C>
| Modifier and Type | Field and Description |
|---|---|
protected C |
converted |
protected Supplier<? extends C> |
convertedSupplier |
protected BiConverter<? super A,? super B,? super C> |
converter |
protected Supplier<BiConverter<? super A,? super B,? super C>> |
converterSupplier |
protected RealCursor<B> |
sourceB |
source| Constructor and Description |
|---|
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 through
get(). |
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 through
get(). |
| Modifier and Type | Method and Description |
|---|---|
BiConvertedRealCursor<A,B,C> |
copy() |
void |
fwd()
Move forward.
|
C |
get()
Access the actual T instance providing access to a pixel,
sub-pixel or integral region value the
Sampler points at. |
C |
getType()
Get an instance of
T. |
boolean |
hasNext()
The correct logic would be to return
sourceA.hasNext() && sourceB.hasNext()
but we test only sourceA for efficiency. |
void |
jumpFwd(long steps)
Move steps × forward.
|
void |
remove() |
void |
reset()
Reset the
Iterator, that is put it to where it would be if newly
created. |
getDoublePosition, getFloatPosition, localize, localize, numDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyCursor, nextlocalize, positionAsDoubleArray, positionAsRealPointforEachRemainingprotected final Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier
protected final BiConverter<? super A,? super B,? super C> converter
protected final RealCursor<B> sourceB
protected final C converted
public BiConvertedRealCursor(RealCursor<A> sourceA, RealCursor<B> sourceB, Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, Supplier<? extends C> convertedSupplier)
get().sourceA - sourceB - converterSupplier - convertedSupplier - public BiConvertedRealCursor(RealCursor<A> sourceA, RealCursor<B> sourceB, BiConverter<? super A,? super B,? super C> converter, Supplier<? extends C> convertedSupplier)
get().sourceA - sourceB - converter - convertedSupplier - public C get()
SamplerSampler points at.public C getType()
TypedT.
It should not be assumed that the returned T instance is an
independent copy. In particular, repeated calls to getType() may
return the same instance.
Tpublic void jumpFwd(long steps)
IteratorHighly recommended to override this with a more efficient version.
jumpFwd in class AbstractConvertedRealCursor<A,C>steps - number of steps to move forwardpublic void fwd()
Iteratorfwd in class AbstractConvertedRealCursor<A,C>public void reset()
IteratorIterator, that is put it to where it would be if newly
created.reset in class AbstractConvertedRealCursor<A,C>public boolean hasNext()
sourceA.hasNext() && sourceB.hasNext()
but we test only sourceA for efficiency. Make sure that sourceA is the
smaller IterableInterval.public void remove()
public BiConvertedRealCursor<A,B,C> copy()
copy in interface RealCursor<C>copy in interface Sampler<C>copy in class AbstractConvertedRealCursor<A,C>Sampler in the same state accessing the same
values.
It does NOT copy T, just the state of the Sampler.
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 an
ArrayCursor for example)Copyright © 2009–2024 ImgLib2. All rights reserved.