[Insight-users] Type error in CannyEdgeDetectionImageFilterConnectVTKITK.py

Wilbur C. K. Wong wilburckwong at gmail.com
Sun Jan 27 22:36:28 EST 2008


Thanks for the reply.  You are right, I use Cableswig CVS to build the
ITK CVS, so that's why I've got "u" in the type associated with the
_p_itk__VTKImageImportTitk__ImageTfloat_2u_t_t.  However, I use VTK
CVS build also, I don't know which version of Cableswig is it using
when I build it with CMake.  There is no option for me to choose the
Cableswig CVS that I've got in the CMake console.

Please advice.

Wilbur

2008/1/28, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>
> 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
>
>
>
>
>
>


More information about the Insight-users mailing list