Re: Cropping several parts of a set of images from multiple folders
Posted by Ninja Chris on Feb 22, 2010; 5:04pm
URL: http://imagej.273.s1.nabble.com/Cropping-several-parts-of-a-set-of-images-from-multiple-folders-tp3689264p3689268.html
Oli,
Michael Schmid-3 has kindly helped me with my code and it now dumps the duplicated ROI stacks into their newly created folders.
macro "ROI Export [r]" {
sdir = getDirectory("choose source directory ");
n = roiManager("count");
for (i=0; i<n; i++) {
bee = "bee_"+i + File.separator;
ddir = sdir+bee;
File.makeDirectory(ddir);
roiManager("select", i);
run("Duplicate...", "title = bee duplicate range=1-3000");
run("Image Sequence... ", "format=TIFF name=["+bee+"] start=0 digits=4 save=["+ddir+"]");
close();
}
}
Glad to be of help!
Chris