AddSlice to Composite Image causes exception

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

AddSlice to Composite Image causes exception

Michael Ellis
There seems to be a problem when adding an extra slice to a composite image. Problem seems to be easily reproduced with the following macro:

newImage("Untitled", "8-bit White", 400, 400, 3);
run("Make Composite", "display=Composite");
run("Add Slice");

The following exception is thrown:

java.lang.ArrayIndexOutOfBoundsException: 3
        at ij.CompositeImage.updateImage(CompositeImage.java:290)
        at ij.CompositeImage.updateAndDraw(CompositeImage.java:180)
        at ij.ImagePlus.updateAndRepaintWindow(ImagePlus.java:300)
        at ij.ImagePlus.setSlice(ImagePlus.java:1280)
        at ij.plugin.StackEditor.addSlice(StackEditor.java:50)
        at ij.plugin.StackEditor.run(StackEditor.java:24)
        at ij.IJ.runPlugIn(IJ.java:156)
        at ij.Executer.runCommand(Executer.java:124)
        at ij.Executer.run(Executer.java:61)
        at ij.IJ.run(IJ.java:249)
        at ij.IJ.run(IJ.java:227)
        at ij.macro.Functions.doRun(Functions.java:563)
        at ij.macro.Functions.doFunction(Functions.java:79)
        at ij.macro.Interpreter.doStatement(Interpreter.java:203)
        at ij.macro.Interpreter.doStatements(Interpreter.java:191)
        at ij.macro.Interpreter.run(Interpreter.java:102)
        at ij.macro.Interpreter.run(Interpreter.java:72)
        at ij.macro.MacroRunner.run(MacroRunner.java:124)
        at java.lang.Thread.run(Thread.java:680)

The problem is reproducible and appears on both Mac and PC platforms.
Currently testing with imageJ 1.4.5a and Java 6.0


Michael Ellis
Managing Director
Digital Scientific UK Ltd.
http://www.dsuk.biz
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: AddSlice to Composite Image causes exception

Rasband, Wayne (NIH/NIMH) [E]
On Feb 12, 2011, at 6:08 AM, [hidden email] wrote:

> There seems to be a problem when adding an extra slice to a composite image. Problem seems to be easily reproduced with the following macro:
>
> newImage("Untitled", "8-bit White", 400, 400, 3);
> run("Make Composite", "display=Composite");
> run("Add Slice");
>
> The following exception is thrown:
>
> java.lang.ArrayIndexOutOfBoundsException: 3
> at ij.CompositeImage.updateImage(CompositeImage.java:290)
> at ij.CompositeImage.updateAndDraw(CompositeImage.java:180)
> at ij.ImagePlus.updateAndRepaintWindow(ImagePlus.java:300)
> at ij.ImagePlus.setSlice(ImagePlus.java:1280)
> at ij.plugin.StackEditor.addSlice(StackEditor.java:50)
> at ij.plugin.StackEditor.run(StackEditor.java:24)
> at ij.IJ.runPlugIn(IJ.java:156)
> at ij.Executer.runCommand(Executer.java:124)
> at ij.Executer.run(Executer.java:61)
> at ij.IJ.run(IJ.java:249)
> at ij.IJ.run(IJ.java:227)
> at ij.macro.Functions.doRun(Functions.java:563)
> at ij.macro.Functions.doFunction(Functions.java:79)
> at ij.macro.Interpreter.doStatement(Interpreter.java:203)
> at ij.macro.Interpreter.doStatements(Interpreter.java:191)
> at ij.macro.Interpreter.run(Interpreter.java:102)
> at ij.macro.Interpreter.run(Interpreter.java:72)
> at ij.macro.MacroRunner.run(MacroRunner.java:124)
> at java.lang.Thread.run(Thread.java:680)
>
> The problem is reproducible and appears on both Mac and PC platforms.
> Currently testing with imageJ 1.4.5a and Java 6.0

This bug is fixed in the 1.45b daily build.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: AddSlice to Composite Image causes exception

Michael Ellis
Wayne, wow! That was fast!

I have a light bulb that needs changing in a display cabinet, the car needs a service and kid's beds need changing.

That's the problem with great service... right?

Thanks and regards -- Michael Ellis


On 13 Feb 2011, at 00:57, Rasband, Wayne (NIH/NIMH) [E] wrote:

> On Feb 12, 2011, at 6:08 AM, [hidden email] wrote:
>
>> There seems to be a problem when adding an extra slice to a composite image. Problem seems to be easily reproduced with the following macro:
>>
>> newImage("Untitled", "8-bit White", 400, 400, 3);
>> run("Make Composite", "display=Composite");
>> run("Add Slice");
>>
>> The following exception is thrown:
>>
>> java.lang.ArrayIndexOutOfBoundsException: 3
>> at ij.CompositeImage.updateImage(CompositeImage.java:290)
>> at ij.CompositeImage.updateAndDraw(CompositeImage.java:180)
>> at ij.ImagePlus.updateAndRepaintWindow(ImagePlus.java:300)
>> at ij.ImagePlus.setSlice(ImagePlus.java:1280)
>> at ij.plugin.StackEditor.addSlice(StackEditor.java:50)
>> at ij.plugin.StackEditor.run(StackEditor.java:24)
>> at ij.IJ.runPlugIn(IJ.java:156)
>> at ij.Executer.runCommand(Executer.java:124)
>> at ij.Executer.run(Executer.java:61)
>> at ij.IJ.run(IJ.java:249)
>> at ij.IJ.run(IJ.java:227)
>> at ij.macro.Functions.doRun(Functions.java:563)
>> at ij.macro.Functions.doFunction(Functions.java:79)
>> at ij.macro.Interpreter.doStatement(Interpreter.java:203)
>> at ij.macro.Interpreter.doStatements(Interpreter.java:191)
>> at ij.macro.Interpreter.run(Interpreter.java:102)
>> at ij.macro.Interpreter.run(Interpreter.java:72)
>> at ij.macro.MacroRunner.run(MacroRunner.java:124)
>> at java.lang.Thread.run(Thread.java:680)
>>
>> The problem is reproducible and appears on both Mac and PC platforms.
>> Currently testing with imageJ 1.4.5a and Java 6.0
>
> This bug is fixed in the 1.45b daily build.
>
> -wayne