Login  Register

Combine ROIs in a macro ?

Posted by lechristophe on Jul 24, 2008; 1:39pm
URL: http://imagej.273.s1.nabble.com/Combine-ROIs-in-a-macro-tp3695529.html

I wuld like to select two ROIs in the manager and combine them in a
macro. What is wrong in the following code ?

newImage("test", "8-bit Black", 128, 128, 1);
makeRectangle(54, 35,10,10);
roiManager("Add");
makeRectangle(70, 70,10,10);
roiManager("Add");
roiManager("select",0);
setKeyDown("alt");
roiManager("select",1);
roiManager("Combine");

The composite macro is displayed, but I get the error : "More than one
item must be selected, or none". Using shift as a modifier leads to
the same error. Any ideas ?

Christophe Leterrier