On recent realization:   <br><br>             &quot;size_t&quot;    is unsigned       :-/<br><br>and we need the OffsetValueType to be signed,<br>since we use it to compute differences...<br><br>It seems that what we need is the type<br>

<br>                        &quot;ptrdiff_t&quot;<br><br>which is supposed to represent the differences<br>between two pointers, and therefore should be<br>capable of measuring distances between any<br>two locations in memory.<br>

<br>I&#39;m now rerunning the Experimental with <br>&quot;ptrdiff_t&quot; instead of &quot;size_t&quot;.<br><font color="#888888"><br><br>       Luis<br></font><br>------------------------------------------------------------------------------------------------------<br>
<div class="gmail_quote">On Fri, Jul 10, 2009 at 12:30 PM, Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Kana,<br><br>Thanks a lot for looking into this and sharing your findings.<br><br>I just confirmed that in Windows 64bits, the &quot;long&quot; type is<br>only 4 bytes.<br><br>Here is the program I used:<br><br>#include &lt;iostream&gt;<br>

#include &quot;itkOffset.h&quot;<br>#include &quot;itkNumericTraits.h&quot;<div class="im"><br><br>int main()<br>{<br>  unsigned long tt;<br>  std::cout &lt;&lt; &quot;size = &quot; &lt;&lt; sizeof(tt) &lt;&lt; std::endl;<br>
  tt  =  -1;<br>
  std::cout &lt;&lt; &quot;tt = &quot; &lt;&lt; tt &lt;&lt; std::endl;<br><br></div>  typedef itk::Offset&lt;3&gt;   OffsetType;<br>  typedef OffsetType::OffsetValueType   OffsetValueType;<br><br>  OffsetValueType  offsetValue;<br>

<br>  std::cout &lt;&lt; &quot;sizeof(offsetValue) = &quot; &lt;&lt; sizeof( offsetValue ) &lt;&lt; std::endl;<br><br>  offsetValue = itk::NumericTraits&lt; OffsetValueType &gt;::max();<br><br>  std::cout &lt;&lt; &quot;OffsetValueType max() = &quot; &lt;&lt; offsetValue &lt;&lt; std::endl;<br>

<br>  return EXIT_SUCCESS;<br>}<br><br><br>with this CMakeLists.txt file<br><br><br>CMAKE_MINIMUM_REQUIRED(VERSION 2.4)<br>IF(COMMAND CMAKE_POLICY)<br>  CMAKE_POLICY(SET CMP0003 NEW)<br>ENDIF(COMMAND CMAKE_POLICY)<br><br>

<br>PROJECT(64bitsTest)<br><br>FIND_PACKAGE(ITK REQUIRED)<br>INCLUDE(${ITK_USE_FILE})<br><br>ADD_EXECUTABLE(typesTest typesTest.cxx )<br><br>TARGET_LINK_LIBRARIES(typesTest ITKCommon)<br><br></blockquote></div><br>