Login  Register

Bug in command line macro interpreter

Posted by Michael Doube-4 on Oct 29, 2012; 4:08pm
URL: http://imagej.273.s1.nabble.com/Bug-in-command-line-macro-interpreter-tp5000567.html

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.

This seems to persist over different OSes and JREs so we guess it's an IJ bug.
https://groups.google.com/d/topic/bonej-users-and-developers/u0wQNoMUG0I/discussion

Michael

--
Dr Michael Doube
BPhil BVSc PhD MRCVS
Lecturer, Comparative Biomedical Sciences
The Royal Veterinary College
London NW1 0TU
United Kingdom

+44 (0)20 7121 1903
[http://www.rvc.ac.uk/cf_images/button_rvc.png]<http://www.rvc.ac.uk>    [http://www.rvc.ac.uk/cf_images/button_twitter.png] <http://twitter.com/RoyalVetCollege>     [http://www.rvc.ac.uk/cf_images/button_facebook.png] <http://www.facebook.com/theRVC>

This message, together with any attachments, is intended for the stated addressee(s) only and may contain privileged or confidential information. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Royal Veterinary College (RVC). If you are not the intended recipient, please notify the sender and be advised that you have received this message in error and that any use, dissemination, forwarding, printing, or copying is strictly prohibited. Unless stated expressly in this email, this email does not create, form part of, or vary any contractual or unilateral obligation. Email communication cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, amended, lost, destroyed, incomplete or contain viruses. Therefore, we do not accept liability for any such matters or their consequences. Communication with us by email will be taken as acceptance of the risks inherent in doing so.

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