Ticket #532 (closed defect: fixed)

Opened 9 years ago

Last modified 8 years ago

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 9 years ago 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(ColorProcessor.java:187)
at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:98)
at ij.IJ.runPlugIn(IJ.java:158)
at ij.IJ.runPlugIn(IJ.java:139)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:104)
at imagej.plugin.PluginRunner.run(PluginRunner.java:81)
at imagej.plugin.PluginManager$1.run(PluginManager.java:131)
at java.lang.Thread.run(Thread.java:680)

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 9 years ago by bdezonia

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

comment:3 Changed 9 years ago 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 8 years ago by curtis

  • Blocking 1011 added
Note: See TracTickets for help on using tickets.