Run the Edit>Selection>Fit Ellipse command to fit the ellipse. Here is
an example:
newImage("Test", "RGB White", 400, 400, 1);
makePolygon(22,143,215,32,292,68,195,132,175,208);
setForegroundColor(0,0,0);
run("Draw");
run("Fit Ellipse");
run("Draw");
run("Select None");
-wayne
On Dec 7, 2007, at 11:56 AM, jiajian shen wrote:
> *Dear All,*
> **
> *Sorry to bother. I want to fit an ellipse and draw it to my ROI. I
> found
> that there is a EllipseFitter class. But it is not in the menu of
> ImageJ.
> Anyone knows how to run EllipseFitter in a macro, if I have chose the
> ROI
> with XCoordinates and YCoordinates? I am looking for some macro like
> **run("EllipseFitter",
> xarr,yarr);, but it does not work. *
> **
> *The EllipseFitter only works for closed ROI. For a set of
> (xarr,yarr), how
> to fit an ellipse if the points are discrete? *
> **
> *Thanks a lot,*
> *Jiajian*
>