Login  Register

the sum of a stack

Posted by Henny Zandbergen on Dec 05, 2009; 3:09pm
URL: http://imagej.273.s1.nabble.com/FFT-of-image-stack-tp3690205p3690207.html

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