/** * Convert an image into a Fourier image with real and imaginary parts * * @param ip - image * @return the real and imaginary parts */ public FloatProcessor[] getComplexFFT(ImageProcessor ip) { FloatProcessor taperedDataImage = getSquareTaperedImage(ip); FHT fht = new FHT(taperedDataImage); fht.setShowProgress( false ); fht.transform(); FloatProcessor[] ret = new FloatProcessor[2]; ImageStack stack1 = fht.getComplexTransform(); ret[0] = ((FloatProcessor) stack1.getProcessor(1)); ret[1] = ((FloatProcessor) stack1.getProcessor(2)); return ret; }
ImageStack ct = getComplexTransform(); ImagePlus imp2 = new ImagePlus("Complex of "+FFT.fileName, ct); (new ContrastEnhancer()).stretchHistogram(imp2, 0.1);
ImageStack ct = getComplexTransform(); ImagePlus imp2 = new ImagePlus("Complex of "+FFT.fileName, ct); (new ContrastEnhancer()).stretchHistogram(imp2, 0.1);