<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; ">
<div>
<div>
<div style="font-family: Calibri, sans-serif; ">Brad,</div>
<div style="font-family: Calibri, sans-serif; "> I'm running v4.1. The full error is " from InsightToolkit import *, ImportError: No module named InsightToolkit ". I have already tried the new DicomSliceRead.py example and the same error occurs. With regards
to the PYTHONPATH, I was under the impression that modifying the DYLD_<span style="font-style: italic; ">LIBRARY_</span>PATH took care of this. Is there another way of setting this that I missed? I'm still new to this python world, so bear with me :D.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Cheers</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div>
<div><font face="Arial" style="font-family: Calibri, sans-serif; color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; 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; "><b><font size="3">Ahmed
F. Halaweish Ph.D.</font></b></font><span style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; 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; display: inline !important; float: none; "></span>
<div style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; 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 class="Apple-style-span" face="Arial"><br>
</font></div>
</div>
</div>
</div>
</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif; ">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, July 19, 2012 11:23 AM<br>
<span style="font-weight:bold">To: </span>Ahmed Halaweish <<a href="mailto:ahmed.halaweish@dm.duke.edu">ahmed.halaweish@dm.duke.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>" <<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Insight-users] ITK v4 & Python - WrapITK<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hello,
<div><br>
</div>
<div>What version of ITK are you using?</div>
<div><br>
</div>
<div>What is the complete error message you are getting??</div>
<div><br>
</div>
<div>Did you set your PYTHONPATH too?</div>
<div><br>
</div>
<div>The current version of the example does not do an "import InsightToolkit", I believe that the example has been updated to use WrapITK from using a quite old wrapping system recently. This is the current file:</div>
<div><br>
</div>
<div><a href="http://github.com/Kitware/ITK/blob/master/Examples/IO/DicomSliceRead.py">github.com/Kitware/ITK/blob/master/Examples/IO/DicomSliceRead.py</a></div>
<div><br>
</div>
<div>Brad</div>
<div><br>
<div>
<div>On Jul 19, 2012, at 10:27 AM, Ahmed Halaweish, Ph.D. wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; ">
<div>
<div>
<div style="font-family: Calibri, sans-serif; ">I have finally managed to get ITKv4 w/WrapITK compiled on my Mac OSX (Lion 10.7.4, python 2.7). Now when I try to run the DicomSliceRead.py example, I keep getting the following error: "ImportError: No module
named InsightToolkit". I have set the DYLD_<span style="font-style: italic; ">LIBRARY_</span>PATH to the ITK build directory and I still get the same errors.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">During compiling process, These are the variables I set:</div>
<div style="font-family: Calibri, sans-serif; ">BUILD TESTING: OFF</div>
<div style="font-family: Calibri, sans-serif; ">BUILD EXAMPLES: OFF</div>
<div style="font-family: Calibri, sans-serif; ">ITK USE REVIEW: ON</div>
<div style="font-family: Calibri, sans-serif; ">ITK WRAPPING: ON</div>
<div style="font-family: Calibri, sans-serif; ">ITK WRAP PYTHON: ON</div>
<div style="font-family: Calibri, sans-serif; ">ITK WRAP JAVA: ON</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">I also tested the helloworld.cxx program and it worked fine, so it must be something with the python wrapping variables. Any help is greatly appreciated. </div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Cheers</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div>
<div><font face="Arial" style="font-family: Calibri, sans-serif; color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; 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; "><b><font size="3">Ahmed
F. Halaweish</font></b></font><span style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; 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; display: inline !important; float: none; "></span>
<div style="color: rgb(0, 0, 0); font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; 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 class="Apple-style-span" face="Arial"><br>
</font></div>
</div>
</div>
</div>
</div>
</div>
_____________________________________<br>
Powered by <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>
</blockquote>
</div>
<br>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; ">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Helvetica; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Helvetica; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Helvetica; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Helvetica; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Helvetica; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space"> </span></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Helvetica; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p>
<span class="Apple-style-span" style="font-family: Helvetica; "><br class="Apple-interchange-newline">
</span></div>
<br class="Apple-interchange-newline">
</div>
<br>
</div>
</div>
</div>
</span>
</body>
</html>