|
Bugzilla – Bug 247 |
Exception with Macro scripting, command "Stack Combiner" |
Last modified: 2010-11-16 16:08:40 CST |
| ⚠ |
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. |
| Exception with Macro scripting, command "Stack Combiner" | |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|||||
When trying to recombine two stacks (which are actually two images in this case), Image J reports the following error, apparently connected to the scripting editor, in an 'Exception' window. The 'manual' recombination with the pulldown menu works, and the dimensions and formats of the 2 images are compatible. latest version 1.44i, Fiji updates done today (16-Nov-2010) java.lang.NullPointerException at Stack_Combiner.run(Stack_Combiner.java:32) at ij.IJ.runUserPlugIn(IJ.java:193) at ij.IJ.runPlugIn(IJ.java:154) at ij.Executer.runCommand(Executer.java:147) at ij.Executer.run(Executer.java:78) at ij.IJ.run(IJ.java:269) at ij.macro.Functions.doRun(Functions.java:559) at ij.macro.Functions.doFunction(Functions.java:79) at ij.macro.Interpreter.doStatement(Interpreter.java:201) at ij.macro.Interpreter.doStatements(Interpreter.java:189) at ij.macro.Interpreter.run(Interpreter.java:100) at ij.macro.Interpreter.run(Interpreter.java:72) at CLI.Refresh_Macros.runScript(Refresh_Macros.java:54) at common.RefreshScripts.runScript(RefreshScripts.java:392) at fiji.scripting.TextEditor$13.execute(TextEditor.java:1494) at fiji.scripting.TextEditor$Executer$1.run(TextEditor.java:1345) thanks anyone for some help, JHi Julien, Can you attach your macro code to this bug report to we can replicate the problem. Further info, recording the stack combiner in the macro recorder giving this command run("Stack Combiner", "stack=[Combined Stacks] stack=[Combined Stacks-1]"); also give as duplicate commend error. cheers, DanHi, As requested I put here an example of code, generated from the recorder with generic images (ramps), additional info: before the 'Exception' window opens, the 'MyImage' closes, but not 'MyRamp' (the second image to be combined) I hope someone will be able to reproduce the bug, thx a lot in advance Julien Macro code: newImage("MyRamp", "8-bit Ramp", 600, 50, 1); run("Rotate 90 Degrees Right"); newImage("MyImage", "8-bit Ramp", 600, 200, 1); run("Flip Horizontally"); run("Rotate 90 Degrees Right"); run("Stack Combiner", "stack=MyImage stack=MyRamp");Created attachment 30 A very generic code creating 2 ramp images and trying to combine them, which generates an 'Exception'The Stack Combiner plugin is built into ImageJ as the Image>Stacks>Tools>Combine command. Here is an updated version of the test macro that uses this command. newImage(MyRamp", "8-bit Ramp", 600, 50, 1); run("Rotate 90 Degrees Right"); newImage("MyImage", "8-bit Ramp", 600, 200, 1); run("Flip Horizontally"); run("Rotate 90 Degrees Right"); run("Combine...", "stack1=MyImage stack2=MyRamp"); -wayne