Re: Feret measurements

Posted by Rasband, Wayne (NIH/NIMH) [E] on
URL: http://imagej.273.s1.nabble.com/Feret-measurements-tp5000233p5000235.html

On Sep 27, 2012, at 3:59 PM, Rodrigo Gonçalves wrote:

> Hi guys,
>
> I found that the definition of the Feret's measurements might change for different software/webpages.
>
> To test how ImageJ goes with this, I opened a new image in Fiji under Windows, created a 'perfect' circle pressing CTRL to keep the ratio aspect, and then filled it and measured it.
>
> The max and min Feret's look ok, but then I have FeretX and FeretY which I don't fully understand.
>
> From the ImageJ user guide (http://rsbweb.nih.gov/ij/docs/user-guide.pdf and http://rsbweb.nih.gov/ij/docs/guide/146-30.html) I would expect to obtain the length of the object’s projection in the X (FeretX) and Y (FeretY) direction. If this is correct, then in a perfect circle MaxFeret, MinFeret, FeretX, FeretY should all have the same value, right? Because I expect the projection of a circle on the X axis will equal de circle's diameter, is that so?
>
> But I get a Feret's diameter = 288 while FeretX and FeretY are 78 and 73, respectively.
>
> What am I missing here?

FeretX and FeretY are the starting coordinates of the Feret diameter. Here is a macro that draws the Feret diameter.

   List.setMeasurements;
   x1 = List.getValue("FeretX");
   y1 = List.getValue("FeretY");
   length = List.getValue("Feret");
   degrees = List.getValue("FeretAngle");
   if (degrees>90)
       degrees += 180;
   angle = degrees*PI/180;
   x2 = x1 + cos(angle)*length;
   y2 = y1 - sin(angle)*length;
   setColor("red");
   Overlay.drawLine(x1, y1, x2, y2);
   Overlay.show();

-wayne

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