final public static < C extends ComplexType< C >, R extends RealType< R > > void complexToRealUnpad( final RandomAccessibleInterval< C > input, final RandomAccessibleInterval< R > output, final int numThreads ) { final ExecutorService service = Executors.newFixedThreadPool(numThreads); complexToRealUnpad(input, output, service); service.shutdown(); }
final public static < C extends ComplexType< C >, R extends RealType< R > > void complexToRealUnpad( final RandomAccessibleInterval< C > input, final RandomAccessibleInterval< R > output ) { complexToRealUnpad( input, output, Runtime.getRuntime().availableProcessors() ); }
public static < R extends RealType< R > > void computeConvolution( final Img< ComplexFloatType > fftImg, final Img< ComplexFloatType > fftKernel, final RandomAccessibleInterval< R > output, final boolean keepImgFFT, final ExecutorService service ) { final Img< ComplexFloatType > fftconvolved; if ( keepImgFFT ) fftconvolved = fftImg.copy(); else fftconvolved = fftImg; // multiply in place multiplyComplex( fftconvolved, fftKernel ); // inverse FFT in place FFT.complexToRealUnpad( fftconvolved, output, service ); }
public static < R extends RealType< R > > void computeConvolution( final Img< ComplexFloatType > fftImg, final Img< ComplexFloatType > fftKernel, final RandomAccessibleInterval< R > output, final boolean keepImgFFT, final ExecutorService service ) { final Img< ComplexFloatType > fftconvolved; if ( keepImgFFT ) fftconvolved = fftImg.copy(); else fftconvolved = fftImg; // multiply in place multiplyComplex( fftconvolved, fftKernel ); // inverse FFT in place FFT.complexToRealUnpad( fftconvolved, output, service ); }
FFT.complexToRealUnpad( fftImg, output );
FFT.complexToRealUnpad( fftImg, output, numThreads );
FFT.complexToRealUnpad( fftImg, output, numThreads );
FFT.complexToRealUnpad( fftconvolved, output );