Login  Register

Re: run Bio-Formats importer from command line?

Posted by ctrueden on Apr 25, 2014; 9:09pm
URL: http://imagej.273.s1.nabble.com/run-Bio-Formats-importer-from-command-line-tp5007445p5007450.html

Hi Nick,

> I am wondering how I can run Bio-Formats importer from command line?

1) Use the Macro Recorder [1] to record the line of macro code that runs
Bio-Formats that way you want.

2) Click "Create" to pop up the Script Editor [2], edit as desired, then
save the macro as a .ijm macro file.

3) Run the macro from the command line:

    ImageJ-win32.exe -macro myMacro.ijm -batch

Leave off the "-batch" flag if you want Fiji to remain open afterward.

Note that you cannot use the "--headless" option [3] because Bio-Formats
does not work in headless mode, even when running as a macro. (You will see
"VerifyError" on the console if you try.)

I have added this information to the Bio-Formats wiki page:
http://fiji.sc/Bio-Formats#Calling_Bio-Formats_from_the_command_line

Regards,
Curtis

[1] http://fiji.sc/Introduction_into_Macro_Programming#The_recorder
[2] http://fiji.sc/Script_Editor
[3] http://fiji.sc/Headless#Running_macros_in_headless_mode


On Fri, Apr 25, 2014 at 3:24 PM, Nick X. Tsui <[hidden email]> wrote:

> Dear ImageJ fellows:
> Thanks for reading my questions.
> I am wondering how I can run Bio-Formats importer from command line?
> Suppose I know what image I want to load, and no need to pop the
> Bio-Formats importer window.
> something like this?
>
> imagej.exe myImage.tif -run ""Bio-Formats..., Bio-Formats importer" ?
>
> Thanks a lot.
> Best regards,
> Nick
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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