<html>
  <head>
  </head>
  <body style="font-weight: normal; font-variant: normal; margin-bottom: 1px; margin-right: 4px; margin-top: 4px; font-style: normal; font-size: 16pt; margin-left: 4px; font-family: Times New Roman; line-height: normal">
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">Looks like I have solved the problem.  I needed to re-compile ITK with the 'shared libraries' option un-checked.  I think I misunderstood what that option is for, can someone explain what this does?</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">Kent</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
      <br>
      >>> "Kent Ogden" <ogdenk@upstate.edu> 4/5/2012 02:27 PM >>><br>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">Hi,</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
          </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">I am wondering if someone might have a clue about a problem I'm having.  I've been using ITK 4.0 successfully in a Matlab mex function for doing non-rigid registration (using the demons algorithm).  This has all been 32 bit, using VS2008 and 32 bit Matlab on Win 7 (x64 Windows though).  In trying to convert over to 64 bit in the hopes of increased performance, I can:</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
          </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">-Successfully compile ITK for x64 (shared libraries)</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">-Successfully compile my mex function for x64</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
          </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">But, Matlab x64 no longer likes the result, telling me that it isn't a valid win32 application.  My mex function works fine until I add in the ITK code and link those libraries, so it seems clear that it's something that the ITK libraries are bringing along that Matlab doesn't like.</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
          </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">Any thoughts or suggestions?  I think I will try compiling ITK to dll's to see if that makes a difference, but maybe someone has some idea about this?</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
          </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Times New Roman" size="5">Kent</font>    </p>
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
      <br>
    </p>
  </body>
</html>