Login  Register

Multiple Image sequence open commands in a macro

Posted by Guenter Giese on Dec 04, 2009; 4:22pm
URL: http://imagej.273.s1.nabble.com/Multiple-Image-sequence-open-commands-in-a-macro-tp3689974.html

Dear list members,
 
I would like to improve a macro by which I open several image sequences from
one directory.
 
This macro contains multiple command lines like:
 
run("Image Sequence...", "+((open)+  number=stack_size starting=1
increment=1 scale=100 file=r00 sort use)");
run("Image Sequence...", "+((open)+  number=stack_size starting=1
increment=1 scale=100 file=r01 sort use)");
run("Image Sequence...", "+((open)+  number=stack_size starting=1
increment=1 scale=100 file=r02 sort use)");
 
when I run the macro with, e.g. eight run("Image Sequence...",  lines , the
File.open dialog is opened eight times.
 
Since, ***any** image file in the directory can be chosen (double-clicked)
during each dialog (the macro handles the file selection), it should be
sufficient to choose a file only once (i.e. by the first dialog only, or by
a previous dialog) .
 
Such a file name can be queried from the user by:
path = File.openDialog("Select a File");
I tried to pass this "path" to the run("Image Sequence...", ) lines, but
this did not work yet.
 
How can I pass the path and filename to all the run("Image Sequence...",)
instances to have all the other file sequences opened automatically?
 
Best,
 
Guenter
---------------------------------------------------------------------
Dr. Guenter Giese
Light Microscopy Facility Manager
Dept. of Biomedical Optics
MPI fuer Medizinische Forschung Jahnstr. 29
D-69120 Heidelberg, Germany
Phone (+49) 6221-486-360 (Fax: -325)
e-mail: [hidden email]