<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Paolo,<div><br></div><div>You are correct with the command line: </div><div><br></div><div><a href="git://github.com/tobiasmaier/itkPyBuffer.git">git://github.com/tobiasmaier/itkPyBuffer.git</a> Modules/External/itkPyBuffer</div><div><br></div><div><br></div><div>When you place an ITK module into the ITK External or Remote subdirectory, it become just like the build-in ITK modules. It gets built along side of the rest of ITK, and also will get wrapped for this case.</div><div><br></div><div><br></div><div>After running the above command, I re-ran ccmake and it informed me that PYTHON_NUMARRAY_INCLUDE_DIR, needed to be defined.</div><div><br></div><div>The variable that needs to be set is Module_ITKBufferConvertion. This should be enabled. I thought this use to come up in the CMake GUI, but it did not for me. I had to go into the CMakeCache.txt file and manually change the variable to ON to enable it.</div><div><br></div><div>Hope that helps,</div><div>Brad</div><div><br><div><div>On Jan 30, 2013, at 8:57 AM, Paolo Zaffino <<a href="mailto:p.zaffino@yahoo.it">p.zaffino@yahoo.it</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Brad,<br>
thanks for your answer but I'm not yet able to get working that
module.<br>
First I think that the command is git clone
<a href="git://github.com/tobiasmaier/itkPyBuffer.git">git://github.com/tobiasmaier/itkPyBuffer.git</a>
Modules/External/itkPyBuffer, right?<br>
Anyway I didn't understand how compile it, if I have to compile it
before ITK or if it will be compiled during the itk building.<br>
The problem is that I don't see the option to enable itkPyBuffer
in the cmake step for ITK.<br>
<br>
Yes, I know of simpleITK, but in this case I need of ITK...anyway
thanks for the advice.<br>
<br>
Thanks a lot.<br>
Paolo<br>
<br>
<br>
<br>
<br>
Il 29/01/2013 15:20, Bradley Lowekamp ha scritto:<br>
</div>
<blockquote cite="mid:4487A4FB-9F07-45ED-8C10-C904FDED9F9F@mail.nih.gov" type="cite">
Hello Paolo,
<div><br>
</div>
<div>I have used the the following external module for get numpy
support for WrapITK:</div>
<div><br>
</div>
<div><a moz-do-not-send="true" href="https://github.com/tobiasmaier/itkPyBuffer">https://github.com/tobiasmaier/itkPyBuffer</a></div>
<div><br>
</div>
<div><br>
</div>
<div>From the root ITK source dir just clone the repo into the
Modules/External directory:</div>
<div><br>
</div>
<div>git clone <a moz-do-not-send="true" href="git://github.com/tobiasmaier/itkPyBuffer.git">git://github.com/tobiasmaier/itkPyBuffer.git</a>
Modules/External/</div>
<div><br>
</div>
<div>Rerun ccmake, and turn on this module. And recompile.</div>
<div><br>
</div>
<div><br>
</div>
<div>While you are waiting you can check to see if SimpleITK has
the functionality you need.</div>
<div>I'd like to point out that SimpleITK has built in support for
numpy, and has binary eggs available for download. </div>
<div><a moz-do-not-send="true" href="http://www.itk.org/Wiki/ITK/Release_4/SimpleITK">http://www.itk.org/Wiki/ITK/Release_4/SimpleITK</a></div>
<div><br>
</div>
<div>Brad</div>
<div><br>
<div>
<div>On Jan 29, 2013, at 8:46 AM, Paolo Zaffino <<a moz-do-not-send="true" href="mailto:p.zaffino@yahoo.it">p.zaffino@yahoo.it</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>
<div style="background-color: rgb(255, 255, 255);
font-family: 'times new roman', 'new york', times,
serif; font-size: 12pt; ">
<div><font face="times new roman, new york, times,
serif">Dear ITK community,</font></div>
<div><font face="times new roman, new york, times,
serif"><br>
</font></div>
<div><font face="times new roman, new york, times,
serif">I compiled ITK 4.3.1 with the Python support
and all went fine.</font></div>
<div><font face="times new roman, new york, times,
serif">I am able to run ITK functions from Python,
but I'm also interested in converting an ITK image
into a Numpy matrix and viceversa.</font></div>
<div><font face="times new roman, new york, times,
serif">How can I do this?</font></div>
<div><font face="times new roman, new york, times,
serif"><br>
</font></div>
<div><font face="times new roman, new york, times,
serif">Thank you very much.</font></div>
<div><font face="times new roman, new york, times,
serif">Regards.</font></div>
<div><font face="times new roman, new york, times,
serif">Paolo</font></div>
</div>
</div>
_____________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com/">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a moz-do-not-send="true" 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 class="moz-txt-link-freetext" 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 class="moz-txt-link-freetext" 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 class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</blockquote></div><br></div></body></html>