image name as a variable
Posted by
kgeorge on
URL: http://imagej.273.s1.nabble.com/image-name-as-a-variable-tp5005464.html
Dear group,
I am calling file using a file open statement. I would like to merge the final result of this file after analysis as an overlay with an 8-bit version of the original.
Because the image name changes with the file that is called, how do I program the merge statement as opposed to the fixed file name that is given when using the macro recorder?
I have tried variable names:
temp=getImageID();
temp2=getImageID();
run("Merge Channels...", "c1=[temp2] c4=temp create keep");
or printing the outputs of these variables to the screen and coding them directly:
run("Merge Channels...", "c1=[-221] c4=-227 create keep");
I looked deeper into this and believe concatenation or something like may be required.
Lastly, what is the significance of the square brackets in the Merge Channels line? I have seen this in other statements.
Thanks in advance.
Ken
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html