Re: Using getTitle()
Posted by
mnqslbs2 on
Mar 09, 2009; 3:24pm
URL: http://imagej.273.s1.nabble.com/Using-getTitle-tp3687039p3687043.html
Hello Jerome,
Thank you very much, that did the trick.
Cheers
Ben
jerome mutterer-2 wrote
On Mon, Mar 9, 2009 at 2:29 PM, mnqslbs2 <sutcliffe.ben@gmail.com> wrote:
> Hello all,
Hello,
> The stacks are called "Series003 Red" and "Series003 Green" however the 003
> sometimes changes to 004, or 005 etc. Everything else remains the same.
>
Get the part of the title string that starts at the beginning and extends to
the last 'space', and use it to build the images names:
name = getTitle();
prefix = substring (name, 0, lastIndexOf(name," "));
run("Merge Channels...", "red=["+prefix+" Red] green=["+prefix+" Green]
blue=*None* gray=*None*");
rename (prefix+"_merged.tif");
saveAs("Tiff");
Sincerely,
Jerome