[vtkusers] VTK and Numpy

Peter Halverson halverson at byu.edu
Tue May 12 12:12:24 EDT 2009


I'm attempting to export VTK data into numpy using vtk_to_numpy.  The
program reads in a set of DICOM files using vtkDICOMImageReader. Filters the
image using vtkContourFilter, and some other stuff and then displays the
rendered solid. I would then like to export the data to Numpy so i do the
following scalars=skin.GetMapper().GetInput().GetPointData().GetScalars()

Which gives me the scalars that I am looking for.  My question is how do get
the [x,y,z] data to go with the scalars into numpy?

skin.GetMapper().GetInput().GetWholeExtent() gives me the correct dimensions
(0, 511, 0, 511, 0, 56) but I have exported less scalars than this...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090512/e722ae4d/attachment.htm>


More information about the vtkusers mailing list