[Insight-users] Problem with ConnectVTKITK

Charl P. Botha c.p.botha at ewi.tudelft.nl
Wed, 18 Feb 2004 23:25:20 +0100


Rodrigo Trujillo wrote:
> Traceback (most recent call last):
>   File "C:\Documents and 
> Settings\ailton\Desktop\Testes\RecursiveGaussian.py", line 46, in ?
>     vtkitk.ConnectVTKToITKF3(vtkExporter, itkImporter.GetPointer())
> TypeError: Type error. Expected 
> _p_itk__VTKImageImportTitk__ImageTfloat_3_t_vtkFloatingPointType_t

Durnit!  I can reproduce this error with the 
CannyEdgeDetectionImageFilterConnectVTKITK.py example and recent ITK and 
VTK CVS.  Swig is actually mangling the vtkFloatingType as part of its 
text representation... the fact that the type is available during 
building is not sufficient.

My current thoughts are to make vtkSystemIncludes.h available to swig 
during the .i -> .cxx parsing so that vtkFloatingPointType is correctly 
interpreted as either float or double.  Any other ideas on this?

As far as I can sniff, Swig should handle the typedef correctly and 
mangle it as 'float' or 'double'.  *crosses fingers*

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/