Login  Register

Re: Open an image sequence using a macro

Posted by Rasband, Wayne (NIH/NIMH) [E] on Feb 28, 2014; 6:21pm
URL: http://imagej.273.s1.nabble.com/Open-an-image-sequence-using-a-macro-tp5005969p5006725.html

On Feb 28, 2014, at 3:11 AM, Martin Höhne wrote:

> 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.

This appears to be a Fiji-specific bug so you should report it using Fiji's Help>Report a Bug command. The report should include the simplified macro and it should note that the macro works with ImageJ but not with Fiji.

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html