[vtkusers] Python Warpping Help !!
Chou Yi-Yu
chouyiyu at hotmail.com
Fri Oct 10 11:59:20 EDT 2003
Dear all,
I am trying to pass a vtk object (vtkImageData) to my own C++ class by using
SWIG to do warpping.
And I'm having a hard time debugging an error.
I have my own C++ class :
//pde.h
#include "vtkImageData.h"
class Func_A{
public:
Func_A();
~Func_A();
void set_OriImg(vtkImageData *img);
}
//pde.c
void Func_A ::set_OriImg(vtkImageData *img) {
// do nothing
}
.....................................................................................................
Then I built and compiled the .so module successfully.
In my python code, when I executed :
>>>from pde import *
...........
>>>IR = Func_A()
>>>IR.set_OriImg(image1) // image1 is a vtkImageData object
I got the following error message :
IR.set_OriImg(image1)
File "pde.py", line 84, in set_OriImg
def set_OriImg(*args): return apply(_pde.Heat2d_set_OriImg,args)
AttributeError: 'module' object has no attribute 'Heat2d_set_OriImg'
That's wrong with my code ?
Please help me !!!!!!!!
_________________________________________________________________
Need more e-mail storage? Get 10MB with Hotmail Extra Storage.
http://join.msn.com/?PAGE=features/es
More information about the vtkusers
mailing list