[vtkusers] structured points dataset
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Wed Nov 20 20:40:31 EST 2002
>>>>> "BA" == Beate Aistleitner <B.Aistleitner at irl.cri.nz> writes:
BA> Hi, I have a some troubles understanding the syntax of a
BA> structured points dataset and the input of scalar values. I
BA> have 3D data where the origin of the axis is not 0 but the
BA> range is for example from -3 to 4. The values are as for
BA> example this one -3.254. I want to write this data into a .vtk
BA> file and use the vtkSturcturedPointsReader for reading this
BA> data into my program. My problem now is how this file has to
BA> look like exactly to fit the requirements for the
BA> vtkStructuredPointsReader because the examples I found are
BA> just like the following one.
The DIMENSIONS indicate how many values you have per axis. So
DIMENSIONS 10 10 30
implies 10 along x, 10 along y and 30 along z.
ORIGIN specifies the starting point of your data set and SPACING
specifies the distance between two points along each axes.
The value after POINT_DATA is the number of points that you have in
your dataset in the above case it should be 3000.
Finally, remember that the POINT_DATA should be specified such that
the x co-ordinate varies fastest, y next and z last.
A trivial example:
# vtk DataFile Version 2.0
Structured points example.
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 2 2 1
ORIGIN 0.0 0.0 0.0
SPACING 1.0 1.0 1.0
POINT_DATA 4
SCALARS Temperature float
LOOKUP_TABLE default
100 200
300 400
VECTORS velocity float
0.0 0.0 0.0
1.0 0.0 0.0
0.0 1.0 0.0
1.0 1.0 0.0
cheers,
prabhu
More information about the vtkusers
mailing list