I am using an R package (EBImage) on Windows to process image files and save to a ‘.tiff’ file. I want to then automatically open that file in ImageJ for viewing. To do this, I send a message to the command prompt to open the file using imageJ as below:
> ImageJ-win64.exe -file-name example.tiff
This works, and opens the file in ImageJ as I want. The problem is that this command will open a new instance of ImageJ even if there is one already running. So if I open 5 images in this way, I end up with 5 separate instances of ImageJ running. Crazy!
How can I avoid opening a new ImageJ with each file?
EDIT: To clarify, I do not want to open ImageJ in headless mode. I want to open the full program with all the tool-bars etc. The purpose of using this command is so I can automate opening files for viewing on screen.