[vtkusers] (no subject)

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Sep 4 05:49:08 EDT 2002


>>>>> "DP" == dharmendra  <dharmendra at strandgenomics.com> writes:

    DP> Hello all, Iam planning to use vtk(c++), python and tkinter.
    DP> My question is how can i display a vtkwindow(c++) in a tk
    DP> widget using python.

The present VTK-Python code works in just that way.  VTK is written in
C++ and the classes are exposed to Python and used from Python.  You
could look at how its done for VTK-Python and do the same thing.

    DP> Second question is how can i wrap a c++ program to return a
    DP> render window object in python.

If you want to use vtkpython at the Python side of things you could do
this by doing the following:

  """When you instantiate a class, you can provide a hexidecimal string
  containing the address of an existing vtk object, e.g.

   t = vtkTransform('_1010e068_vtkTransform_p')

  The string follows SWIG mangling conventions.  If a wrapper for the
  specified object already exists, then that wrapper will be used
  rather than a new wrapper being created.  If you want to use this
  feature of vtkpython, please think twice."""

This was taken from vtk3.2's python/python.txt.

HTH,
prabhu




More information about the vtkusers mailing list