<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. <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 <<a href="mailto:peter.bloomfield@camhpet.ca">peter.bloomfield@camhpet.ca</a>> 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; "> </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; "> </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; "> </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; "> </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; "> </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; "> </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; ">> Hi Peter,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> If using PYTHONPATH to specify the location of the .py files, PATH</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> 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; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> HTH,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Matt</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> On Wed, Oct 31, 2012 at 10:37 AM, Peter M. Bloomfield</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> <<a href="mailto:peter.bloomfield@camhpet.ca">peter.bloomfield@camhpet.ca</a>> wrote:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Hi,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > 32-bit WinXP machine</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Visual Studio 9 2008</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > ITK V4.2.1</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Python 2.7.2</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > I have selected 'ITK_WRAP_PYTHON' and 'BUILD_SHARED_LIBS' and set</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > '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; ">> > installs without error in VS 2008.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > I have set a PYTHONPATH to include both</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > C:\CAMH\ITK\lib\ITK-4.2\Python</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > C:\CAMH\ITK\lib</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > python, but get an error when issuing the command</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > image_type = itk.Image[itk.F, 3]</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > as shown below.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Microsoft Windows XP [Version 5.1.2600]</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > (C) Copyright 1985-2001 Microsoft Corp.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > C:\Documents and Settings\Peter>python</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > win32</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Type "help", "copyright", "credits" or "license" for more information.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> >>>> import itk</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> >>>> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> >>>> image_type = itk.Image[itk.F, 3]</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Traceback (most recent call last):</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > File "<stdin>", line 1, in <module></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > __getattribute__</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > itkBase.LoadModule(module, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > LoadModule(dep, namespace)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > if not swigModuleName in sys.modules: module = loader.load(swigModuleName)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > return imp.load_module(name, fp, pathname, description)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > <module></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > _ITKCommonPython = swig_import_helper()</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > swig_import_helper</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > ImportError: DLL load failed: The specified module could not be found.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > 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; ">> > working,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Many thanks</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Peter</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > _____________________________________</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Powered by <a href="http://www.kitware.com">www.kitware.com</a></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Visit other Kitware open-source projects at</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > <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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Kitware offers ITK Training Courses, for more information visit:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > <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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Please keep messages on-topic and check the ITK FAQ at:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > <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; ">> > </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > Follow this link to subscribe/unsubscribe:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> > <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; "> </p>_____________________________________<br>Powered by<span class="Apple-converted-space"> </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>