FFT filtering in stack

Posted by jdif on
URL: http://imagej.273.s1.nabble.com/FFT-filtering-in-stack-tp5008650.html

I am attempting to use ImageJ to find the FFT of a stack of similar images and then reverse FFT after applying the same custom drawn filter to all of the images.

I am able to obtain the FFT of the satck using this macro:

 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);

For individual images, I would select areas of the FFT I wanted to delete and then multiply them by 0 using the Process->Math function, and then RFFT this new image (I am doing this to remove/edit selected features from the original image).  Is there any way I can draw this filter on one image and use it as a filter to apply this process to the whole stack?