<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Something cleared up (sort of):  I discovered that while the ITK build of the itktiff project links tif_win32.c, the tiff-4.0.3 build was not linking this file.  It turns out that
 this is controlled by a build option in nmake.opt:<br>
<br>
#<br>
# Uncomment following line to enable using Windows Common RunTime Library<br>
# instead of Windows specific system calls. See notes on top of tif_unix.c<br>
# module for details.<br>
#<br>
#USE_WIN_CRT_LIB = 1        # Gib commented this<br>
<br>
When I commented out this line and rebuilt libtiff, tiffinfo no longer fails at the 2 GB boundary.  I don't understand what it's about, but it does resolve that mystery.<br>
<br>
Gib<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF119113"><font size="2" color="#000000" face="Tahoma"><b>From:</b> Community [community-bounces@itk.org] on behalf of Gib Bogle [g.bogle@auckland.ac.nz]<br>
<b>Sent:</b> Monday, 22 September 2014 12:21 p.m.<br>
<b>To:</b> community@itk.org<br>
<b>Subject:</b> Re: [ITK] BigTIFF and tiffinfo<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Followup: I ran tiffdump on this file, and surprisngly it was able to read to the end of the file, and all the offsets look fine.  So it seems that tiffinfo is at fault - very strange
 since one would expect that tiffdump and tiffinfo would use identical methods.  More tiff strangeness...<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF894677" style="direction:ltr"><font size="2" color="#000000" face="Tahoma"><b>From:</b> Community [community-bounces@itk.org] on behalf of Gib Bogle [g.bogle@auckland.ac.nz]<br>
<b>Sent:</b> Monday, 22 September 2014 10:45 a.m.<br>
<b>To:</b> community@itk.org<br>
<b>Subject:</b> [ITK] BigTIFF and tiffinfo<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">The saga continues...<br>
<br>
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:<br>
  set(ITKv4_GIT_TAG 056d97b66a1ddbae77e2217c5bd96e436c7e44fc) # slicer-v4.6.0-2014-09-19-056d97b<br>
<br>
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:<br>
<br>
...<br>
TIFF Directory at offset 0x7fd0fcf4 (2144402676)<br>
  Subfile Type: multi-page document (2 = 0x2)<br>
  Image Width: 1300 Image Length: 1300<br>
  Resolution: 25.4, 25.4 pixels/inch<br>
  Bits/Sample: 8<br>
  Compression Scheme: None<br>
  Photometric Interpretation: min-is-black<br>
  Orientation: row 0 top, col 0 lhs<br>
  Samples/Pixel: 1<br>
  Rows/Strip: 6<br>
  Planar Configuration: single image plane<br>
  Page Number: 1265-1300<br>
  Software: InsightToolkit<br>
TIFF Directory at offset 0x7fead588 (2146096520)<br>
  Subfile Type: multi-page document (2 = 0x2)<br>
  Image Width: 1300 Image Length: 1300<br>
  Resolution: 25.4, 25.4 pixels/inch<br>
  Bits/Sample: 8<br>
  Compression Scheme: None<br>
  Photometric Interpretation: min-is-black<br>
  Orientation: row 0 top, col 0 lhs<br>
  Samples/Pixel: 1<br>
  Rows/Strip: 6<br>
  Planar Configuration: single image plane<br>
  Page Number: 1266-1300<br>
  Software: InsightToolkit<br>
TIFFFetchDirectory: big1300.tif: Seek error accessing TIFF directory.<br>
TIFFReadDirectory: Failed to read directory at offset 2147790364.<br>
<br>
There is no problem with the compressed version of the image.  <br>
<br>
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.<br>
<br>
Any ideas?<br>
<br>
Gib<br>
<br>
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.<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>