Login  Register

Re: Bug in command line macro interpreter

Posted by Rasband, Wayne (NIH/NIMH) [E] on Nov 01, 2012; 11:04am
URL: http://imagej.273.s1.nabble.com/Bug-in-command-line-macro-interpreter-tp5000567p5000625.html

On Oct 29, 2012, at 12:08 PM, Doube, Michael wrote:

> Dear all,
>
> A BoneJ user just reported a bug in the way a particular macro command was being interpreted when called from the command line.
>
> The plugin Structure Model Index http://bonej.org/smi generates this macro code in the macro recorder:
>
> run("Structure Model Index", "smi=[Hildebrand & Rüegsegger] voxel=2 mesh=0.500");
>
> If this is run from the ImageJ macro editor, all is OK.
>
> But, the result is wrong if it is run from the command line, e.g. with this command:
>
> java -jar -Xmx4g ij.jar -macro ~/ImageJ/macros/test
>
> (Where 'test' is a macro that opens a file and runs the above run() command)
>
> What happens is that the second item on the list, 'SkyScan', is chosen and run instead of the first item, 'Hildebrand & Rüegsegger'.
>
> We think that this might be due to an unescaped character or similar, because there is an & and an ü in the code. My mistake for using weird characters in a menu command.

Non-ascii characters, such as umlaut-u, are problematic in the ImageJ macro language. Starting with the v1.47e daily build, the recorder displays a warning when the options string of a run(command, options) call contains one or more non-ascii characters.

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