Python + VTK + NumPy expert/examples

David Gobbi dgobbi at irus.rri.on.ca
Fri Aug 20 12:56:56 EDT 1999


Hi Greg,

I have written some tools to help with this.  I can email them
to you if you want.

The tools are three python classes:
vtkImageExportToArray:   export an image to a NumPy array
vtkImageImportFromArray: import an image from a NumPy array
vtkMatrixProxy: has the 'look and feel' of a 4x4 Numeric array,
                but it shares storage with a vtkMatrix4x4

Also, it is possible to pass a python string to most vtk methods
which require a void * (only in VTK 2.4 and above, though). 

 - David

--David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Fri, 20 Aug 1999 gvwilson at nevex.com wrote:

> Hello.  I have some questions about using VTK with Python, and in
> particular with the NumPy extensions; I'm particularly curious about
> mixing VTK's data storage machinery with NumPy.  If someone out there has
> experience with this, and wouldn't mind answering a few questions, I'd be
> grateful...
> 
> Thanks,
> Greg Wilson
> 
> 
> 
> 
> -----------------------------------------------------------------------------
> This is the private VTK discussion list.  Please keep messages on-topic.
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at gsao.med.ge.com>.  For help, send message body containing
> "info vtkusers" to the same address.     Live long and prosper.
> -----------------------------------------------------------------------------
> 



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list