Re: macro to divide two summary results
Posted by Gabriel Landini on
URL: http://imagej.273.s1.nabble.com/macro-to-divide-two-summary-results-tp3700523p3700526.html
dieter moehring wrote:
> I am looking for a macro that makes a calculation between two summaries.
> What I need is a macro for the following calculation:
> Total Area of sample B x 100 / Total Area of sample A
> The calculated value should be shown in a new window, that is named, for
> example "Result of Bx100/A"
I am not sure that there is an easy/straightforward way to do this just by
calling one command.
I guess that you would have to get the text from the summary windows, then
parse the quantities into variables, make sure you are getting the right
quantities and operate on them.
If you are just wanting operations between total areas of 2 images, why not do
a macro with a dialog where you input the thresholded image/window names,
then the macro counts the pixels (or extract the areas from the image
histograms) and do the calculation you need within the same macro?
That is the way I would do it.
Cheers,
G.