Importing multiple AVIs completely automatically with macro

Hi everyone,

This is my first post so let me know if I’m doing anything wrong.

I am trying to use a macro to import a whole bunch of AVIs into ImageJ for further processing. The catch is that I would like to be able to do it without having to input parameters into the AVIReader dialogue (first frame, last frame, convert to grayscale, etc.) for each AVI that is opened. I’d like to just give it some default values and let it import all of the AVIs with those set values. I can already iterate over all the files in each folder and for each one I’ve tried using

open(avi_filename);

but you have to click ok for the AVIReader dialogue for each AVI. As far as I know there is no other way to open AVIs with ImageJ and there is also no way to pass parameters to the AVIReader plugin automatically. Maybe I’m wrong though since I’m rather inexperienced with ImageJ. Does anyone know if this is possible?

Thanks,
Michael

Welcome to the forum, @m3rickson!

The File > Import > AVI… command will be recorded by the Macro recorder in the way you need, e.g.:

run("AVI...", "open=/temp/movie.avi use convert flip");

Hope that helps.

1 Like

See also in general the Batch Processing page.

1 Like