[vtkusers] Reading large arrays into vtk with python

David E DeMarle dave.demarle at kitware.com
Fri Sep 19 16:01:49 EDT 2008


I believe so yes.

Take a look at the numpy_support.py module. As long as you have numpy
on your machine and are using >= VTK5.2 you should be able to use it.

cheers,
Dave DeMarle


On Fri, Sep 19, 2008 at 9:31 AM, Paul <massivemonkeymayhem at gmail.com> wrote:
> Hi. I'm just starting out in VTK. I've written a python script that converts
> 3D scalar data to .VTK/.VTI files. But it's rather slow due to having to
> loop over every voxel, which I am trying to eliminate.
>
> I've implemented the script using NumPY arrays such that I can quickly
> reorder the X,Y,Z data into any array structure as needed. This data needs
> to be fed into a vtkImageData. Is there a fast way to create a VTK data
> array from my data?
>
> Regards,
>
> Paul
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list