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: |
|
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
Change History
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." 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 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
- attachment 20x deconvol demo lif in LAS AF viewer.png added
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
- attachment 20x deconvol demo lif in IJ2.png added
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.
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.