Re: Open an image sequence using a macro
Posted by Martin Höhne on Feb 28, 2014; 8:11am
URL: http://imagej.273.s1.nabble.com/Open-an-image-sequence-using-a-macro-tp5005969p5006713.html
Dear Wayne and All,
>> When I start Fiji and run the macro give below for the first time, stack1 is
>> opened fine without the Image Sequence dialog popping up. But stack2 does´t.
>> Instead the Image sequence dialog pops up. The options given in the macro,
>> e.g. scale=50) are not automatically taken in this dialog.
>>
>> When I run the macro for a second time, also the first stack is not opened
>> automatically.
> Here is a simplified version of the macro that should work better:
>
> source_dir = getDirectory("Source Directory");
> stack1=source_dir+"dir1"+File.separator;
> run("Image Sequence...", "open=&stack1 scale=50 convert sort");
> stack2=source_dir+"dir2"+File.separator;
> run("Image Sequence...", "open=&stack2 scale=50 convert sort");
>
> The original macro was missing the "&" notation needed for passing variables, it used a file path as the
> 'open=' parameter instead of a directory path, and it used parameters with default values ('number=',
> 'starting=', 'increment=', 'file=' and 'or=') that are not needed.
>
> -wayne
the above mentioned behaviour does not change with the simplified macro version. I am using
Fiji/ImageJ 1.48r; Java 1.6.0_24 on Win7 64 bit.
Martin