Ticket #1866 (reviewing defect)

Opened 6 years ago

Last modified 6 years ago

IJ2 true color ranges improperly initialized

Reported by: aivar Owned by: curtis
Priority: major Milestone: imagej2-b8-analysis
Component: Display API Version:
Severity: major Keywords:
Cc: Blocked By:
Blocking: #1244

Description

DefaultDatasetView.initializeView autoscales each channel independently, which distorts colors.

In the attached IJ1vsIJ2.png I created the bottom two images in IJ1 by floodfilling with blue and drawing white and gray lines. The top two images show how these are rendered in IJ2.

IJ2 introduced the concept of an independent LUT min/max for each index of the CHANNEL dimension. However in this case when the CHANNEL dimension is RGB you want the same LUT min/max for each channel, as in IJ1.

(All display issue tickets involving bad colors should be re-evaluated after this is fixed.)

Attachments

IJ1vsIJ2.png Download (35.8 KB) - added by aivar 6 years ago.
Comparison of IJ1 vs IJ2 display of same two color images.

Change History

Changed 6 years ago by aivar

Comparison of IJ1 vs IJ2 display of same two color images.

comment:1 Changed 6 years ago by curtis

ImageJ1 actually does also support independent min/max per channel. But you're right that in the case of RGB, the initial ranges should match by default. ImageJ1 has hardcoded behavior where 8-bit data does not autoscale, so it is not a problem for 24-bit RGB. For "48-bit RGB"—i.e., 16-bit, 3-channel composites—I have not investigated thoroughly, so do not know what ImageJ1 does.

Last edited 6 years ago by curtis (previous) (diff)

comment:2 follow-up: ↓ 3 Changed 6 years ago by aivar

  • Summary changed from IJ2 color ranges improperly initialized to IJ2 true color ranges improperly initialized

After I mentioned this bug in the chat today it was pointed out that false color images are more important in IJ and the default behavior is the right behavior for these.

So the bigger issue is to have a way to distinguish true color vs false color and treat them differently. I modified the title of this ticket to say "true color".

comment:3 in reply to: ↑ 2 Changed 6 years ago by curtis

Replying to aivar:

So the bigger issue is to have a way to distinguish true color vs false color and treat them differently.

Fortunately SCIFIO & Bio-Formats  support such a distinction. The metadata does not propagate anywhere into  ImgLib2's metadata yet, but doing so will be straightforward. Though actually, we probably want to store such things independent from the Img itself, for extensibility; see ticket #1890 for details.

comment:4 Changed 6 years ago by aivar

  • Owner changed from aivar to curtis
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.