Page 1 of 1

Measure Tool and area

Posted: October 19th, 2024, 6:55 am
by tomczak
I need to integrate a few experimental plots presented in form of images. There are several online plot digitisers that are supposed to first calibrate the plot based on scaled axes, and then, help in calculating areas under the curves in the right units. Somehow I didn't have much luck with them and got frustrated, and in addition some of those plots require rectification anyway, so I tried to figure out how to do that all in PWP.

I finally figured out that if I crop the plot image to the origin and the known values on the axes scale and then make a polygon mask aligned to the plotted curve and the axes, there is a Compute Area function in Mask Settings, which allows for easy calculation of what I want, which is the area under the curve (from the proportion of that to the whole cropped rectangular area which is easy to calculate).

It took me a while to figure it out, so my question is: would it be very difficult to implement Area in the Measure Tool to make it even easier to find?

Re: Measure Tool and area

Posted: October 19th, 2024, 7:37 am
by jsachs
It would mean duplicating a lot of machinery from the mask dialog box. Furthermore, the area computation as currently implemented works with all the mask tools, so in many cases you don't even need to outline the area you want to measure if you can select it by color or brightness. Mask also handles partial selection so anti-aliased edges or blurry masks are treated correctly. I just checked and the help topic for the Measure Tool does mention using Mask to compute areas (under Tips at the bottom).

Re: Measure Tool and area

Posted: October 19th, 2024, 8:01 am
by tomczak
Thanks!