[vtkusers] How to read POINTS with double precision in a vtk data file ?
Sophie BOUDAUD
sophie.boudaud at cdr.hutchinson.fr
Fri Oct 17 09:16:06 EDT 2008
Hi vtkusers,
I want to read POINTS in a vtk data file with double precision, sadly
POINTS values are truncated.
Can someone explain me what is wrong with my program ?
I'm working on Windows and I'm using TclPro1.4 and VTK4.2.
My reading VTK file is :
# vtk DataFile Version 3.0
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 37466 double
-0.1214999924E+03 -0.3000000000E+03 0.8236390114E+01
-0.1214999847E+03 -0.3000000000E+03 0.1123638916E+02
....
CELLS 69889 378041
1 597
1 598
...
CELL_TYPES 69889
1
1
...
CELL_DATA 69889
SCALARS MATERIAL float
LOOKUP_TABLE default
1
1
...
SCALARS GROUP float
LOOKUP_TABLE default
1
1
...
I'm using vtkUnstructuredGridReader to read my VTK file :
vtkUnstructuredGridReader Ureader
Ureader SetFileName $file
A vtkUnstructuredGrid object is created to insert or delete points or
cells :
vtkUnstructuredGrid usgModel
usgModel ShallowCopy [Ureader GetOutput]
To get the value of the first point : set coord(0) [usgModel GetPoint 0]
The coordinates are : -121.5 -300 8.23639 !!!!
Best regards,
Sophie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081017/d123aee6/attachment.htm>
More information about the vtkusers
mailing list