[ITK] BigTIFF and tiffinfo

Gib Bogle g.bogle at auckland.ac.nz
Sun Sep 21 18:45:23 EDT 2014


The saga continues...

I finally found and built tiff-4.0.2, to get tiffinfo.exe.  This has revealed a problem with the tiff files built using the ITK that Slicer has created.  This version was pulled using this cmake line:
  set(ITKv4_GIT_TAG 056d97b66a1ddbae77e2217c5bd96e436c7e44fc) # slicer-v4.6.0-2014-09-19-056d97b

When I execute 'tiffinfo -D big1300.tif' or any uncompressed tiff bigger than 2 GB tiffinfo gets a seek error when it tries to go over the 2 GB mark:

...
TIFF Directory at offset 0x7fd0fcf4 (2144402676)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 1300 Image Length: 1300
  Resolution: 25.4, 25.4 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 6
  Planar Configuration: single image plane
  Page Number: 1265-1300
  Software: InsightToolkit
TIFF Directory at offset 0x7fead588 (2146096520)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 1300 Image Length: 1300
  Resolution: 25.4, 25.4 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 6
  Planar Configuration: single image plane
  Page Number: 1266-1300
  Software: InsightToolkit
TIFFFetchDirectory: big1300.tif: Seek error accessing TIFF directory.
TIFFReadDirectory: Failed to read directory at offset 2147790364.

There is no problem with the compressed version of the image.

This has added to my confusion.  A program built with the same ITK library can read this file, raising the possibility that it is tiffinfo itself that can't handle a memory pointer > 2 GB.  But I did build libtiff and tiffinfo using Win64.  And Vaa3D also gets this seek error when reading the file.

Any ideas?

Gib

PS It is probably totally irrelevant to the tiff issue, but I happened to notice that there are a few occurrences in other places of checks for _WIN64, which is not defined.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140921/fd4ecee2/attachment-0002.html>


More information about the Community mailing list