[vtkusers] Re: passing vtkDataArray to python/Numeric arrays

Bryan Cole bryan.cole at teraview.com
Wed Oct 13 09:39:53 EDT 2004


> 
> There's an array function: fromstring(string,typecode). I haven't used it
> myself but it looks like what you need.

But how do I get vtkDataArray as a binary string (to pass to
Numeric.fromstring())?

vtkDataArray::GetVoidPointer() returns a pointer in "SWIG" form to python,
i.e. as a python-string. fromstring() interprets this as a literal string
(instead of as a pointer in memory) as so gives the wrong result.

BC

> 




More information about the vtkusers mailing list