What algorithm ImageJ uses when measuring area?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What algorithm ImageJ uses when measuring area?

Justin Zhou Yong
Hi all,

Suppose I have enclosed an area using the polygon selection tool and got
ImageJ help me measure the enclosed area with its Measure function. I
wish to know how does ImageJ do it i.e. by trapezoidal rule or something
else? Also if possible, can someone point to me the folder in which the
code lies?

Regards,
Justin

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

Re: What algorithm ImageJ uses when measuring area?

Rasband, Wayne (NIH/NIMH) [E]
On Apr 22, 2014, at 5:22 AM, Justin Zhou Yong wrote:

> Hi all,
>
> Suppose I have enclosed an area using the polygon selection tool and got
> ImageJ help me measure the enclosed area with its Measure function. I
> wish to know how does ImageJ do it i.e. by trapezoidal rule or something
> else? Also if possible, can someone point to me the folder in which the
> code lies?

ImageJ measures the area by using the PolygonFiller at

   http://imagej.nih.gov/ij/source/ij/process/PolygonFiller.java

to convert the polygon to a binary mask and then counting the non-zero pixels in the mask. Use the Edit>Selection>Create Mask command to see what the mask looks like.

-wayne

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