[SciPy-user] scipy to vtk conversion?

Prabhu Ramachandran prabhu_r at users.sf.net
Fri Dec 30 22:45:00 CST 2005


>>>>> "Pau" == Pau Gargallo <pau.gargallo at gmail.com> writes:

    Pau> hi, is there a simple way to convert a scipy array to a vtk
    Pau> array?  is there a way to do that without writing a explicit
    Pau> python loop over the data?

You can do this easily with TVTK:

 http://www.enthought.com/enthought/wiki/TVTK

Currently TVTK uses "numerix" to support numeric/numarray and scipy.
For reasons too long to elaborate here, it defaults to numeric and
will use scipy if you set the environment variable NUMERIX to 'scipy'.
Full support for scipy in tvtk or mayavi2 requires a patch to traits
which is available here:

  http://www.enthought.com/enthought/ticket/326

However, when you build traits you might run into difficulties since
it uses scipy_distutils which is part of old scipy.  

I know that this is not ideal but there is little I can do about it.

cheers,
prabhu



More information about the SciPy-user mailing list