Virtual Stack BioFormats Macro command

Hi everyone,

I’m trying to open a cxd file through a macro on the command line. Whenever I use run(“Bio-formats”) or run(“Bio-formats Importer”), the macro works fine using the ImageJ/Fiji gui. However, if I run it via the command line (./ImageJ-linux64 …) I obtain a strange error with a bunch of bytecode and other errors.

I’ve had luck opening the image using the Macro Extension’s “openImagePlus” function via command line but it forces me to open it with default settings. I’d like to have the otpion to open it with virtual stack. Are there any alternatives to opening the images with virtual stack aside from these options? Thank you.

Hi @dnguyen, what sort of errors are you seeing from the command line?
You can set the options used by “openImagePlus” as below, does that help?

String id = "/path/to/myFile.ext";
ImporterOptions options =  new ImporterOptions();
ImagePlus[] imps = BF.openImagePlus(options);