hi Gaëtan, my wrapITK is installed in:<br><br>C:\Program Files\WrapITK<br><br>itkvtkGlue is installed in:<br><br>C:\Program Files\ItkVtkGlue<br><br>Do you mean that i should copy ItkVtkGlue into the WrapITK directory?<br><br>
Regards,<br><br>Alex<br><br><br><div class="gmail_quote">2009/11/18 Gaëtan Lehmann <span dir="ltr">&lt;<a href="mailto:gaetan.lehmann@jouy.inra.fr">gaetan.lehmann@jouy.inra.fr</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Le 18 nov. 09 à 09:11, alex sando a écrit :<div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks Gaëtan,  I built itkvtkglue project successfully:<br>
<br>
1&gt;------ Build started: Project: INSTALL, Configuration: Release Win32 ------<br>
1&gt;<br>
1&gt;Performing Post-Build Event...<br>
1&gt;-- Install configuration: &quot;Release&quot;<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/include/InsightToolkit/BasicFilters/itkImageToVTKImageFilter.h<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/include/InsightToolkit/BasicFilters/itkImageToVTKImageFilter.txx<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/include/InsightToolkit/BasicFilters/itkVTKImageToImageFilter.h<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/include/InsightToolkit/BasicFilters/itkVTKImageToImageFilter.txx<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/ClassIndex/ItkVtkGlue.mdx<br>
1&gt;-- Installing: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/lib/_ItkVtkGluePython.pyd<br>
1&gt;-- Installing: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/ClassIndex/wrap_ItkVtkGluePython.idx<br>
1&gt;-- Installing: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/lib/ItkVtkGluePython.py<br>
1&gt;-- Installing: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/ClassIndex/wrap_itkImageToVTKImageFilter.idx<br>
1&gt;-- Installing: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/lib/itkImageToVTKImageFilter.py<br>
1&gt;-- Installing: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/ClassIndex/wrap_itkVTKImageToImageFilter.idx<br>
1&gt;-- Installing: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/lib/itkVTKImageToImageFilter.py<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/SWIG/ItkVtkGlue.swg<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/Python/Configuration/ItkVtkGlueConfig.py<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/Python/ItkVtkGlue.py<br>
1&gt;-- Installing external project  into the WrapITK installation directory.<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/Python/itkvtk.py<br>
1&gt;-- Up-to-date: C:/Program Files/ItkVtkGlue/lib/InsightToolkit/WrapITK/Python/itkExtras/itkvtkExtras.py<br>
1&gt;Build log was saved at &quot;file://d:\ITKVTKBuild\INSTALL.dir\Release\BuildLog.htm&quot;<br>
1&gt;INSTALL - 0 error(s), 0 warning(s)<br>
========== Build: 1 succeeded, 0 failed, 4 up-to-date, 0 skipped ==========<br>
<br>
But i still get error message when import the module:<br>
<br>
import ItkvtkGlue<br>
ImportError: No module named ItkvtkGlue<br>
or<br>
import itkvtk<br>
ImportError: No module named itkvtk<br>
<br>
So I guess VTKImageToImageFilter may be built into the itk module, so i try the filter directly in the source code without the extra &quot;import&quot; expressions:<br>
<br>
print &quot;Start to OpenFile&quot;<br>
convertor = itk.VTKImageToImageFilter[itk.Image.US3].New(imageData)<br>
img = convertor.GetOutput()<br>
convertor.Update();<br>
print &quot;Finished OpenFile&quot;<br>
<br>
, but only get:<br>
<br>
AttributeError: &#39;LazyITKModule&#39; object has no attribute &#39;VTKImageToImageFilter&#39;<br>
<br>
How can i fix this.... many many thanks for suggestions...<br>
</blockquote>
<br></div></div>
Hi Alex,<br>
<br>
The base path for the installation must be the same than the one used for WrapITK. I don&#39;t think that WrapITK is installed in C:/Program Files/ItkVtkGlue.<br>
Can you try to install ItkVtkGlue in the same dir than WrapITK?<br><font color="#888888">
<br>
Gaëtan</font><div><div></div><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Alex<br>
<br>
<br>
2009/11/18 Gaëtan Lehmann &lt;<a href="mailto:gaetan.lehmann@jouy.inra.fr" target="_blank">gaetan.lehmann@jouy.inra.fr</a>&gt;<br>
<br>
Le 17 nov. 09 à 07:59, alex sando a écrit :<br>
<br>
<br>
hi, currently i want to import a vtkImageData to itkImage so that the data could be processed using some ITK filters, but when i execute the following code:<br>
<br>
       imageData = reader.GetOutput()<br>
       print &quot;Start to OpenFile&quot;<br>
       convertor = itk.VTKImageToImageFilter[itk.Image.S3].New(imageData)<br>
       img = convertor.GetOutput()<br>
       convertor.Update();<br>
       print &quot;Finished OpenFile&quot;<br>
<br>
always get the following error message:<br>
 File &quot;D:\Lab Affairs\src\control\Common.py&quot;, line 448, in _simpleProcess<br>
   convertor = itk.VTKImageToImageFilter[...].New(imageData)<br>
 File &quot;C:\Program Files\WrapITK\lib\InsightToolkit\WrapITK\Python\itkLazy.py&quot;, line 14, in __getattribute__<br>
   value = types.ModuleType.__getattribute__(self, attr)<br>
AttributeError: &#39;LazyITKModule&#39; object has no attribute &#39;VTKImageToImageFilter&#39;<br>
<br>
VTKImageToImageFilter is not wrapped in the WrapITK? how can i convert the image from &amp; to between vtkImageData and itkImage? thanks...<br>
<br>
It is in WrapITK, but in an external project.<br>
See Wrapping/WrapITK/ExternalProjects/ItkVtkGlue<br>
<br>
Gaëtan<br>
<br>
<br>
<br>
Regards,<br>
<br>
Alex<br>
<br>
On Tue, Nov 17, 2009 at 1:20 PM, alex sando &lt;<a href="mailto:yejun.alex@gmail.com" target="_blank">yejun.alex@gmail.com</a>&gt; wrote:<br>
Thanks Gaëtan! It seems work well on my platform:). Some little issues i encountered in the progress, just a record for later&#39;s reference :).<br>
1. _BasePython project in WrapITK failed because /bigobj compile flag is not set defaultly.<br>
2. Dont forget to add path which contains SwigRuntimePython.dll to PATH<br>
<br>
Regards,<br>
<br>
Alex<br>
<br>
2009/11/17 Gaëtan Lehmann &lt;<a href="mailto:gaetan.lehmann@jouy.inra.fr" target="_blank">gaetan.lehmann@jouy.inra.fr</a>&gt;<br>
<br>
<br>
Le 16 nov. 09 à 19:14, alex sando a écrit :<br>
<br>
<br>
hello Gaëtan<br>
<br>
Currently i use itk 3.14 and Cableswig 3.14 and wrapitk0.2 in the source of itk 3.14. But when i build wrapitk, it failed with a lot of &quot;itkFlatStructuringElement.h: No such file or directory&quot; error.... can you give me any suggestion to solve this? many thanks, my platform is xp with vs2005 and cmake 2.8.<br>

<br>
Sure: turning on ITK_USE_REVIEW in cmake gui should help.<br>
Please let me know if that fix your problem.<br>
<br>
Regards,<br>
<br>
Gaëtan<br>
<br>
<br>
<br>
<br>
Regards,<br>
<br>
Alex<br>
<br>
2009/11/16 Gaëtan Lehmann &lt;<a href="mailto:gaetan.lehmann@jouy.inra.fr" target="_blank">gaetan.lehmann@jouy.inra.fr</a>&gt;<br>
<br>
Le 16 nov. 09 à 13:32, alex sando a écrit :<br>
<br>
<br>
hi all,<br>
 I am currently working on an legacy system which is composed under python 2.3. Is there any method that could help me to create the itk python wrap under python 2.3? I search for a while on the internet and find the wrapitk is a great tool for using itk under python environment, but its requirement for  the version of python is at least 2.4...I also tried to compile the wrap using cmake, but failed with<br>

<br>
<br>
CMake Warning at CMakeLists.txt:173 (FIND_PACKAGE):<br>
Could not find module FindCableSwig.cmake or a configuration file for<br>
package CableSwig.<br>
Adjust CMAKE_MODULE_PATH to find FindCableSwig.cmake or set CableSwig_DIR<br>
to the directory containing a CMake configuration file for CableSwig. The<br>
file will have one of the following names:<br>
CableSwigConfig.cmake<br>
cableswig-config.cmake<br>
CMake Error at CMakeLists.txt:185 (MESSAGE):<br>
CableSwig is required for CSwig Wrapping.<br>
Configuring incomplete, errors occurred!<br>
<br>
But in fact i set the CableSwig_DIR directory correctly... Is there any suggestion to get itk work under python 2.3.....great appreciate....<br>
<br>
<br>
Hi Alex,<br>
<br>
I think that WrapITK 0.2 - in ITK sources - *should* work with python 2.3.<br>
<br>
Can you give more informations on your system? OS, cmake version, compiler, ITK version, CableSwig version, …<br>
<br>
<br>
Regards,<br>
<br>
Gaëtan<br>
<br>
<br>
-- <br>
Gaëtan Lehmann<br>
Biologie du Développement et de la Reproduction<br>
INRA de Jouy-en-Josas (France)<br>
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09<br>
<a href="http://voxel.jouy.inra.fr" target="_blank">http://voxel.jouy.inra.fr</a>  <a href="http://www.itk.org" target="_blank">http://www.itk.org</a><br>
<a href="http://www.mandriva.org" target="_blank">http://www.mandriva.org</a>  <a href="http://www.bepo.fr" target="_blank">http://www.bepo.fr</a><br>
<br>
<br>
<br>
-- <br>
Gaëtan Lehmann<br>
Biologie du Développement et de la Reproduction<br>
INRA de Jouy-en-Josas (France)<br>
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09<br>
<a href="http://voxel.jouy.inra.fr" target="_blank">http://voxel.jouy.inra.fr</a>  <a href="http://www.itk.org" target="_blank">http://www.itk.org</a><br>
<a href="http://www.mandriva.org" target="_blank">http://www.mandriva.org</a>  <a href="http://www.bepo.fr" target="_blank">http://www.bepo.fr</a><br>
<br>
<br>
<br>
<br>
-- <br>
Gaëtan Lehmann<br>
Biologie du Développement et de la Reproduction<br>
INRA de Jouy-en-Josas (France)<br>
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09<br>
<a href="http://voxel.jouy.inra.fr" target="_blank">http://voxel.jouy.inra.fr</a>  <a href="http://www.itk.org" target="_blank">http://www.itk.org</a><br>
<a href="http://www.mandriva.org" target="_blank">http://www.mandriva.org</a>  <a href="http://www.bepo.fr" target="_blank">http://www.bepo.fr</a><br>
<br>
<br>
</blockquote>
<br>
-- <br>
Gaëtan Lehmann<br>
Biologie du Développement et de la Reproduction<br>
INRA de Jouy-en-Josas (France)<br>
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09<br>
<a href="http://voxel.jouy.inra.fr" target="_blank">http://voxel.jouy.inra.fr</a>  <a href="http://www.itk.org" target="_blank">http://www.itk.org</a><br>
<a href="http://www.mandriva.org" target="_blank">http://www.mandriva.org</a>  <a href="http://www.bepo.fr" target="_blank">http://www.bepo.fr</a><br>
<br>
</div></div></blockquote></div><br>