How to do a 2D STRUCTURED_POINTS VTK file

I've been struggling with the documentation for constructing VTK files. In my case I want to make a file that describes a rectangular structured 2D mesh, and add some values to the points of the mesh (scalars and vectors). The file name is data.vtk and looks like this:

#vtk DataFile Version 2.0
Some data
ASCII

DATASET STRUCTURED_POINTS
DIMENSIONS 51 21 1
SPACING 0.000625 0.001250 0.0000
ORIGIN 0.000000 0.035000 0.0000

POINT_DATA 1071
SCALARS nde double 1
LOOKUP_TABLE default
1.096387e+17
1.107201e+17
1.117934e+17
1.128579e+17
...

When I open the file in Paraview, the program instantly crashes, and I supposed it's related with the file format because I've been able to open other data files before. My Paraview version is 5.1.2.

I haven't been able to find my error neither have I come up with a good example of a VTK file that uses a 2D mesh.

Thanks for the help!

Upvotes: 0

Views: 1417

Answers (1)

Cory Quammen
Cory Quammen

Reputation: 1263

This is a little silly but you need to add a space between # and vtk in the first line:

# vtk DataFile Version 2.0

Upvotes: 1

Related Questions