Posted by
Jim Passmore on
URL: http://imagej.273.s1.nabble.com/Ring-Shaped-ROIs-tp3703395p3703399.html
ImageJ Interest Group <
[hidden email]> wrote on 03-14-2006 12:42:20
PM:
>
>
> Is there a way to define a ring shaped ROI with the macro language?
Carl,
Assuming your ring is the same thickness on all sides, you could try
something like this:
getPixelSize(unit, pw, ph, pd);
makeOval(x2, y2, width2, height2);
bandSizePixels="band="+d2s((width1-width2)*pw/2,0)
run("Make Band...", bandSizePixels);
This is a little awkward, as the "Make Band" command uses calibrated
distances, and makeOval uses pixel values, so you have to convert with the
values obtained with getPixelSize.
There may be other ways--this came to mind first. Hope it helps.
Jim
----------------------------------------------
Jim Passmore
Research Associate
Cryovac, Sealed Air Corporation
[hidden email]
864-433-2927 voice
864-433-2205 fax
----------------------------------------------