[vtkusers] Writing compatible python wrappers for own software
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Fri Sep 5 08:17:25 EDT 2003
>>>>> "MA" == Mark Asbach <Mark.Asbach at post.rwth-aachen.de> writes:
MA> Hi list, I'm quite new to the python world and therefore my
MA> question might be basic, but I couldn't find an easy answer to
MA> it:
[snip]
MA> vtkUnstructuredGrid * GetDataSourcePointer(int i);
MA> Can I just use SWIG to wrap that call into python and then use
MA> the return value for
MA> SomeVtkFilter.SetInput(x.GetDataSourcePointer(0)) or what do I
MA> need to do instead? Especially, what is necessary to ensure
MA> correct reference counting for the vtk smart pointers?
This is not a simple topic to reply to and I dont have the time to say
too much but you might want to read this thread:
http://public.kitware.com/pipermail/vtkusers/2002-October/013980.html
Essentially you can use the functions inside vtkPythonUtil.h to
convert from/to Python and C++. As I said I haven't really thought
about your problem enough to say that the above will be enough but I
hope you should be able to figure it out.
cheers,
prabhu
More information about the vtkusers
mailing list