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 #388 (closed task: fixed)

Opened 2011-03-22T15:34:09-05:00

Last modified 2011-03-23T12:11:28-05:00

Make color images display in Ij2

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej-2.0-alpha1
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

Right now if you load clown in IJ2 a black image is displayed. For now we should at least display a gray 3 channel image with a channel slider.

Change History

comment:1 Changed 2011-03-22T15:44:53-05:00 by bdezonia

  • Status changed from new to accepted

This work should take place in the legacy layer. Right now ImageTranslator does the heavy lifting and it relies on Imglib's wrap() and Imglib's display as virtual stack capabilities. These rely on RGBALegacyType which we must now avoid using.

We will add a new property (isRgbMerged) to a Dataset that is only ever set and referred to in the legacy layer. Then we define our image translator class to create a three channel imglib Image from an RGB ImagePlus. And then for a Dataset that isRgbMerged we can create a CompositeImage (or maybe need a ColorProcessor based ImagePlus) as needed. (The ImageTranslator class should delegate to a ColorTranslator class where appropriate)

Must test that IJ1's functionality is preserved across these changes (such as Merge To Rgb, macros expecting ColorProcessors, etc.).

If the isRgbMerged approach is problematic we can just try to get the current wrap/stack approach working but this is less desirable in the long run.

comment:2 Changed 2011-03-23T12:11:28-05:00 by bdezonia

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

Rewrote/refactored ImageTranslator in the legacy layer to support COLOR_RGB translation by automatically splitting and merging channels as needed during translations. Color images can now be loaded in IJ2. They display as a 3 channel grayscale image.