Re: Using getTitle()
Posted by epigenetic on Sep 04, 2010; 9:43pm
URL: http://imagej.273.s1.nabble.com/Using-getTitle-tp3687039p3687041.html
Hi Jerome,
I have similar problem like jmutterer.
I have two image ;one from red channel and other is from green channel. My file name are "2 min 10x_ch00.tiff" and "2 min 10x_ch01".I dragged and dropped on Imagej window. After that, I try to merge two picture by using macro.I tried your suggestion
name = getTitle();
prefix = substring (name, 0, lastIndexOf(name," "));
run("Merge Channels...", "red=[+prefix+"ch01] green=[+prefix+"ch00] blue=*None* gray=*None* create");
rename (prefix+"_merged.tif");
saveAs("Tiff");
however, it gave error message like following;
')' expected in line 3.
run("Merge Channels..."',"red=[+prefix+<ch01>] green=[+prefix+ch00] blue=*None* GRAY=*nONE* create');
Could you please tell me how I can merge two diiferent files by using macro?
thanks
Taylan