public class Converters extends Object
Constructor and Description |
---|
Converters() |
public static final <A,B extends Type<B>> RandomAccessible<B> convert(RandomAccessible<A> source, Converter<? super A,? super B> converter, B b)
RandomAccessible
whose RandomAccesses
Sampler.get()
you a converted sample.
Conversion is done on-the-fly when reading values. Writing to the
converted RandomAccessibleInterval
has no effect.source
- converter
- b
- RandomAccessible
whose RandomAccesses
perform on-the-fly value conversion using the
provided converter.public static final <A,B extends Type<B>> WriteConvertedRandomAccessible<A,B> convert(RandomAccessible<A> source, SamplerConverter<? super A,B> converter)
RandomAccessible
whose RandomAccesses
Sampler.get()
you a converted sample.
Conversion is done on-the-fly both when reading and writing values.source
- converter
- RandomAccessible
whose RandomAccesses
perform on-the-fly value conversion using the
provided converter.public static final <A,B extends Type<B>> RandomAccessibleInterval<B> convert(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, B b)
RandomAccessibleInterval
whose RandomAccesses
Sampler.get()
you a converted sample.
Conversion is done on-the-fly when reading values. Writing to the
converted RandomAccessibleInterval
has no effect.source
- converter
- b
- RandomAccessibleInterval
whose
RandomAccesses
perform on-the-fly value
conversion using the provided converter.public static final <A,B extends Type<B>> WriteConvertedRandomAccessibleInterval<A,B> convert(RandomAccessibleInterval<A> source, SamplerConverter<? super A,B> converter)
RandomAccessibleInterval
whose RandomAccesses
Sampler.get()
you a converted sample.
Conversion is done on-the-fly both when reading and writing values.source
- converter
- RandomAccessibleInterval
whose
RandomAccesses
perform on-the-fly value
conversion using the provided converter.public static final <A,B extends Type<B>> IterableInterval<B> convert(IterableInterval<A> source, Converter<? super A,? super B> converter, B b)
IterableInterval
whose Cursors
Sampler.get()
you a converted sample. Conversion is done
on-the-fly when reading values. Writing to the converted
IterableInterval
has no effect.source
- converter
- b
- IterableInterval
whose Cursors
perform on-the-fly value conversion using the provided converter.public static final <A,B extends Type<B>> WriteConvertedIterableInterval<A,B> convert(IterableInterval<A> source, SamplerConverter<? super A,B> converter)
IterableInterval
whose Cursors
Sampler.get()
you a converted sample. Conversion is done
on-the-fly both when reading and writing values.source
- converter
- IterableInterval
whose Cursors
perform on-the-fly value conversion using the provided converter.public static final <A,B extends Type<B>,S extends RandomAccessible<A> & IterableInterval<A>> WriteConvertedIterableRandomAccessibleInterval<A,B,S> convertRandomAccessibleIterableInterval(S source, SamplerConverter<? super A,B> converter)
WriteConvertedIterableRandomAccessibleInterval
whose
RandomAccesses
and Cursors
Sampler.get()
you a converted sample. Conversion is done
on-the-fly both when reading and writing values.source
- converter
- WriteConvertedIterableRandomAccessibleInterval
whose
Samplers
perform on-the-fly value conversion
using the provided converter.public static final <A,B extends Type<B>> RealRandomAccessibleRealInterval<B> convert(RealRandomAccessibleRealInterval<A> source, Converter<? super A,? super B> converter, B b)
RealRandomAccessibleRealInterval
whose RealRandomAccesses
Sampler.get()
you a converted sample.
Conversion is done on-the-fly when reading values. Writing to the
converted RealRandomAccessibleRealInterval
has no effect.source
- converter
- b
- RealRandomAccessibleRealInterval
whose
RealRandomAccesses
perform on-the-fly value
conversion using the provided converter.public static final <A,B extends Type<B>> RealRandomAccessible<B> convert(RealRandomAccessible<A> source, Converter<? super A,? super B> converter, B b)
RealRandomAccessible
whose RealRandomAccesses
Sampler.get()
you a converted sample.
Conversion is done on-the-fly when reading values. Writing to the
converted RandomAccessibleInterval
has no effect.source
- converter
- b
- RealRandomAccessible
whose RealRandomAccesses
perform on-the-fly value conversion using the
provided converter.public static final WriteConvertedRandomAccessibleInterval<ARGBType,UnsignedByteType> argbChannel(RandomAccessibleInterval<ARGBType> source, int channel)
WriteConvertedRandomAccessibleInterval
to one of the
four channels encoded in a RandomAccessibleInterval
of
ARGBType
. The source is being modified as expected by writing
into the converted channels.source
- channel
- 0 = alpha, 1 = red, 2 = green, 3 = blueWriteConvertedRandomAccessibleInterval
whose
Samplers
perform on-the-fly value conversion
into and from one channel of the original ARGBType
.public static final WriteConvertedRandomAccessible<ARGBType,UnsignedByteType> argbChannel(RandomAccessible<ARGBType> source, int channel)
WriteConvertedRandomAccessible
to one of the four
channels encoded in a RandomAccessible
of ARGBType
.
The source is being modified as expected by writing into the converted
channels.source
- channel
- 0 = alpha, 1 = red, 2 = green, 3 = blueWriteConvertedRandomAccessible
whose
Samplers
perform on-the-fly value conversion
into and from one channel of the original ARGBType
.public static final RandomAccessibleInterval<UnsignedByteType> argbChannels(RandomAccessibleInterval<ARGBType> source)
RandomAccessible
of an
n-dimensional RandomAccessible
that maps the four
channels encoded in ARGBType
into a dimension. The source is
being modified as expected by writing into the converted channels.source
- RandomAccessibleInterval
whose
Samplers
perform on-the-fly value conversion
into and from the corresponding channels of the original
ARGBType
.public static final RandomAccessibleInterval<UnsignedByteType> argbChannels(RandomAccessibleInterval<ARGBType> source, int... channels)
RandomAccessible
of an
n-dimensional RandomAccessible
that maps the four
channels encoded in ARGBType
into a dimension. The order
of the channels passed as arguments is preserved. The source is being
modified as expected by writing into the converted channels.source
- channels
- 0 = alpha, 1 = red, 2 = green, 3 = blueRandomAccessibleInterval
whose
Samplers
perform on-the-fly value conversion
into and from the corresponding channels of the original
ARGBType
.Copyright © 2009–2018 ImgLib2. All rights reserved.