From: Pearu P. <pe...@ce...> - 2001-06-07 08:08:30
|
On Wed, 6 Jun 2001, Karshi Hasanov wrote: > I wanna build *.vtk structured data file from an array A[i,j,k] which has > a vector attributes. What's the right( or best) way of doing it using python? > I do have the VTK User's Guide Book, but it didn't tell me much. > Thanks Check out PyVTK: http://cens.ioc.ee/projects/pyvtk/ Using PyVTK you can create the data file as follows: from pyvtk import * VtkData(StructuredPoints([n1,n2,n3]),PointData(Vectors(A))).tofile('arr.vtk') where A is n1 x n2 x n3 arrays of 3-sequences. Pearu |