
Hi, 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

On Wed, 6 Jun 2001, Karshi Hasanov wrote:
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

On Wed, 6 Jun 2001, Karshi Hasanov wrote:
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
participants (2)
-
Karshi Hasanov
-
Pearu Peterson