MACRO: pass variable to plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

MACRO: pass variable to plugin

dietmar13
how can in pass a variable to a plugin-run:

setBatchMode(true);
dir1 = getArgument;
print(dir1);
list = getFileList(dir1+File.separator);
print(list[0]);
for (i=0; i<list.length; i++) {
open(dir1+File.separator+list[i]);
}
dir2 = dir1+File.separator;
run(
        "ImmunoRatio ",
        "source_images= " +
        "blankfield_image=C:\\Users\\bachmayr\\Documents\\ImageJ\\examples\\darkfield.jpg " +
        "log_file=&dir2+_log.txt " +
        "result_image_directory=&dir2 " +
        "source_image_copy_directory= " +
        "brown_threshold_adjustment=0 " +
        "blue_threshold_adjustment=-20 " +
        "scale_pixels_per_um=1.96 " +
        "result_correction_coefficient_a=0.00006442 " +
        "result_correction_coefficient_b=-0.0019840 " +
        "result_correction_coefficient_c=0.61100000 " +
        "result_correction_coefficient_d=0.43210000 " +
        "sample_identifier=summary "
    );

how can i pass the variable dir1 (=path) to the lines with "log_file=... " and "result_image_directory=... "

i have tried '&'
"result_image_directory=&dir2 "
and string concatenation
"result_image_directory="+dir2+ " +

none of them is working.

please help!!

dietmar