NOTICE! This is a static HTML version of a legacy LOCI Software ticket.

LOCI projects are now located on GitHub. The Bio-Formats project can be found here.

Ticket #410 (closed defect: fixed)

Opened 2009-07-28T16:11:52-05:00

Last modified 2009-07-31T13:16:55-05:00

showinf's -fast flag adjusts data too naively

Reported by: curtis Owned by: melissa
Priority: minor Milestone:
Component: bio-formats Severity: serious
Keywords: Cc:
Blocked By: Blocking:

Description

When using the -fast flag with the showinf command line utility, 16-bit and 32-bit data gets somewhat mangled. For example:

showinf -fast 'u32&pixelType=uint32.fake'

Rather than being scaled, the data is narrowed directly into an 8-bit range of values. Another example:

showinf -fast 's32&pixelType=int32.fake'

These problems are most likely a result of how the ImageTools.make24Bits methods behave. To fix, we need to decide how to scale higher-bit data down to 8 bits. The two easiest options are:

  1. Scale linearly along the entire range of the larger bit depth. For example, with uint16 data, scale from 0-65535 to 0-255. The downside of this approach is that most 16-bit data will appear essentially black, as 16-bit data values often do not exceed 4096 in microscopy. The advantage is that this scaling method is what the default 16-bit color model uses when painting anyway, so the image should appear the same as without the -fast flag.
  2. Scale linearly along the actual min and max of the image. This approach would use a MinMaxCalculator across the entire series.

Change History

comment:1 Changed 2009-07-31T13:16:55-05:00 by melissa

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

(In [5339]) * Fixed scaling problems in make24Bits methods. Closes #410.

  • Added utility method for converting BGR images to RGB.