Is there a plugin that can
1. calculate the FFT of each frame of a movie and 2. create of this stack of FFT's a new movie? (preferable only amplitude (so only real part)) henny -- -------------------------------- Henny Zandbergen, tel 31-15-2782266, fax 31-15-2786730 |
On Saturday 05 December 2009, you wrote:
> Is there a plugin that can > 1. calculate the FFT of each frame of a movie and > 2. create of this stack of FFT's a new movie? (preferable only > amplitude (so only real part)) You could do it with a macro, something like: a=getTitle(); // your stack for(i=1;i<=nSlices;i++){ setSlice(i); run("FFT"); selectImage(a); } run("Images to Stack", "name=Stack title=[FFT of] use"); You might have to change the FFT options to get only the real part, but I think that real and imaginary parts are returned as a 2 slice stack, so there might be more modifications to do to the above. Cheers G. |
In reply to this post by Henny Zandbergen
On Dec 5, 2009, at 8:23 AM, Henny Zandbergen wrote:
> Is there a plugin that can > 1. calculate the FFT of each frame of a movie and > 2. create of this stack of FFT's a new movie? (preferable only > amplitude (so only real part)) > henny Here is a macro that creates an FFT power spectrum movie. setBatchMode(true); stack = getImageID; newImage("FFT Movie of "+getTitle, "8-bit", getWidth, getHeight, nSlices); movie = getImageID; for (i=1; i<=nSlices; i++) { showProgress(i, nSlices); selectImage(stack); setSlice(i); run("FFT"); run("Copy"); close; selectImage(movie); setSlice(i); run("Paste"); } setBatchMode(false); -wayne |
Works perfectly. Saving the movie as avi gives only the amplitude.
>On Dec 5, 2009, at 8:23 AM, Henny Zandbergen wrote: > >>Is there a plugin that can >>1. calculate the FFT of each frame of a movie and >>2. create of this stack of FFT's a new movie? (preferable only >>amplitude (so only real part)) >>henny > >Here is a macro that creates an FFT power spectrum movie. > > setBatchMode(true); > stack = getImageID; > newImage("FFT Movie of "+getTitle, "8-bit", getWidth, getHeight, nSlices); > movie = getImageID; > for (i=1; i<=nSlices; i++) { > showProgress(i, nSlices); > selectImage(stack); > setSlice(i); > run("FFT"); > run("Copy"); > close; > selectImage(movie); > setSlice(i); > run("Paste"); > } > setBatchMode(false); > >-wayne -- -------------------------------- Henny Zandbergen, tel 31-15-2782266, fax 31-15-2786730 |
In reply to this post by Wayne Rasband
I would like to take the sum of all the images in a movie (movie is
stack of Fourier transforms (amplitide only)) Is there a macro for this? henny >On Dec 5, 2009, at 8:23 AM, Henny Zandbergen wrote: > >>Is there a plugin that can >>1. calculate the FFT of each frame of a movie and >>2. create of this stack of FFT's a new movie? (preferable only >>amplitude (so only real part)) >>henny > >Here is a macro that creates an FFT power spectrum movie. > > setBatchMode(true); > stack = getImageID; > newImage("FFT Movie of "+getTitle, "8-bit", getWidth, getHeight, nSlices); > movie = getImageID; > for (i=1; i<=nSlices; i++) { > showProgress(i, nSlices); > selectImage(stack); > setSlice(i); > run("FFT"); > run("Copy"); > close; > selectImage(movie); > setSlice(i); > run("Paste"); > } > setBatchMode(false); > >-wayne -- -------------------------------- Henny Zandbergen, tel 31-15-2782266, fax 31-15-2786730 |
On Dec 5, 2009, at 10:09 AM, Henny Zandbergen wrote:
> I would like to take the sum of all the images in a movie > (movie is stack of Fourier transforms (amplitide only)) > Is there a macro for this? > henny You can sum all the images in a stack by using the Image>Stacks>Z Project command and selecting the "Sum Slices" option in the dialog box. -wayne |
In reply to this post by Henny Zandbergen
Dear,
you might have a look at the IJ-manual: <http://rsb.info.nih.gov/ij/docs/menus/image.html#stacks> Most probable you won't need a macro... >I would like to take the sum of all the images in a movie (movie is >stack of Fourier transforms (amplitide only)) >Is there a macro for this? >henny HTH -- Herbie ------------------------ <http://www.gluender.de> |
Free forum by Nabble | Edit this page |