Login  Register

makeEllipse defined by angle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

makeEllipse defined by angle

Peter van Loon
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
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: makeEllipse defined by angle

Jerome Mutterer-3
Hi,
For rectangles with an angle, you can try the tilted rectangle tool
available from:

http://rsbweb.nih.gov/ij/macros/tools/TiltedRectangleTool.txt

Sincerely,
Jerome

On 7 August 2012 15:16, Peter van Loon <[hidden email]> 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
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: makeEllipse defined by angle

Michael Schmid
In reply to this post by Peter van Loon
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
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: makeEllipse defined by angle

Peter van Loon
In reply to this post by Peter van Loon
Hi Michael,


I didn't think of rotating, just that easy!
Thanks!

Peter

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: makeEllipse defined by angle

Peter van Loon
In reply to this post by Jerome Mutterer-3
Hi Jerome,

Thank you for showing me this macro. Nice to know the code I like to use is already available.

Regards,
Peter