[vtkusers] VTS File Format
Hal Canary
hal at cs.unc.edu
Tue Jul 23 08:27:01 EDT 2013
On 07/23/2013 05:45 AM, Patrick Bechlars wrote:
> We have a flow solver and want to write out various time dependent
> variables on a structured grid. We choose the VTS XML file format as we
> are using paraview to visualize our data and further the VTK file
> formats seem to provide loads of freedom.
> The only proper documentation I could find was the 19pages PDF `File
> Formats for VTK version 4.2'. This one tells me already loads of things,
> but I am lagging some information to finish writer:
That PDF is the best reference on the VTK format.
Another thing you can do is crate a file in ParaView and save it as a
.vtk file; then you can inspect that file to find out what is happening.
I cooked up an example using that method just now, which I am attaching.
> 1. If i have 3 dimensional data (x,y,z) , how do I order the data in the
> StructuredGrid format? Will it be /loop over z ( loop over y ( loop over
> x ( write point ) ) )/ or the other way around?
Yes. Not the other way around.
> 2. Our grid is not changing in time. How can I write a time series with
> a steady grid in one VTS file? Or is it possible to write a separate
> grid file, so that I do not have to dump the grid with every time step?
If the grid is static but the data is changing, you could concatenate
those two parts of the file after the fact.
-------------- next part --------------
# vtk DataFile Version 3.0
vtk output
ASCII
DATASET STRUCTURED_GRID
DIMENSIONS 4 4 4
POINTS 64 double
0.5 0.5 0.5
1 0 0 2 0 0
3 0 0 0 1 0 1 1 0
2 1 0 3 1 0 0 2 0
1 2 0 2 2 0 3 2 0
0 3 0 1 3 0 2 3 0
3 3 0 0 0 1 1 0 1
2 0 1 3 0 1 0 1 1
1 1 1 2 1 1 3 1 1
0 2 1 1 2 1 2 2 1
3 2 1 0 3 1 1 3 1
2 3 1 3 3 1 0 0 2
1 0 2 2 0 2 3 0 2
0 1 2 1 1 2 2 1 2
3 1 2 0 2 2 1 2 2
2 2 2 3 2 2 0 3 2
1 3 2 2 3 2 3 3 2
0 0 3 1 0 3 2 0 3
3 0 3 0 1 3 1 1 3
2 1 3 3 1 3 0 2 3
1 2 3 2 2 3 3 2 3
0 3 3 1 3 3 2 3 3
2.5 2.5 2.5
POINT_DATA 64
FIELD FieldData 1
RTData 1 64 double
55 37 40 85 7 24 15 96 52 68 58 23 90 18 3 4 41 3 91 8 26 73 0 46 27
94 82 40 3 6 96 7 66 43 67 10 40 91 25 80 41 35 98 72 45 34 36 36 47
92 15 49 40 23 23 74 83 8 19 56 27 8 37 28
More information about the vtkusers
mailing list