[vtkusers] passing vtkDataArray to python/Numeric arrays

Malcolm Drummond malcolm at geovision.co.za
Fri Oct 8 07:24:49 EDT 2004


Hi Bryan

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

HTH
Malcolm

----- Original Message -----
From: "Bryan Cole" <bryan.cole at teraview.com>
To: "VTK users list" <vtkusers at vtk.org>
Sent: Friday, October 08, 2004 11:40 AM
Subject: [vtkusers] passing vtkDataArray to python/Numeric arrays


> Is there an efficient way to pass the data from a vtkDataArray object to
> a python Numeric array (for easier manipulation)?
>
> I can do the reverse using vtkDataArray::SetVoidArray, but
> vtkDataArray::GetVoidArray doesn't return anything useful to python.
>
> Note. I need to do this for general vtkDataArrays, so the
> vtkImageExportToArray python class doesn help (as it only handles
> vtkImageData).
>
> Bryan
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list