Access AVI Virtual Stack reader from script

This is probably a trivial question, but I couldn’t find any exact description in the web.

I am processing a lot of large .avi files (15+ GB each) which can only be opened by using virtual stacks. As I want to automatize the processing, I need an option to open an avi file with a virtual stack by script. My scripting language is Python.

Problematically, only the following options seem to be possible
IJ.run(TIFF Virtual Stack...","open="+file_path)
IJ.run(AVI...","open="+file_path)
which is either the wrong format or does not use a virtual stack.

I need something like:
IJ.run("AVI Virtual Stack...","open="+file_path) which does not seem to exist.

I know that it is possible to open this files, because it works perfectly in the GUI via File > Open. Would please anybody be so kind to point me to the solution.

If I record the file open command (macro recorder, I record a BeanShell command - quite similar to Jython) I get:

IJ.run("AVI...", "open=C:/MyFile/mri-stack.avi use");

With ‘use’ as an argument to open as a virtual stack.

1 Like

Strangely enough, I also used macro recorder to infer about the command. But from there I only got IJ.openImage() which always opens the pop-up window.

I tried it with use and it works perfectly. Thanks for saving my time :slight_smile:

This bug is fixed in the latest ImageJ daily build (1.52e4).

Upgrade to the latest ImageJ daily build (1.52e4) and you can open AVI files as virtual stacks, without displaying them, using

imp = IJ.openImage("/path/to/file.avi")