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 #538 (closed enhancement: fixed)

Opened 2011-05-23T14:59:00-05:00

Last modified 2011-06-02T16:29:48-05:00

Improve legacy data support

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:


The DatasetHarmonizer and the LegacyImageMap have evolved. They are somewhat inconsistent in how they work right now.

The LegacyImageMap code creates Datasets and ImagePluses with specific assumptions (planar access, IJ1 primitive types only).

DatasetHarmonizer:updateDataset(fromImp) supports many kinds of Dataset (planar and non, all pixel types).

DatasetHarmonizer::updateLegacyImage(fromDs) expects planar images with primitive arrays directly mappable to one of the IJ1 types. Although for color translations it is much more forgiving.

The code in the legacy layer should be updated always allow:

  • support of nonplanar Datasets to and from ImagePluses
  • translation of new data types (12-bit, 1-bit, signed 16-bit, etc.) into the nearest compatible IJ1 type if user desires
  • always use planar copies where possible for efficiency

Change History

comment:1 Changed 2011-05-23T15:20:56-05:00 by bdezonia

Also we can minimize some harmonization by having LegacyImageMap track a dirty flag for each Dataset. It can listen to Dataset events and note who is dirty. Then when ImagePluses are updated from Datasets before a plugin is run (see LegacyPlugin::run()) we can only harmonize those that are dirty.

comment:2 Changed 2011-06-01T11:17:10-05:00 by bdezonia

This ticket is somewhat old. The legacy layer was rewritten some time ago to support all pixel types to and from IJ1.

The idea about tracking a dirty flag is still relevant.

comment:3 Changed 2011-06-01T11:18:38-05:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from imagej-2.0-beta1 to biweekly-2011: May-23 to Jun-03

The remaining issues on this ticket are encompassed in ticket #546. Closing.

comment:4 Changed 2011-06-01T11:19:20-05:00 by bdezonia

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:5 Changed 2011-06-01T11:21:00-05:00 by bdezonia

Everything before this comment is not really valid anymore. However one thing that is not being done right now is sending IJ1 CompositeImages when it make sense. Make sure it is doing this.

comment:6 Changed 2011-06-02T16:29:48-05:00 by bdezonia

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