[vtkusers] Status of VTK Python 3 wrapper support

Arnd Baecker arnd.baecker at web.de
Fri Aug 1 06:14:29 EDT 2014

On Fri, 1 Aug 2014, Dov Grobgeld wrote:

> Is there a conversion document describing how the "look and feel" of the new
> binding?
> The current binding is very non-pythonesque in various ways. E.g.:
> import vtk
> # identity transformation
> t = vtk.vtkTransform()
> in_point = (1,0,0)
> out_point = [0,0,0]
> t.TransformPoint(in_point,out_point)
> # would expect something like
> in_point = vtk.vtkPoint((1,0,0))
> out_point = t.TransformPoint(in_point)
> There are lots of other examples as well that I encountered in the source.
> E.g. the use of gettattr() and a dispatcher, instead of just using the
> standard python list of class methods.
> Of course, such a drastic change this will break the current API. But you
> can always call it vtk6 and decide not to be backwards compatible.

A more pythonic API to vtk is provided by TVTK
(traited vtk, see: http://docs.enthought.com/mayavi/tvtk/README.html
This is for example the basis of Mayavi
for 3D scientific data visualization and plotting using python).

Best, Arnd

More information about the vtkusers mailing list