[Insight-users] Type error in CannyEdgeDetectionImageFilterConnectVTKITK.py

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sun Jan 27 16:05:15 EST 2008


Hi,

The "u" is added by the newer versions of cableswig. All the stable  
releases are not using that additional "u".
I suspect you have mixed a build with an "old" cableswig, and a build  
with cableswig cvs. Can you check that you are using the same  
cableswig everywhere?

If you have mixed the cableswig version, a simple clean and rebuild of  
your projects should fix the problem.

Gaëtan


Le 23 janv. 08 à 09:04, Wilbur C. K. Wong a écrit :

> Dear all,
>
> Python binding of ITK and VTK is new to me.  I want to use python
> script to connect ITK with VTK.  From the mailing list archive, I
> learnt that there is an example script named
> CannyEdgeDetectionImageFilterConnectVTKITK.py that demonstrate how the
> connection can be done.  Therefore, I execute the following command:
>
> python CannyEdgeDetectionImageFilterConnectVTKITK.py
> Traceback (most recent call last):
>  File "CannyEdgeDetectionImageFilterConnectVTKITK.py", line 42, in  
> <module>
>    CVIPy.ConnectVTKToITKF2(vtkExporter, itkImporter.GetPointer())
> TypeError: Type error. Got
> _p_itk__VTKImageImportTitk__ImageTfloat_2u_t_t, expected
> _p_itk__VTKImageImportTitk__ImageTfloat_2_t_t
>
> FYI, I build ITK, VTK, CableSwig on my Linux machine with cmake
> version 2.5-20080111 and Python 2.5.1.  To my understanding, there is
> a type mismatch, _p_itk__VTKImageImportTitk__ImageTfloat_2u_t_t vs
> _p_itk__VTKImageImportTitk__ImageTfloat_2_t_t.  The only difference in
> the typename is that there is a "u" after "...float_2" in the former
> type.
>
> Please advice how can I solve the type mismatch problem.
>
> Best regards,
> Wilbur
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr




-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://public.kitware.com/pipermail/insight-users/attachments/20080127/1346ead4/PGP.pgp


More information about the Insight-users mailing list