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

Opened 2012-08-10T18:28:07-05:00

Last modified 2012-09-08T08:43:12-05:00

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


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

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


20x deconvol demo lif in LAS AF viewer.png (156.6 KB) - added by aivar 2012-09-05T17:09:20-05:00.
This is our sample lif file "20x devol demo" viewed with Leica's LAS AF Lite viewer.
20x deconvol demo lif in IJ2.png (104.4 KB) - added by aivar 2012-09-05T17:14:52-05:00.
Here is "20x deconvol demo.lif" as displayed in IJ2.

Change History

comment:1 Changed 2012-08-10T18:30:40-05:00 by aivar

  • Blocked By 1382 added

comment:2 Changed 2012-08-10T18:46:50-05:00 by aivar

  • Component changed from other to ij-display

comment:3 Changed 2012-08-14T10:44:19-05:00 by bdezonia

  • Blocking 1333 added

comment:4 Changed 2012-08-31T18:22:01-05:00 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."

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 2012-09-05T17:04:14-05:00 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 2012-09-05T17:09:20-05:00 by aivar

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

Changed 2012-09-05T17:14:52-05:00 by aivar

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

comment:6 Changed 2012-09-06T15:20:13-05:00 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 (might as well use 256 entries) but do use the full 16-bit pixel depth.

Last edited 2012-09-06T15:21:03-05:00 by aivar

comment:7 Changed 2012-09-07T11:26:16-05:00 by bdezonia

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

comment:8 Changed 2012-09-07T16:49:51-05:00 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 2012-09-08T08:43:12-05:00 by bdezonia

  • Blocking 1333 added; 1460 removed