Re: ImageJ does not work from the command line if image name contains parenthesis
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Dec 23, 2015; 3:29am
URL: http://imagej.273.s1.nabble.com/ImageJ-does-not-work-from-the-command-line-if-image-name-contains-parenthesis-tp5015265p5015277.html
> On 2015-12-21 13:56:59 GMT, Stein Rørvik wrote:
>
> 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.
This bug is fixed in the latest ImageJ daily build (1.50f30). It caused macros and scripts run from the command line to fail if the argument contained a “(“ character.
-wayne
> 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