[vtkusers] vtk file format

Immo Trinks trinks at esc.cam.ac.uk
Thu Jul 8 06:21:36 EDT 2004


Hi Vincent, 

in Tcl you could use the following lines to read the example file "data.vtk" 
that is listed below:

vtkPolyDataReader reader
reader SetFileName "data.vtk"
reader SetScalarsName "temperature"


#####################################


# vtk DataFile Version 2.0
data.vtk
ASCII

DATASET POLYDATA
POINTS 1525 float
4536.02 1037.54 4342.56
4536.28 1038.26 4342.95
4536.22 1035.78 4343.6
4533.85 1030.33 4351.91
...

POINT_DATA 1525
SCALARS temperature float 1
LOOKUP_TABLE lut
4.4
5.6
5.8
4.7
...

POINT_DATA 1525
SCALARS pressure float 1
LOOKUP_TABLE lut
0.2
3.5
0.7
1.1
...


Hope that helps,
Immo


















On Thursday 08 Jul 2004 10:23, Vincent MEYER wrote:
> Hello vtkusers,
>
> I start using vtk and I've got a problem. I'd like to know how to give the
> different names to scalars or vectors in the vtk file format (temperature
> and pressure for example). Could someone help me?
>
> Thanks a lot
>
> Vincent MEYER
>
> _________________________________________________________________
> Hotmail : un compte GRATUIT qui vous suit partout et tout le temps !
> http://g.msn.fr/FR1000/9493
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to
> subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list