Login  Register

using variable with "add" function

Posted by Ka Wai Tse on Jun 24, 2009; 12:05am
URL: http://imagej.273.s1.nabble.com/using-variable-with-add-function-tp3692029.html

Hi all,
I'm trying to add a value (p) to each of the images in my stack. This value
(p) changes for each picture according to the function p= 5-mean. When i run
the following code below, it runs but i find it to add "5" to all of my
images not "5-mean" whatever "mean" is for that particular image. Any idea
why it's doing this?

getStatistics (mean);
y=mean;
p= 5.0000 - mean;
run("Add...", + p +);