[vtk-developers] Announcing new features of python wrappers
David Gobbi
david.gobbi at gmail.com
Fri Sep 17 09:59:57 EDT 2010
Hi All,
I pushed several improvements to the python wrappers this week.
1) Multi-dimensional array arguments. This adds several vtkMath
methods that were not previously wrapped. When passing an array, you
can use either a numpy array or a nested list. Values are returned in
the array, just as they would be in C++.
2) Reference args. This adds several cell methods that were not
previously wrapped. To use these methods, pass a vtk.mutable() object
as the arg, and the python wrappers will read the value and then write
to it. The 'mutable' object is a new VTK-specific python numeric type
that supports assignment.
3) size_t and ssize_t args. These were not wrapped previously.
4) Typedef'd types as args. For now, this is only supported for
wrapping within the VTK source tree. I added all VTK typedefs to the
vtkKitHierarchy.txt files, and these hierarchy files are not yet
exported.
5) Optional args. Any args that are optional in C++ are now optional in Python.
6) Unsigned integer types for array arguments (only for python 2.3 and higher).
7) This change is a few weeks old, but it's worth mentioning: array
args of unknown size (like double[] or *double) are wrapped for the
SetTuple/GetTuple methods of vtkDataArray and its subclasses.
David
More information about the vtk-developers
mailing list