<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><base href="x-msg://157/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">There should be a bunch of pyd files in that directory. The pyd extension is used for python C libraries[1], and should be included in your path. There should be a pyd file for each ITK module.&nbsp;<div><br></div><div>Brad</div><div><br></div><div><br></div><div><div>[1] <a href="http://docs.python.org/2/faq/windows.html#is-a-pyd-file-the-same-as-a-dll">http://docs.python.org/2/faq/windows.html#is-a-pyd-file-the-same-as-a-dll</a></div><div><br></div><div><br></div><div><div>On Oct 31, 2012, at 11:42 AM, Peter M. Bloomfield &lt;<a href="mailto:peter.bloomfield@camhpet.ca">peter.bloomfield@camhpet.ca</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: monospace; font-size: 10pt; "><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Hi Matt,</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&nbsp;</p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Thanks for getting back to me. This is where I am a tad confused.</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&nbsp;</p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">In the directories under 'C:\CAMH\ITK' there is only a single DLL in directory C:\CAMH\ITK\bin named ITKCommon-4.2.dll.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">There are 76 files in directory C:\CAMH\ITK\lib with the extension .lib</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&nbsp;</p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">The only file named _ITKCommonPython is in the directory C:\CAMH\ITK\lib\ITK-4.2\Python and has an extension .pyd.</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&nbsp;</p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Cheers</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&nbsp;</p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Peter</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&nbsp;</p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">On Wednesday, October 31, 2012 03:20:22 PM Matt McCormick wrote:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; Hi Peter,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; If using PYTHONPATH to specify the location of the .py files, PATH</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; also needs to be set to specify the location of the DLL's.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; HTH,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; Matt</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; On Wed, Oct 31, 2012 at 10:37 AM, Peter M. Bloomfield</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &lt;<a href="mailto:peter.bloomfield@camhpet.ca">peter.bloomfield@camhpet.ca</a>&gt; wrote:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Hi,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; I am experiencing a problem with python wrapping. I have the following on a</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; 32-bit WinXP machine</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Visual Studio 9 2008</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; ITK V4.2.1</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Python 2.7.2</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; I have selected 'ITK_WRAP_PYTHON' and 'BUILD_SHARED_LIBS' and set</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; 'CMAKE_INSTALL_PREFIX' to C:\CAMH\ITK within cmake, and all compiles and</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; installs without error in VS 2008.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; I have set a PYTHONPATH to include both</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; C:\CAMH\ITK\lib\ITK-4.2\Python</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; C:\CAMH\ITK\lib</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; though I am not sure if I have these correct. I can import itk from within</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; python, but get an error when issuing the command</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; image_type = itk.Image[itk.F, 3]</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; as shown below.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Microsoft Windows XP [Version 5.1.2600]</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; (C) Copyright 1985-2001 Microsoft Corp.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; C:\Documents and Settings\Peter&gt;python</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; win32</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Type "help", "copyright", "credits" or "license" for more information.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt;&gt;&gt;&gt; import itk</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt;&gt;&gt;&gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt;&gt;&gt;&gt; image_type = itk.Image[itk.F, 3]</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Traceback (most recent call last):</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "&lt;stdin&gt;", line 1, in &lt;module&gt;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkLazy.py", line 37, in</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; __getattribute__</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; itkBase.LoadModule(module, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 103, in LoadModule</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; if not swigModuleName in sys.modules: module = loader.load(swigModuleName)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 214, in load</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; return imp.load_module(name, fp, pathname, description)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\ITKCommonPython.py", line 30, in</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; &lt;module&gt;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; _ITKCommonPython = swig_import_helper()</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; File "C:\CAMH\ITK\lib\ITK-4.2\Python\ITKCommonPython.py", line 26, in</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; swig_import_helper</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; _mod = imp.load_module('_ITKCommonPython', fp, pathname, description)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; ImportError: DLL load failed: The specified module could not be found.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Can anyone point me in the right direction to get the itk python wrapping</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; working,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Many thanks</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Peter</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; _____________________________________</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Powered by <a href="http://www.kitware.com">www.kitware.com</a></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Visit other Kitware open-source projects at</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Kitware offers ITK Training Courses, for more information visit:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; <a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; Follow this link to subscribe/unsubscribe:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&gt; &gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">&nbsp;</p>_____________________________________<br>Powered by<span class="Apple-converted-space">&nbsp;</span><a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></div></blockquote></div><br></div></body></html>