Package net.imglib2.converter
Class Converters
- java.lang.Object
-
- net.imglib2.converter.Converters
-
public class Converters extends java.lang.ObjectConvenience factory methods for sample conversion.
-
-
Constructor Summary
Constructors Constructor Description Converters()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WriteConvertedRandomAccessible<ARGBType,UnsignedByteType>argbChannel(RandomAccessible<ARGBType> source, int channel)Create aWriteConvertedRandomAccessibleto one of the four channels encoded in aRandomAccessibleofARGBType.static WriteConvertedRandomAccessibleInterval<ARGBType,UnsignedByteType>argbChannel(RandomAccessibleInterval<ARGBType> source, int channel)Create aWriteConvertedRandomAccessibleIntervalto one of the four channels encoded in aRandomAccessibleIntervalofARGBType.static RandomAccessibleInterval<UnsignedByteType>argbChannels(RandomAccessibleInterval<ARGBType> source)Create an (n+1)-dimensionalRandomAccessibleof an n-dimensionalRandomAccessiblethat maps the four channels encoded inARGBTypeinto a dimension.static RandomAccessibleInterval<UnsignedByteType>argbChannels(RandomAccessibleInterval<ARGBType> source, int... channels)Create an (n+1)-dimensionalRandomAccessibleof an n-dimensionalRandomAccessiblethat maps the four channels encoded inARGBTypeinto a dimension.static <A,B extends Type<B>>
RandomAccessibleInterval<B>compose(java.util.List<RandomAccessibleInterval<A>> components, Converter<Composite<A>,B> composer, B targetType)Compose a list of sameIntervaland sameTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.static <A,B extends Type<B>>
RandomAccessibleInterval<B>compose2(java.util.List<RandomAccessibleInterval<A>> components, Converter<Composite<A>,B> composer, java.util.function.Supplier<B> targetSupplier)Compose a list of sameIntervaland sameTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.static <A extends NumericType<A>,B extends Type<B>>
RandomAccessibleInterval<B>composeNumeric(java.util.List<RandomAccessibleInterval<A>> components, Converter<NumericComposite<A>,B> composer, B targetType)Compose a list of sameIntervaland sameNumericTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.static <A extends NumericType<A>,B>
RandomAccessibleInterval<B>composeNumeric2(java.util.List<RandomAccessibleInterval<A>> components, Converter<NumericComposite<A>,B> composer, java.util.function.Supplier<B> targetSupplier)Compose a list of sameIntervaland sameNumericTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.static <A extends RealType<A>,B extends Type<B>>
RandomAccessibleInterval<B>composeReal(java.util.List<RandomAccessibleInterval<A>> components, Converter<RealComposite<A>,B> composer, B targetType)Compose a list of sameIntervaland sameRealTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.static <A extends RealType<A>,B>
RandomAccessibleInterval<B>composeReal2(java.util.List<RandomAccessibleInterval<A>> components, Converter<RealComposite<A>,B> composer, java.util.function.Supplier<B> targetSupplier)Compose a list of sameIntervaland sameRealTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.static <A,B extends Type<B>>
IterableInterval<B>convert(IterableInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)static <A,B extends Type<B>>
WriteConvertedIterableInterval<A,B>convert(IterableInterval<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)static <A,B extends Type<B>>
IterableInterval<B>convert(IterableInterval<A> source, Converter<? super A,? super B> converter, B b)static <A,B extends Type<B>>
WriteConvertedIterableInterval<A,B>convert(IterableInterval<A> source, SamplerConverter<? super A,B> converter)static <A,B,C extends Type<C>>
IterableInterval<C>convert(IterableInterval<A> sourceA, IterableInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)static <A,B,C extends Type<C>>
IterableInterval<C>convert(IterableInterval<A> sourceA, IterableInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)static <A,B extends Type<B>>
IterableRealInterval<B>convert(IterableRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)static <A,B extends Type<B>>
IterableRealInterval<B>convert(IterableRealInterval<A> source, Converter<? super A,? super B> converter, B b)static <A,B extends Type<B>>
WriteConvertedIterableRealInterval<A,B>convert(IterableRealInterval<A> source, SamplerConverter<? super A,B> converter)static <A,B,C extends Type<C>>
IterableRealInterval<C>convert(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)static <A,B,C extends Type<C>>
IterableRealInterval<C>convert(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)static <A,B extends Type<B>>
RandomAccessible<B>convert(RandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)static <A,B extends Type<B>>
WriteConvertedRandomAccessible<A,B>convert(RandomAccessible<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)static <A,B extends Type<B>>
RandomAccessible<B>convert(RandomAccessible<A> source, Converter<? super A,? super B> converter, B b)static <A,B extends Type<B>>
WriteConvertedRandomAccessible<A,B>convert(RandomAccessible<A> source, SamplerConverter<? super A,B> converter)static <A,B,C extends Type<C>>
RandomAccessible<C>convert(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)static <A,B,C extends Type<C>>
RandomAccessible<C>convert(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)static <A,B extends Type<B>>
RandomAccessibleInterval<B>convert(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)static <A,B extends Type<B>>
WriteConvertedRandomAccessibleInterval<A,B>convert(RandomAccessibleInterval<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)static <A,B extends Type<B>>
RandomAccessibleInterval<B>convert(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, B b)static <A,B extends Type<B>>
WriteConvertedRandomAccessibleInterval<A,B>convert(RandomAccessibleInterval<A> source, SamplerConverter<? super A,B> converter)static <A,B,C extends Type<C>>
RandomAccessibleInterval<C>convert(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)static <A,B,C extends Type<C>>
RandomAccessibleInterval<C>convert(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)static <A,B extends Type<B>>
RealRandomAccessible<B>convert(RealRandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)static <A,B extends Type<B>>
RealRandomAccessible<B>convert(RealRandomAccessible<A> source, Converter<? super A,? super B> converter, B b)static <A,B,C extends Type<C>>
RealRandomAccessible<C>convert(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)static <A,B,C extends Type<C>>
RealRandomAccessible<C>convert(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)static <A,B extends Type<B>>
RealRandomAccessibleRealInterval<B>convert(RealRandomAccessibleRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B extends Type<B>>
RealRandomAccessibleRealInterval<B>convert(RealRandomAccessibleRealInterval<A> source, Converter<? super A,? super B> converter, B b)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B,C extends Type<C>>
RealRandomAccessibleRealInterval<C>convert(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B,C extends Type<C>>
RealRandomAccessibleRealInterval<C>convert(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B>
IterableInterval<B>convert2(IterableInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)static <A,B>
IterableInterval<B>convert2(IterableInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)static <A,B,C>
IterableInterval<C>convert2(IterableInterval<A> sourceA, IterableInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)static <A,B,C>
IterableInterval<C>convert2(IterableInterval<A> sourceA, IterableInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)static <A,B>
IterableRealInterval<B>convert2(IterableRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)static <A,B>
IterableRealInterval<B>convert2(IterableRealInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)static <A,B,C>
IterableRealInterval<C>convert2(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)static <A,B,C>
IterableRealInterval<C>convert2(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)static <A,B>
RandomAccessible<B>convert2(RandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)static <A,B>
RandomAccessible<B>convert2(RandomAccessible<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)static <A,B,C>
RandomAccessible<C>convert2(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)static <A,B,C>
RandomAccessible<C>convert2(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)static <A,B>
RandomAccessibleInterval<B>convert2(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)static <A,B>
RandomAccessibleInterval<B>convert2(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)static <A,B,C>
RandomAccessibleInterval<C>convert2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)static <A,B,C>
RandomAccessibleInterval<C>convert2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)static <A,B>
RealRandomAccessible<B>convert2(RealRandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)static <A,B>
RealRandomAccessible<B>convert2(RealRandomAccessible<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)static <A,B,C>
RealRandomAccessible<C>convert2(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)static <A,B,C>
RealRandomAccessible<C>convert2(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)static <A,B>
RealRandomAccessibleRealInterval<B>convert2(RealRandomAccessibleRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B>
RealRandomAccessibleRealInterval<B>convert2(RealRandomAccessibleRealInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B,C>
RealRandomAccessibleRealInterval<C>convert2(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B,C>
RealRandomAccessibleRealInterval<C>convert2(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample.static <A,B extends Type<B>>
RandomAccessibleInterval<B>convertRAI(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)static <A,B extends Type<B>>
WriteConvertedRandomAccessibleInterval<A,B>convertRAI(RandomAccessibleInterval<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)static <A,B extends Type<B>>
RandomAccessibleInterval<B>convertRAI(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, B b)static <A,B extends Type<B>>
WriteConvertedRandomAccessibleInterval<A,B>convertRAI(RandomAccessibleInterval<A> source, SamplerConverter<? super A,B> converter)static <A,B,C extends Type<C>>
RandomAccessibleInterval<C>convertRAI(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)static <A,B,C extends Type<C>>
RandomAccessibleInterval<C>convertRAI(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)static <A,B>
RandomAccessibleInterval<B>convertRAI2(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)static <A,B>
RandomAccessibleInterval<B>convertRAI2(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)static <A,B,C>
RandomAccessibleInterval<C>convertRAI2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)static <A,B,C>
RandomAccessibleInterval<C>convertRAI2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)static <A,B extends Type<B>,S extends RandomAccessible<A> & IterableInterval<A>>
WriteConvertedIterableRandomAccessibleInterval<A,B,S>convertRandomAccessibleIterableInterval(S source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)Create anWriteConvertedIterableRandomAccessibleIntervalwhoseRandomAccessesandCursorsSampler.get()you a converted sample.static <A,B extends Type<B>,S extends RandomAccessible<A> & IterableInterval<A>>
WriteConvertedIterableRandomAccessibleInterval<A,B,S>convertRandomAccessibleIterableInterval(S source, SamplerConverter<? super A,B> converter)Create anWriteConvertedIterableRandomAccessibleIntervalwhoseRandomAccessesandCursorsSampler.get()you a converted sample.static RandomAccessible<ARGBType>mergeARGB(RandomAccessible<UnsignedByteType> source, ColorChannelOrder channelOrder)Create an n-dimensional color image from an (n+1)-dimensional image ofUnsignedByteType.static RandomAccessibleInterval<ARGBType>mergeARGB(RandomAccessibleInterval<UnsignedByteType> source, ColorChannelOrder channelOrder)Create an n-dimensional color image from an (n+1)-dimensional image ofUnsignedByteType.
-
-
-
Method Detail
-
convert
public static <A,B extends Type<B>> RandomAccessible<B> convert(RandomAccessible<A> source, Converter<? super A,? super B> converter, B b)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
source-converter- must be stateless when multi-threadingb-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RandomAccessible<B> convert2(RandomAccessible<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converter- must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> RandomAccessible<B> convert(RandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
source-converterSupplier-b-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RandomAccessible<B> convert2(RandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converterSupplier-targetSupplier-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> WriteConvertedRandomAccessible<A,B> convert(RandomAccessible<A> source, SamplerConverter<? super A,B> converter)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converter- must be stateless when multi-threading- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> WriteConvertedRandomAccessible<A,B> convert(RandomAccessible<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converterSupplier-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> RandomAccessibleInterval<B> convert(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, B b)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
source-converter- must be stateless when multi-threadingb-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RandomAccessibleInterval<B> convert2(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converter- must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> RandomAccessibleInterval<B> convert(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
source-converterSupplier-b-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RandomAccessibleInterval<B> convert2(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converterSupplier-targetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI
public static <A,B extends Type<B>> RandomAccessibleInterval<B> convertRAI(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, B b)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert(RandomAccessibleInterval, Converter, Type). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval.- Parameters:
source-converter- must be stateless when multi-threadingb-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI2
public static <A,B> RandomAccessibleInterval<B> convertRAI2(RandomAccessibleInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert2(RandomAccessibleInterval, Converter, Supplier). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval. The method signature isconvertRAI2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converter- must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI
public static <A,B extends Type<B>> RandomAccessibleInterval<B> convertRAI(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert(RandomAccessibleInterval, Converter, Type). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval.- Parameters:
source-converterSupplier-b-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI2
public static <A,B> RandomAccessibleInterval<B> convertRAI2(RandomAccessibleInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert2(RandomAccessibleInterval, Converter, Supplier). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval. The method signature isconvertRAI2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converterSupplier-targetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> WriteConvertedRandomAccessibleInterval<A,B> convert(RandomAccessibleInterval<A> source, SamplerConverter<? super A,B> converter)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converter- must be stateless when multi-threading- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> WriteConvertedRandomAccessibleInterval<A,B> convert(RandomAccessibleInterval<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converterSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI
public static <A,B extends Type<B>> WriteConvertedRandomAccessibleInterval<A,B> convertRAI(RandomAccessibleInterval<A> source, SamplerConverter<? super A,B> converter)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values. Delegates toconvert(RandomAccessibleInterval, SamplerConverter). The different name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval.- Parameters:
source-converter- must be stateless when multi-threading- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> IterableRealInterval<B> convert(IterableRealInterval<A> source, Converter<? super A,? super B> converter, B b)
Create aIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableRealIntervalhas no effect.- Parameters:
source-converter- must be stateless when multi-threadingb-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> IterableRealInterval<B> convert2(IterableRealInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)
Create aIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableRealIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converter- must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> IterableRealInterval<B> convert(IterableRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)
Create aIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableRealIntervalhas no effect.- Parameters:
source-converterSupplier-b-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> IterableRealInterval<B> convert2(IterableRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)
Create aIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableRealIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converterSupplier-targetSupplier-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convertRAI
public static <A,B extends Type<B>> WriteConvertedRandomAccessibleInterval<A,B> convertRAI(RandomAccessibleInterval<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values. Delegates toconvert(RandomAccessibleInterval, SamplerConverter). The different name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval.- Parameters:
source-converterSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> IterableInterval<B> convert(IterableInterval<A> source, Converter<? super A,? super B> converter, B b)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect.- Parameters:
source-converter- must be stateless when multi-threadingb-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> IterableInterval<B> convert2(IterableInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converter- must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> IterableInterval<B> convert(IterableInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect.- Parameters:
source-converterSupplier-b-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> IterableInterval<B> convert2(IterableInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converterSupplier-targetSupplier-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> WriteConvertedIterableInterval<A,B> convert(IterableInterval<A> source, SamplerConverter<? super A,B> converter)
Create anIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converter- must be stateless when multi-threading- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> WriteConvertedIterableRealInterval<A,B> convert(IterableRealInterval<A> source, SamplerConverter<? super A,B> converter)
Create anIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converter- must be stateless when multi-threading- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> WriteConvertedIterableInterval<A,B> convert(IterableInterval<A> source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)
Create anIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converterSupplier-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convertRandomAccessibleIterableInterval
public static <A,B extends Type<B>,S extends RandomAccessible<A> & IterableInterval<A>> WriteConvertedIterableRandomAccessibleInterval<A,B,S> convertRandomAccessibleIterableInterval(S source, SamplerConverter<? super A,B> converter)
Create anWriteConvertedIterableRandomAccessibleIntervalwhoseRandomAccessesandCursorsSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converter- must be stateless when multi-threading- Returns:
- a
WriteConvertedIterableRandomAccessibleIntervalwhoseSamplersperform on-the-fly value conversion using the provided converter.
-
convertRandomAccessibleIterableInterval
public static <A,B extends Type<B>,S extends RandomAccessible<A> & IterableInterval<A>> WriteConvertedIterableRandomAccessibleInterval<A,B,S> convertRandomAccessibleIterableInterval(S source, java.util.function.Supplier<SamplerConverter<? super A,B>> converterSupplier)
Create anWriteConvertedIterableRandomAccessibleIntervalwhoseRandomAccessesandCursorsSampler.get()you a converted sample. Conversion is done on-the-fly both when reading and writing values.- Parameters:
source-converterSupplier-- Returns:
- a
WriteConvertedIterableRandomAccessibleIntervalwhoseSamplersperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> RealRandomAccessibleRealInterval<B> convert(RealRandomAccessibleRealInterval<A> source, Converter<? super A,? super B> converter, B b)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect.- Parameters:
source-converter- must be stateless when multi-threadingb-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RealRandomAccessibleRealInterval<B> convert2(RealRandomAccessibleRealInterval<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converter- must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> RealRandomAccessibleRealInterval<B> convert(RealRandomAccessibleRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect.- Parameters:
source-converterSupplier-b-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RealRandomAccessibleRealInterval<B> convert2(RealRandomAccessibleRealInterval<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converterSupplier-targetSupplier-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> RealRandomAccessible<B> convert(RealRandomAccessible<A> source, Converter<? super A,? super B> converter, B b)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
source-converter- must be stateless when multi-threadingb-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RealRandomAccessible<B> convert2(RealRandomAccessible<A> source, Converter<? super A,? super B> converter, java.util.function.Supplier<B> targetSupplier)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converter- must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B extends Type<B>> RealRandomAccessible<B> convert(RealRandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, B b)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
source-converterSupplier-b-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B> RealRandomAccessible<B> convert2(RealRandomAccessible<A> source, java.util.function.Supplier<Converter<? super A,? super B>> converterSupplier, java.util.function.Supplier<B> targetSupplier)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
source-converterSupplier-targetSupplier-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
argbChannel
public static WriteConvertedRandomAccessibleInterval<ARGBType,UnsignedByteType> argbChannel(RandomAccessibleInterval<ARGBType> source, int channel)
Create aWriteConvertedRandomAccessibleIntervalto one of the four channels encoded in aRandomAccessibleIntervalofARGBType. The source is being modified as expected by writing into the converted channels.- Parameters:
source-channel- 0 = alpha, 1 = red, 2 = green, 3 = blue- Returns:
- a converted
WriteConvertedRandomAccessibleIntervalwhoseSamplersperform on-the-fly value conversion into and from one channel of the originalARGBType.
-
argbChannel
public static WriteConvertedRandomAccessible<ARGBType,UnsignedByteType> argbChannel(RandomAccessible<ARGBType> source, int channel)
Create aWriteConvertedRandomAccessibleto one of the four channels encoded in aRandomAccessibleofARGBType. The source is being modified as expected by writing into the converted channels.- Parameters:
source-channel- 0 = alpha, 1 = red, 2 = green, 3 = blue- Returns:
- a converted
WriteConvertedRandomAccessiblewhoseSamplersperform on-the-fly value conversion into and from one channel of the originalARGBType.
-
argbChannels
public static RandomAccessibleInterval<UnsignedByteType> argbChannels(RandomAccessibleInterval<ARGBType> source)
Create an (n+1)-dimensionalRandomAccessibleof an n-dimensionalRandomAccessiblethat maps the four channels encoded inARGBTypeinto a dimension. The source is being modified as expected by writing into the converted channels.- Parameters:
source-- Returns:
- a converted
RandomAccessibleIntervalwhoseSamplersperform on-the-fly value conversion into and from the corresponding channels of the originalARGBType.
-
argbChannels
public static RandomAccessibleInterval<UnsignedByteType> argbChannels(RandomAccessibleInterval<ARGBType> source, int... channels)
Create an (n+1)-dimensionalRandomAccessibleof an n-dimensionalRandomAccessiblethat maps the four channels encoded inARGBTypeinto 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.- Parameters:
source-channels- 0 = alpha, 1 = red, 2 = green, 3 = blue- Returns:
- a converted
RandomAccessibleIntervalwhoseSamplersperform on-the-fly value conversion into and from the corresponding channels of the originalARGBType.
-
mergeARGB
public static RandomAccessible<ARGBType> mergeARGB(RandomAccessible<UnsignedByteType> source, ColorChannelOrder channelOrder)
Create an n-dimensional color image from an (n+1)-dimensional image ofUnsignedByteType.- Parameters:
source- The last dimension of the image must be the color channel.Views.stack(java.util.List<? extends net.imglib2.RandomAccessibleInterval<T>>)could be used to create the source, if there is a separate image for each color channel.channelOrder- Order of the color channels.- Returns:
- Color view to the source image that can be used for reading and writing.
-
mergeARGB
public static RandomAccessibleInterval<ARGBType> mergeARGB(RandomAccessibleInterval<UnsignedByteType> source, ColorChannelOrder channelOrder)
Create an n-dimensional color image from an (n+1)-dimensional image ofUnsignedByteType.- Parameters:
source- The last dimension of the image must be the color channel.Views.stack(java.util.List<? extends net.imglib2.RandomAccessibleInterval<T>>)could be used to create the source, if there is a separate image for each color channel.channelOrder- Order of the color channels.- Returns:
- Color view to the source image that can be used for reading and writing.
-
composeReal
public static <A extends RealType<A>,B extends Type<B>> RandomAccessibleInterval<B> composeReal(java.util.List<RandomAccessibleInterval<A>> components, Converter<RealComposite<A>,B> composer, B targetType)
Compose a list of sameIntervaland sameRealTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.- Parameters:
components-composer- must be stateless when multi-threadingtargetType-- Returns:
-
composeReal2
public static <A extends RealType<A>,B> RandomAccessibleInterval<B> composeReal2(java.util.List<RandomAccessibleInterval<A>> components, Converter<RealComposite<A>,B> composer, java.util.function.Supplier<B> targetSupplier)
Compose a list of sameIntervaland sameRealTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B. The method signature iscomposeReal2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
components-composer- must be stateless when multi-threadingtargetSupplier-- Returns:
-
composeNumeric
public static <A extends NumericType<A>,B extends Type<B>> RandomAccessibleInterval<B> composeNumeric(java.util.List<RandomAccessibleInterval<A>> components, Converter<NumericComposite<A>,B> composer, B targetType)
Compose a list of sameIntervaland sameNumericTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.- Parameters:
components-composer- must be stateless when multi-threadingtargetType-- Returns:
-
composeNumeric2
public static <A extends NumericType<A>,B> RandomAccessibleInterval<B> composeNumeric2(java.util.List<RandomAccessibleInterval<A>> components, Converter<NumericComposite<A>,B> composer, java.util.function.Supplier<B> targetSupplier)
Compose a list of sameIntervaland sameNumericTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B. The method signature iscomposeNumeric2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
components-composer- must be stateless when multi-threadingtargetSupplier-- Returns:
-
compose
public static <A,B extends Type<B>> RandomAccessibleInterval<B> compose(java.util.List<RandomAccessibleInterval<A>> components, Converter<Composite<A>,B> composer, B targetType)
Compose a list of sameIntervaland sameTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B.- Parameters:
components-composer- must be stateless when multi-threadingtargetType-- Returns:
-
compose2
public static <A,B extends Type<B>> RandomAccessibleInterval<B> compose2(java.util.List<RandomAccessibleInterval<A>> components, Converter<Composite<A>,B> composer, java.util.function.Supplier<B> targetSupplier)
Compose a list of sameIntervaland sameTypeARandomAccessibleIntervalsinto aRandomAccessibleIntervalof some targetTypeB using aConverterfromCompositeof A to B. The method signature iscompose2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
components-composer- must be stateless when multi-threadingtargetSupplier-- Returns:
-
convert
public static <A,B,C extends Type<C>> RandomAccessible<C> convert(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingc-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> RandomAccessible<C> convert2(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> RandomAccessible<C> convert(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())c-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> RandomAccessible<C> convert2(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)
Create aRandomAccessiblewhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())targetSupplier-- Returns:
- a converted
RandomAccessiblewhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> RandomAccessibleInterval<C> convert(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingc-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the providedBiConverter.
-
convert2
public static <A,B,C> RandomAccessibleInterval<C> convert2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the providedBiConverter.
-
convert
public static <A,B,C extends Type<C>> RandomAccessibleInterval<C> convert(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())c-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the providedBiConverter.
-
convert2
public static <A,B,C> RandomAccessibleInterval<C> convert2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())targetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the providedBiConverter.
-
convertRAI
public static <A,B,C extends Type<C>> RandomAccessibleInterval<C> convertRAI(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert(RandomAccessibleInterval, Converter, Type). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingc-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI2
public static <A,B,C> RandomAccessibleInterval<C> convertRAI2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert(RandomAccessibleInterval, Converter, Type). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval. The method signature isconvertRAI2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI
public static <A,B,C extends Type<C>> RandomAccessibleInterval<C> convertRAI(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert(RandomAccessibleInterval, Converter, Type). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval.- Parameters:
sourceA-sourceB-converterSupplier- s aupplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())c-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convertRAI2
public static <A,B,C> RandomAccessibleInterval<C> convertRAI2(RandomAccessibleInterval<A> sourceA, RandomAccessibleInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)
Create aRandomAccessibleIntervalwhoseRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. Delegates toconvert(RandomAccessibleInterval, Converter, Type). The different method name avoids situations where the compiler or a scripting language interpreter picks the undesired method for an object that implements bothRandomAccessibleIntervalandIterableInterval. The method signature isconvertRAI2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converterSupplier- s aupplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())targetSupplier-- Returns:
- a converted
RandomAccessibleIntervalwhoseRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> IterableInterval<C> convert(IterableInterval<A> sourceA, IterableInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingc-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> IterableInterval<C> convert2(IterableInterval<A> sourceA, IterableInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> IterableInterval<C> convert(IterableInterval<A> sourceA, IterableInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect.- Parameters:
sourceA-sourceB-converterSupplier- supplies a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())c-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> IterableInterval<C> convert2(IterableInterval<A> sourceA, IterableInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)
Create aIterableIntervalwhoseCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converterSupplier- supplies a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())targetSupplier-- Returns:
- a converted
IterableIntervalwhoseCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> IterableRealInterval<C> convert(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)
Create anIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableRealIntervalhas no effect.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingc-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> IterableRealInterval<C> convert2(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)
Create anIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableRealIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> IterableRealInterval<C> convert(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)
Create aIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect.- Parameters:
sourceA-sourceB-converterSupplier- supplies a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())c-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> IterableRealInterval<C> convert2(IterableRealInterval<A> sourceA, IterableRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)
Create aIterableRealIntervalwhoseRealCursorsSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedIterableIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converterSupplier- supplies a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())targetSupplier-- Returns:
- a converted
IterableRealIntervalwhoseRealCursorsperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> RealRandomAccessibleRealInterval<C> convert(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingc-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> RealRandomAccessibleRealInterval<C> convert2(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> RealRandomAccessibleRealInterval<C> convert(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())c-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> RealRandomAccessibleRealInterval<C> convert2(RealRandomAccessibleRealInterval<A> sourceA, RealRandomAccessibleRealInterval<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)
Create aRealRandomAccessibleRealIntervalwhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRealRandomAccessibleRealIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())targetSupplier-- Returns:
- a converted
RealRandomAccessibleRealIntervalwhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> RealRandomAccessible<C> convert(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, C c)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingc-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> RealRandomAccessible<C> convert2(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, BiConverter<? super A,? super B,? super C> converter, java.util.function.Supplier<C> targetSupplier)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converter- a two variable function into a preallocated output, e.g.(a, b, c) -> c.set(a.get() + b.get())must be stateless when multi-threadingtargetSupplier-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert
public static <A,B,C extends Type<C>> RealRandomAccessible<C> convert(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, C c)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())c-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
convert2
public static <A,B,C> RealRandomAccessible<C> convert2(RealRandomAccessible<A> sourceA, RealRandomAccessible<B> sourceB, java.util.function.Supplier<BiConverter<? super A,? super B,? super C>> converterSupplier, java.util.function.Supplier<C> targetSupplier)
Create aRealRandomAccessiblewhoseRealRandomAccessesSampler.get()you a converted sample. Conversion is done on-the-fly when reading values. Writing to the convertedRandomAccessibleIntervalhas no effect. The method signature isconvert2because many Java compilers cannot resolve the correct overload when the targetSupplieris passed as a lambda and cause spurious and seemingly false ambiguous method errors.- Parameters:
sourceA-sourceB-converterSupplier- a supplier of a two variable function into a preallocated output, e.g.() -> (a, b, c) -> c.set(a.get() + b.get())targetSupplier-- Returns:
- a converted
RealRandomAccessiblewhoseRealRandomAccessesperform on-the-fly value conversion using the provided converter.
-
-