Re: makeEllipse defined by angle

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/makeEllipse-defined-by-angle-tp4999674p4999675.html

Hi Peter,

here is a simple macro that draws an ellipse centered at (x=128, y=128), major and minor axes of 100 and 50, and rotated (clockwise) by 33°:

run("Specify...", "width=100 height=50 x=128 y=128 oval centered");
run("Rotate...", "angle=33");
run("Draw");

You can replace the numbers by variables with ampersands, e.g.
  "width=&majorAxis height=&minorAxis ..."

Michael
________________________________________________________________
On Aug 7, 2012, at 15:16, Peter van Loon wrote:

> Hi,
>
> I like to draw an Ellipse ROI  based on center x and y (some reference to start), length, width, and angle by a macro function. The angel can make it easy for me to draw such ROI in any direction.
>
> I found a macro to draw such ellipse at http://rsbweb.nih.gov/ij/macros/DrawEllipse.txt
> Is there an equivalent to make a ellipse or rectangle ROI defined by starting point, length, width and angle?
>
> Thanks in advance!
>
> Peter

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html