Skip to content

Instantly share code, notes, and snippets.

@mutterer
Created May 21, 2017 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mutterer/66f4b2385cef14ef1d088ad7d9070e94 to your computer and use it in GitHub Desktop.
Save mutterer/66f4b2385cef14ef1d088ad7d9070e94 to your computer and use it in GitHub Desktop.
setBatchMode(true);
id = getImageID();
n = nSlices();
for(i=1; i<=n; i++) {
setSlice(i);
run("FFT");
run("Select All");
run("Copy");
run("Close");
if (!isOpen("Stack of FFT"+id)) {
run("Internal Clipboard");
rename("Stack of FFT"+id);
} else {
selectImage("Stack of FFT"+id);
run("Add Slice");
run("Paste");
}
selectImage(id);
}
selectImage("Stack of FFT"+id);
setBatchMode(false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment