NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 407 - Process>Multiple Image Processor fails
Process>Multiple Image Processor fails
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Other
unspecified
Macintosh Mac OS
: P2 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2012-02-24 16:18 CST by Jan Eglinger
Modified: 2012-02-24 17:31 CST
0 users

See Also:

Description Jan Eglinger 2012-02-24 16:18:33 CST
Hi all,

Batch processing of macros seems to fail when using "Multiple Image Processor":

- start 'Process'>'Multiple Image Processor'
- select an input folder (in my test case containing a single 8-bit tif file)
- select an output folder (an empty folder in my case)
- select a macro file (in my case containing only 'run("Invert");')
- click 'OK'

Fiji will throw an error message "Unrecognized command: Run..." and the following stack trace:

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at ij.Command.runPlugIn(Command.java:146)
	at ij.Command.runCommand(Command.java:95)
	at ij.Executer.run(Executer.java:64)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: Macro canceled
	at ij.IJ.abort(IJ.java:1780)
	at ij.IJ.testAbort(IJ.java:310)
	at ij.IJ.run(IJ.java:252)
	at MultipleImageProcessor.convert(MultipleImageProcessor.java:503)
	at MultipleImageProcessor.run(MultipleImageProcessor.java:438)
	at ij.IJ.runUserPlugIn(IJ.java:183)
	at ij.IJ.runPlugIn(IJ.java:150)
	... 8 more


When running the same macro via 'Process'>'Batch'>'Macro...', everything works as expected.

Cheers,
Jan
Comment 1 Wayne Rasband 2012-02-24 17:31:40 CST
The "Multiple Image Processor" runs on Macs and Linux if you change

   if(IJ.isWindows()){
      IJ.runMacroFile(FileMacro,"");
   }else{      
      IJ.run("Run... ", "run=" + FileMacro);
   }

to

   IJ.runMacroFile(FileMacro,"");

in MultipleImageProcessor.java.

-wayne