Login  Register

macro for automatic import of image sequences

Posted by Oliver Bannach on Mar 25, 2008; 4:53pm
URL: http://imagej.273.s1.nabble.com/macro-for-automatic-import-of-image-sequences-tp3696770.html

Hi folks

I'd like to have a macro for automatic opening of image sequences. This
is what the macro should do:
1) The main directory (dirX) needs to be specified by a popup dialog
2) The .tif files are located in subdirectories named ch0/ and ch1/,
respectively. The files (*.tif) in these two directories should be
imported as two image sequences
3) The two sequences should be colored red and green

I wrote this macro, but it doesn't seem to work:

dirX = getDirectory("Choose Source Directory ");
run("Image Sequence...", "open=[dirX\\ch0\\*.tif] number=6 starting=1
increment=1 scale=100 file=[] or=[] convert sort");
run("Green");
run("Image Sequence...", "open=[dirX\\ch1\\*.tif] number=6 starting=1
increment=1 scale=100 file=[] or=[] convert sort");
run("Red");

Maybe somebody can fix it? Any help is greatly appreciated. Many thanks
in advance!

regards
Oliver