[Insight-users] CSwig wrapping question...

Tuhin Sinha tk.sinha@vanderbilt.edu
Fri May 7 16:23:38 EDT 2004


Hello fellow insight-ers,

  I have recently started exploring the wrapping capabilities of ITK and
CSwig for Python.  I have managed to adapt some of the files in the
Wrapping/CSwig directory to wrap the following classes:

itkDemonsRegistrationFilter
itkPDEDeformableRegistrationFilter
itkVectorNeighborhoodOperatorImageFilter
itkWarpImageFilter

A problem I have come across that I don't understand is that some of the
documented member functions aren't showing up in python.  Specifically,
for the Demons registration filter, I can't access the following
methods:

itkDemonsRegistrationFilter::SetNumberOfIterations()
itkDemonsRegistartionFilter::GetOutput()

Here is the error I get from python for GetOutput():

Traceback (most recent call last):
  File "./DeformableRegistration.py", line 84, in ?
    print demons.GetOutput()
  File
"/home/sinhatk/src/Insight-build/bin/itkDemonsRegistrationFilter.py",
line 527, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self,
itkDemonsRegistrationFilterF2F2dF2, name)
  File
"/home/sinhatk/src/Insight-build/bin/itkDemonsRegistrationFilter.py",
line 21, in _swig_getattr
    raise AttributeError,name
AttributeError: GetOutput


Any information on where to get started with debugging this problem
would be greatly appreciated.  Thanks for your time.

Regards,

Tuhin Sinha




More information about the Insight-users mailing list