Re: Macro/plugin for image calculations: is this possible?
Posted by
Michael Schmid on
May 16, 2007; 5:44pm
URL: http://imagej.273.s1.nabble.com/Macro-plugin-for-image-calculations-is-this-possible-tp3687283p3687287.html
On 16 May 2007, at 17:43, J PIke wrote:
> If I put in a value
> instead of a getResult command it works fine e.g.
>
> Replace:
>
> NIRcal = getResult("Mean",nResults-1);
>
> with:
>
> NIRcal = "value=70.000";
>
> I find this strange as if I display NIRcal e.g. print(NIRcal) it
> shows the
> value that I want it to use. It just refuses to use this value in
> the divide
> operation.....
>
> (...)
> NIRcal = getResult("Mean",nResults-1);
> run("Divide...", NIRcal);
you need the string NIRcal = "value=70.000" as argument to run
("Divide..."
So it should be NIRcal = "value=" + getResult("Mean",nResults-1);
Michael