ImageJ does not work from the command line if image name contains parenthesis
Posted by
Stein Rørvik on
Dec 21, 2015; 1:49pm
URL: http://imagej.273.s1.nabble.com/ImageJ-does-not-work-from-the-command-line-if-image-name-contains-parenthesis-tp5015265.html
I am experiencing this problem in all versions of ImageJ/Fiji that I have tested:
I am unable to launch ImageJ from the command line on Windows if the image of interest contains parenthesis characters.
The error message I get is "Macro or script not found" and a messed up path, which indicates that the input strings are not parsed correctly in this case. See for yourself by testing something similar. It seems to be related to the "Single Instance Listener" function, because it works fine if ImageJ is not already running.
Here is an example:
This works ok:
"C:\Program Files\ImageJ\ImageJ.exe" -macro "C:\MyPath\Test Macro.ijm" "C:\MyPath\MyImage.tif"
This does not work:
"C:\Program Files\ImageJ\ImageJ.exe" -macro "C:\MyPath\Test Macro.ijm" "C:\MyPath\MyImage (2).tif"
It fails if "Single Instance Listener" is on and ImageJ is running.
It works if "Single Instance Listener" is on and ImageJ is not running.
It works if "Single Instance Listener" is off and ImageJ is running. ImageJ is then (as expected) launched twice.
Is this a bug? If not, does anyone have a suggestion for a workaround?
I cannot rename my input images because they are on a file system which is read-only.
I prefer to have Single Instance Listener on because a lot of my workflow is based on scripts running from the command line.
This is a generic launch problem, the contents of the macro file does not matter.
Stein
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html