Package net.imglib2.converter.read
Class ConvertedRandomAccess<A,B>
- java.lang.Object
-
- net.imglib2.converter.AbstractConvertedRandomAccess<A,B>
-
- net.imglib2.converter.read.ConvertedRandomAccess<A,B>
-
- All Implemented Interfaces:
EuclideanSpace,Localizable,Positionable,RandomAccess<B>,RealLocalizable,Sampler<B>,Typed<B>
public final class ConvertedRandomAccess<A,B> extends AbstractConvertedRandomAccess<A,B>
TODO
-
-
Field Summary
Fields Modifier and Type Field Description private Bconvertedprivate java.util.function.Supplier<? extends B>convertedSupplierprivate Converter<? super A,? super B>converterprivate java.util.function.Supplier<Converter<? super A,? super B>>converterSupplier-
Fields inherited from class net.imglib2.converter.AbstractConvertedRandomAccess
source
-
-
Constructor Summary
Constructors Constructor Description ConvertedRandomAccess(RandomAccess<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<? extends B> convertedSupplier)Creates a copy of b for conversion that can be accessed throughget().ConvertedRandomAccess(RandomAccess<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<? extends B> convertedSupplier)Use this constructor for stateless functions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConvertedRandomAccess<A,B>copy()Bget()Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.BgetType()Get an instance ofT.-
Methods inherited from class net.imglib2.converter.AbstractConvertedRandomAccess
bck, fwd, getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize, move, move, move, move, move, numDimensions, setPosition, setPosition, setPosition, setPosition, setPosition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.Localizable
localize, localize, positionAsLongArray, positionAsPoint
-
Methods inherited from interface net.imglib2.RandomAccess
copyRandomAccess, setPositionAndGet, setPositionAndGet, setPositionAndGet
-
Methods inherited from interface net.imglib2.RealLocalizable
positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Constructor Detail
-
ConvertedRandomAccess
public ConvertedRandomAccess(RandomAccess<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<? extends B> convertedSupplier)
Creates a copy of b for conversion that can be accessed throughget().- Parameters:
source-converterSupplier-convertedSupplier-
-
-
Method Detail
-
get
public B get()
Description copied from interface:SamplerAccess the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.
-
getType
public B 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.- Returns:
- an instance of
T
-
copy
public ConvertedRandomAccess<A,B> copy()
- Specified by:
copyin interfaceRandomAccess<A>- Specified by:
copyin interfaceSampler<A>- Specified by:
copyin classAbstractConvertedRandomAccess<A,B>- 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)
-
-