NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #423 (closed defect: fixed)

Opened 2011-04-01T15:48:44-05:00

Last modified 2011-05-23T10:56:12-05:00

Z Project can fail with an exception

Reported by: bdezonia Owned by: gharris
Priority: major Milestone: imagej-2.0-alpha3
Component: Display API Version:
Severity: serious Keywords:
Cc: Blocked By:


Using the Image > Stacks > Z Project command with T1 Head can fail. If you choose Average Intensity it works. If you choose Median you get an exception thrown.

Exception in thread "PluginRunner-imagej.legacy.plugin.LegacyPlugin" java.lang.ArrayIndexOutOfBoundsException: 393210

at java.awt.image.ComponentColorModel.getRGBComponent(
at java.awt.image.ComponentColorModel.getRed(
at java.awt.image.ComponentColorModel.getRGB(
at sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(
at sun.java2d.loops.GraphicsPrimitive.convertFrom(
at sun.java2d.loops.GraphicsPrimitive.convertFrom(
at sun.java2d.loops.MaskBlit$General.MaskBlit(
at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(
at sun.java2d.pipe.DrawImage.blitSurfaceData(
at sun.java2d.pipe.DrawImage.renderImageCopy(
at sun.java2d.pipe.DrawImage.copyImage(
at sun.java2d.pipe.DrawImage.copyImage(
at sun.java2d.pipe.ValidatePipe.copyImage(
at sun.java2d.SunGraphics2D.drawImage(
at sun.java2d.SunGraphics2D.drawImage(
at imagej.ui.swing.display.NavigableImagePanel.toCompatibleImage(
at imagej.ui.swing.display.NavigableImagePanel.setImage(
at imagej.ui.swing.display.AWTDisplayController.update(
at imagej.ui.swing.display.AWTDisplayController.setDataset(
at imagej.ui.swing.display.AWTDisplayController.<init>(
at imagej.ui.swing.display.SimpleImageDisplay.display(
at imagej.display.DisplayPostprocessor.displayDataset(
at imagej.display.DisplayPostprocessor.handleOutput(
at imagej.display.DisplayPostprocessor.handleOutput(
at imagej.display.DisplayPostprocessor.handleOutput(
at imagej.display.DisplayPostprocessor.process(
at imagej.plugin.PluginRunner.postProcess(
at imagej.plugin.PluginManager$

Change History

comment:1 Changed 2011-04-06T11:54:14-05:00 by bdezonia

  • Owner changed from bdezonia to gharris
  • Status changed from new to assigned

This is now working. I believe my code for full support of all pixel types in display code may have cleaned this up. The stack trace shows some ARGB code is getting exercised. The new display code only creates 16-bit grayscale images so these lower level calls should be avoided.

When color support is in place we should retest that this is still working.

comment:2 Changed 2011-05-23T10:56:12-05:00 by gharris

  • Status changed from assigned to closed
  • Resolution set to fixed