[Insight-users] connectpipelines in python

Rodrigo Trujillo Rodrigo Trujillo" <rodrigo.trujillo at cenpra.gov.br
Mon, 5 Apr 2004 12:48:02 -0300


Hi Xujf,

you need to  the pointer, try:

- connect.ConnectVTKToITKF3(vtkExporter, itkImporter.GetPointer())

if this doesn't work, maybe you should update InsightApplications.


Rodrigo Trujillo




----- Original Message ----- 
From: "xujf" <xujf at sjtu.edu.cn>
To: <insight-users at itk.org>
Sent: Monday, April 05, 2004 12:31 PM
Subject: Re: Re: Re: [Insight-users] connectpipelines in python


>
>
> >You have to build this module first.  Configure CMake at the top-level
> >of InsightApplications and then build ConnectVTKITK.  Make sure the
> >resultant modules are in your PYTHONPATH and LD_LIBRARY_PATH (PATH for
> >windows).
>
> >Good luck,
> >Charl
>
> Hi,Charl P. Botha:
>    with your help,ConnectVTKITK module has been found.thank you very much.
>
> import sys,os
> import paths
> import InsightToolkit as itk
> from vtkMINCReader  import *
> import ConnectVTKITK as connect
>
> reader=vtkMINCReader()
> vtkexport=vtkImageExport()
> vtkimport=vtkImageImport()
>
> vtkexport.SetInput(reader.GetOutput())
> reader.SetFileName("E:/atamai/2003-01-27/atamai/examplesPmw/sbrain.mnc")
>
> itkimport=itk.itkVTKImageImportF3_New()
> itkexport=itk.itkVTKImageExportF3_New()
>
> connect.ConnectVTKToITKF3(vtkexport,itkimport)
>
> I think the function of ConnectVTKToITK() in python is the same as
> connectpipelines() in c++,so I write my programe as below.
>
> however another error is found:
> TypeError:Type error.Got
_p_itk__SmartPointerTitk__VTKImageImporterTitk__ImageTf
> -loat_3_t_t_t,expected _p_itk__VTKImageImporterTitk__ImageTfloat_3_t_t
>
> Best Regards!
> xujf
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>