Thanks a lot! I wasn't aware of how powerful macro's can be. After a little adaptation (as shown below) it worked like a charm.
x = 8;
y = 8;
width = 40;
height = 40;
spacing = 3;
numRow = 10;
numCol = 6;
for(i = 0; i < numRow; i++)
{
for(j = 0; j < numCol; j++)
{
xOffset = j * (width + spacing);
print(xOffset);
yOffset = i * (height + spacing);
print(yOffset);
makeRectangle(x + xOffset, y + yOffset, width, height);
roiManager("Add");
if (roiManager("count") > 100)
{
print("Maximum reached: 100 entries have been created.");
exit;
}
}
}
On Thu, Apr 7, 2011 at 10:48 PM, Nathaniel Ryckman [via ImageJ]
<[hidden email]> wrote:
By the way, I don't know if you realize this, but you can simply drag your .roi file onto your imageJ menu and then the .roi will be displayed on the image that is currently open.
To unsubscribe from How to create a regular grid of rectangular ROI's?,
click here.