Login  Register

using variables in a plugin numeric field

Posted by shihj on Jan 22, 2010; 8:36pm
URL: http://imagej.273.s1.nabble.com/using-variables-in-a-plugin-numeric-field-tp3689605.html

Hi everyone,

I am currently writing a macro that calculates a certain threshold for a picture, and then uses the threshold value of each picture in the "Colocalization" plugin (http://rsbweb.nih.gov/ij/plugins/colocalization.html). So far, I have all the threshold values calculated and recorded in a Results table, but when I try to call these values up (using getResult("Threshold", 1)) to insert in the options string of the Colocalization function, it doesn't work. I looked at the source code of the Colocalization plugin, and the values that are required go into a numeric field. So the following line, as written, doesn't work at the threshold_channel_1 and threshold_channel_2 options:

run("Colocalization ", "channel_1=594-0001 channel_2=488-0001 ratio=50 threshold_channel_1=getResult("Threshold", 1) threshold_channel_2=getResult("Threshold", 6) display=255 colocalizated");

How do I get the options of a plugin to take variables?

Thanks for any help,
Jennifer