Thanks! I'll try this^^
Date: Mon, 22 Feb 2010 07:39:46 -0800
From:
[hidden email]To:
[hidden email]Subject: Re: How to change ROI during a Macro?
Hi Gargar, I'm working on some iterative code to process multiple ROIs within
a single stack. The code
n = roiManager("count");
for (i=0; i<n; i++) {
roiManager("select", i);
will allow any subsequenty function to work on each ROI in succession. Eg:
sdir = getDirectory("choose source directory ");
n = roiManager("count");
for (i=0; i<n; i++) {
roiManager("select", i);
bee = "bee_"+i+"_";
ddir = sdir+bee;
File.makeDirectory(ddir);
run("Duplicate...", "title = ["+bee+"] duplicate range=1-3000");
run("Image Sequence... ", "format=TIFF name=["+bee+"] start=0 digits=4
save=["+ddir+"]");
close();
}
Hope this helps,
Chris
--
View this message in context:
http://n2.nabble.com/How-to-change-ROI-during-a-Macro-tp4544808p4611998.htmlSent from the ImageJ mailing list archive at Nabble.com.
Hotmail: Free, trusted and rich email service.
Get it now.