@Override public Runnable create( final double[] halfkernel, final RandomAccess< S > in, final RandomAccess< T > out, final int d, final long lineLength ) { return new FloatConvolverRealType< S, T >( halfkernel, in, out, d, lineLength ); } };
private static < S extends RealType< S >, T extends RealType< T > > void convolveRealTypeFloat( final double[][] halfkernels, final RandomAccessible< S > source, final RandomAccessibleInterval< T > target, final int numThreads ) { final FloatType type = new FloatType(); final ImgFactory< FloatType > imgfac = getImgFactory( target, halfkernels, type ); if ( canUseBufferedConvolver( target, halfkernels ) ) convolve( halfkernels, source, target, FloatConvolverRealTypeBuffered.< S, FloatType >factory(), FloatConvolverRealTypeBuffered.< FloatType, FloatType >factory(), FloatConvolverRealTypeBuffered.< FloatType, T >factory(), FloatConvolverRealTypeBuffered.< S, T >factory(), imgfac, type, numThreads ); else convolve( halfkernels, source, target, FloatConvolverRealType.< S, FloatType >factory(), FloatConvolverRealType.< FloatType, FloatType >factory(), FloatConvolverRealType.< FloatType, T >factory(), FloatConvolverRealType.< S, T >factory(), imgfac, type, numThreads ); }
private static < S extends RealType< S >, T extends RealType< T > > void convolveRealTypeFloat( final double[][] halfkernels, final RandomAccessible< S > source, final RandomAccessibleInterval< T > target, final ExecutorService service ) { final FloatType type = new FloatType(); final ImgFactory< FloatType > imgfac = getImgFactory( target, halfkernels, type ); if ( canUseBufferedConvolver( target, halfkernels ) ) convolve( halfkernels, source, target, FloatConvolverRealTypeBuffered.< S, FloatType >factory(), FloatConvolverRealTypeBuffered.< FloatType, FloatType >factory(), FloatConvolverRealTypeBuffered.< FloatType, T >factory(), FloatConvolverRealTypeBuffered.< S, T >factory(), imgfac, service ); else convolve( halfkernels, source, target, FloatConvolverRealType.< S, FloatType >factory(), FloatConvolverRealType.< FloatType, FloatType >factory(), FloatConvolverRealType.< FloatType, T >factory(), FloatConvolverRealType.< S, T >factory(), imgfac, service ); }
@Override public Runnable create( final double[] halfkernel, final RandomAccess< S > in, final RandomAccess< T > out, final int d, final long lineLength ) { return new FloatConvolverRealType< S, T >( halfkernel, in, out, d, lineLength ); } };
/** * @return a {@link ConvolverFactory} producing {@link FloatConvolverRealType}. */ public static < S extends RealType< S >, T extends RealType< T > > ConvolverFactory< S, T > factory() { return new ConvolverFactory< S, T >() { @Override public Runnable create( final double[] halfkernel, final RandomAccess< S > in, final RandomAccess< T > out, final int d, final long lineLength ) { return new FloatConvolverRealType< S, T >( halfkernel, in, out, d, lineLength ); } }; }
/** * @return a {@link ConvolverFactory} producing * {@link FloatConvolverRealType}. */ public static < S extends RealType< S >, T extends RealType< T > > ConvolverFactory< S, T > factory() { return new ConvolverFactory< S, T >() { @Override public Runnable create( final double[] halfkernel, final RandomAccess< S > in, final RandomAccess< T > out, final int d, final long lineLength ) { return new FloatConvolverRealType< S, T >( halfkernel, in, out, d, lineLength ); } }; }