[vtkusers] Reading large arrays into vtk with python

Paul massivemonkeymayhem at gmail.com
Tue Sep 23 08:53:51 EDT 2008


Unfortunately we're still running the VTK5.03 package bundled into Ubuntu
8.04. Ideally I'd like to stick to using packages to allow easier
distribution across different machines in our network. I haven't been able
to find any VTK5.2 packages for Ubuntu or Debian.

I tried making my own .deb package from source until I realized that I also
didn't have the necessary version of CMake. I did try compiling and
installing 5.2 onto my own machine but my code started to segfault like
crazy, so I slowly backed away from that.

Is there another approach that I can use to read Python/Numpy data into VTK
5.03? Or a fool-proof .deb distribution of 5.2?

Thanks,

Paul



On Fri, Sep 19, 2008 at 5:31 PM, David E DeMarle
<dave.demarle at kitware.com>wrote:

> 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
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080923/6b8b0491/attachment.htm>


More information about the vtkusers mailing list