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 #532 (closed defect: fixed)

Opened 2011-05-20T14:11:42-05:00

Last modified 2012-02-24T16:51:36-06:00

Make legacy layer smarter about handling new IJ2 data types

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: biweekly-2011: May-23 to Jun-03
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1011


Freshly start IJ2. Create a gradient image that is 12-bit. Run the Image :: Transform :: Rotate IJ1 plugin. What happens?

Waiting for #529 to be fixed before this scenario may work.

Change History

comment:1 Changed 2011-05-24T10:39:38-05:00 by bdezonia

After 529 fix running this sequence results in an exception:

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

at java.lang.System.arraycopy(Native Method)
at ij.process.ColorProcessor.snapshot(
at ij.plugin.filter.PlugInFilterRunner.<init>(
at ij.IJ.runPlugIn(
at ij.IJ.runPlugIn(
at imagej.plugin.PluginManager$

Unsigned 12-bit is stored internally as pixel values packed in an array of ints. Thus IJ1 thinks its a color image and the array size is not appropriate.

I think what we really need to do is detect that this type not representable in IJ1 and avoid actually running plugin (informing user). Or else ask if user wants best attempt and translating the data into an IJ1 type.

comment:2 Changed 2011-05-24T10:41:03-05:00 by bdezonia

  • Summary changed from Test this scenario to Make legacy layer smarter about handling new IJ2 data types

comment:3 Changed 2011-05-26T14:21:54-05:00 by bdezonia

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

Fixed (revision unknown but shortly before 0caeefd22661dc1682e264477970144c564f5b97). The legacy layer now translates all data types back and forth between IJ1 as needed.

comment:4 Changed 2012-02-24T16:51:36-06:00 by curtis

  • Blocking 1011 added