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

Opened 2011-05-06T17:24:26-05:00

Last modified 2011-05-10T15:05:09-05:00

Legacy layer gotchas

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: biweekly-2011: May-09 to May-20
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

If an IJ1 plugin modifies the ImageStack of an ImagePlus that is associated with a Dataset right now this is mostly undetected. If user adds or deletes a slice we catch it.

Otherwise imagine a user reorders planes within the stack. Since this can be done by getting the internal Object[] slice stack of the ImageStack and manipulating it we have little recourse. We might have to record the stack order before the plugin call and check it afterwards.

Or imagine that a user calls imp.setStack(newStack). We might have to intercept this call in the legacy layer and do something smart.

Change History

comment:1 Changed 2011-05-10T11:02:17-05:00 by bdezonia

  • Status changed from new to accepted

Attempted to be notified when setStack() called in the LegacyManager but that lead to manager initialization errors. Also setStack() called inside ImagePlus constructors so its possible to pass an ImagePlus along that is not fully constructed.

Since setStack() usually updates the gui I detect calls to repaintWindow() in LegacyManager. So many manipulations of the stack can now be caught.

But the reordering of planes within the stack by using the Object[] array is not supported. I saw this done in ImageJA but not in any other plugin that ships with vanilla IJ1. Can't speak here for other plugins shipped with Fiji.

comment:2 Changed 2011-05-10T15:05:09-05:00 by bdezonia

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

improve the ability of IJ1 changes to be mirrored in IJ2 data structures by editing LegacyImageMap. The changes involved assigning the plane references of an IJ2 planar dataset to be equal to the planes of the ImagePlus returned from the plugin. If the plugin made changes to the actual stored plane references (via such methods as setPixels(), setProcessor(), or direct reordering of the stack by its internal array reference) they get copied back to IJ2.