Created
July 9, 2021 10:35
-
-
Save Omnistic/76dc38f2f532be78952b41c61fec542d to your computer and use it in GitHub Desktop.
SIMVIEW_Multistack-ZProj_FijiMacro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = getDirectory("Choose a Directory"); | |
filename = getFileList(path); | |
newDir = path + "Max Projections" + File.separator; | |
if (File.exists(newDir)) | |
exit("Destination directory already exists; remove it and then run this macro again"); | |
File.makeDirectory(newDir); | |
for (i=0; i<filename.length; i++) { | |
if(endsWith(filename[i], ".stack")) { | |
run("Raw...", "open=["+path+filename[i]+"] image=[16-bit Unsigned] width=1024 height=624 number=20000 little-endian"); | |
//run("Z Project...", "projection=[Max Intensity]"); | |
run("Z Project...", "projection=[Average Intensity]"); | |
saveAs("tiff", newDir + getTitle); | |
close(); close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment