[vtkusers] vtk_to_numpy: how to get a vtk_array?

Mathias Franzius Mathias.Franzius at web.de
Mon Mar 23 11:06:06 EDT 2009


Dear ng,

I want to render offscreen into a numpy array. So far it works with writing to disk with a vtkWindowToImageFilter and an ImageWriter and then reloading it with PIL and converting via scipy.misc.fromimage. 
However, the vtk.util.vtk_to_numpy seems much more straight-forward and efficient. 
My problem is: how do I get the rendered image in vtk_data format? Now I use the renderWindow like this:
fil = vtk.vtkWindowToImageFilter()
fil.SetInput(renderWindow);

Thanks!
   Mathias
_______________________________________________________________________
DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a




More information about the vtkusers mailing list