[vtkusers] array of data --> png image (in Python)?

Dominik Szczerba dominik at itis.ethz.ch
Mon Jan 11 14:17:00 EST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you are using numpy then matplotlib will do it in one line.
With VTK it is also possible, but the way is longer. Create
vtkImageData, set the point data to your data, preferably using vtk
numpy support, else it gets too slow. Then save to png with a PNG writer.

Dominik

Randy Heiland wrote:
> Can someone tell me how I might generate/save a png image, given an array of data - in Python?  Any examples that I've overlooked?
> 
> thanks, Randy (please keep me cc'd on reply)
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAktLeRcACgkQ/EBMh9bUuzIjQwCePuFgVxdNkHVABhz87K5keozI
N8oAoMLxofoAnPqdG+Yvq6io2i0iI5IF
=kXJo
-----END PGP SIGNATURE-----



More information about the vtkusers mailing list