Ticket #1381 (closed task: fixed)

Opened 7 years ago

Last modified 7 years ago

Support ColorTable16 images

Reported by: aivar Owned by: aivar
Priority: minor Milestone: imagej2-b4-plugins
Component: Display API Version:
Severity: minor Keywords:
Cc: Blocked By: #1382
Blocking: #1333

Description

Certain image formats that BioFormats supports allow for 16-bit color tables.

ColorTable16 exists in IJ2 but can't actually be used to display.

Attachments

20x deconvol demo lif in LAS AF viewer.png Download (156.6 KB) - added by aivar 7 years ago.
This is our sample lif file "20x devol demo" viewed with Leica's LAS AF Lite viewer.
20x deconvol demo lif in IJ2.png Download (104.4 KB) - added by aivar 7 years ago.
Here is "20x deconvol demo.lif" as displayed in IJ2.

Change History

comment:1 Changed 7 years ago by aivar

  • Blocked By 1382 added

comment:2 Changed 7 years ago by aivar

  • Component changed from other to ij-display

comment:3 Changed 7 years ago by bdezonia

  • Blocking 1333 added

comment:4 Changed 7 years ago by aivar

Searching for 16-bit palettes I found:

"TIFF also supports palette images, but baseline TIFF allows only 4- and 8-bit pixel depths. Perhaps a more useful comparison is with the superset of baseline TIFF that is supported by Sam Leffler's free libtiff, which has become the software industry's unofficial standard for TIFF decoding. libtiff supports palette bit depths of 1, 2, 4, 8, and 16 bits."  http://www.libpng.org/pub/png/book/chapter08.html

I found a sample image on the LOCI server at data/tiff/samples/imagemagick/flower-palette-strip-16.tif. This is just an indexed color RGB image that uses about 3000 colors out of the possible 64K palette.

Unfortunately IJ1 maps the entire palette (3000 colors and the rest black) to the min/max of the image's histogram. So only ~3/64 of the pixels are colorized, the rest are black.

comment:5 Changed 7 years ago by aivar

Mapping the entire palette to the min/max of the images histogram occurs when the 'isFalseColor' flag is true, that is the indices are the actual data, not the palette values.

Changed 7 years ago by aivar

This is our sample lif file "20x devol demo" viewed with Leica's LAS AF Lite viewer.

Changed 7 years ago by aivar

Here is "20x deconvol demo.lif" as displayed in IJ2.

comment:6 Changed 7 years ago by aivar

The LIF file associated with the attachments has a 16-bit ramped palette. Combinations of RGB channels yield colors.

The OIF files I've examined have a palette of 256 X 0, 256 X 0x101, 256 X 0x202,... 256 X 0xffff. Increments of 0x101 create an even ramp that goes from 0x0000...0xffff. (Truncating lower bits gives you an even 8-bit ramp.) So they don't make use of 64K entries but do use the full 16-bit pixel depth.

Version 0, edited 7 years ago by aivar (next)

comment:7 Changed 7 years ago by bdezonia

  • Blocking 1460 added; 1333 removed
  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5

comment:8 Changed 7 years ago by aivar

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from imagej-2.0.0-beta5 to imagej-2.0.0-beta4

This is working now, in time for imagej-2.0.0-beta4 milestone.

comment:9 Changed 7 years ago by bdezonia

  • Blocking 1333 added; 1460 removed
Note: See TracTickets for help on using tickets.