2010.04.29 23:38 "Re: [Tiff] "flexible" mode in TIFFClientOpen ?", by Dmitry Fedorov

2010.04.30 01:23 "Re: [Tiff] "flexible" mode in TIFFClientOpen ?", by Dmitry Fedorov

I have submitted two tickets to bugzilla (from fedorov@ece.ucsb.edu) related to similar issues with reading Zeiss LSM files. The first issue has a trivial fix and it only appeared in 4.0 as compared to 3.8.2 (I've skipped 3.9). The second one I mentioned was also present in 3.8.2.

Biomedical images usually contain 16 or 32 bits per sample and N samples. In those both cases palette makes purely preferred-visualization sense and is certainly not "absolutely required" for decoding. Thus the revised fix for the palette issue could look something like this:

if (tif->tif_dir.td_photometric == PHOTOMETRIC_PALETTE &&
    !TIFFFieldSet(tif, FIELD_COLORMAP)) {
    if ( tif->tif_dir.td_bitspersample>=8 &&
      tif->tif_dir.td_photometric = PHOTOMETRIC_RGB;
    else if (tif->tif_dir.td_bitspersample>=8)
      tif->tif_dir.td_photometric = PHOTOMETRIC_MINISBLACK;
      MissingRequired(tif, "Colormap");
      goto bad;

Although the essence of my question was mostly if these kinds of fixes could only be enabled in "f" flexible mode requested by the user and thus would not alter the general behavior of the library. Basically the question is if such a flag is irrelevant and it is better to patch the library.


> It may be that libtiff 4.0.0 is more picky than libtiff 3.9.2.  You should

verify if 3.9.2 works and 4.0.0 does not. 3.9.2 works better, then let  If us know.

There are cases where that palette is absolutely required in libtiff, but perhaps other cases where it is not.


Dmitry Fedorov Levit
  <dima@dimin.net> <http://www.dimin.net/>
Skype: dima_fedorov
Google: fedorov

Center for Bio-Image Informatics:

Vision Research Lab, Electrical and Computer Engineering
Image Registration:

University of California, Santa Barbara

DIMIN Viewer n5: