# Fourier Transform

5 messages
Open this post in threaded view
|

## Fourier Transform

 Hi Is there any command in ImageJ to calculate the Fourier transform of images with the size of non-power of two? Best regards, Sara -- Sent from: http://imagej.1557.x6.nabble.com/-- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Open this post in threaded view
|

## Re: Fourier Transform

 Good day, did you try "ImageJ >> Process >> FFT >> FFT Options..."? If this doesn't suit your needs then please tell us why. Regards Herbie ::::::::::::::::::::::::::::::::::::: Am 05.12.19 um 18:47 schrieb Sara_24: > Hi > Is there any command in ImageJ to calculate the Fourier transform of images > with the size of non-power of two? > > Best regards, > Sara > > > > -- > Sent from: http://imagej.1557.x6.nabble.com/> > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Open this post in threaded view
|

## Re: Fourier Transform

 In reply to this post by Sara_24 Hi Sara, You can do it with ImageJ Ops. Here is an example Groovy script that performs a lowpass filter in Fourier space: --------   #@ OpService ops   #@input Img image   #@input Double (value=10) radius   #@output Img result   import net.imglib2.type.numeric.real.FloatType   import net.imglib2.util.Util   lowpass = { fft, radius ->     pos = new long[fft.numDimensions()]     long[] origin = [0, 0]     long[] origin2 = [0, fft.dimension(1)]     cursor = fft.localizingCursor()     while (cursor.hasNext()) {       cursor.fwd()       cursor.localize(pos)       dist = Util.distance(origin, pos)       dist2 = Util.distance(origin2, pos)       if (dist > radius && dist2 > radius)         cursor.get().setZero()     }   }   // Perform fft of the input.   fft = ops.filter().fft(image)   // Filter it.   lowpass(fft, radius)   // Reverse the FFT.   result = ops.run("create.img", image, new FloatType())   ops.filter().ifft(result, fft) -------- ImageJ Ops is part of ImageJ2, and included as part of Fiji. Regards, Curtis -- Curtis Rueden Software architect, LOCI/Eliceiri lab - https://loci.wisc.edu/softwareImageJ2 lead, Fiji maintainer - https://imagej.net/User:RuedenHave you tried the Image.sc Forum? https://forum.image.sc/On Thu, Dec 5, 2019 at 12:22 PM Sara_24 <[hidden email]> wrote: > Hi > Is there any command in ImageJ to calculate the Fourier transform of images > with the size of non-power of two? > > Best regards, > Sara > > > > -- > Sent from: http://imagej.1557.x6.nabble.com/> > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html