[Paraview] reading scalars

Amy Henderson amy.henderson at kitware.com
Thu, 11 Mar 2004 09:31:38 -0500


At 08:57 AM 3/11/2004, Puiseux Pierre wrote:
>Hello,
>
>Thanks for this beautiful tool.
>
>A problem with reader in paraview :
>paraview (vtk?) seems to be unable to read two SCALARS
>In the following example, SCALAR "erreur" is ignored, or at least,
>cannot be accessed from paraview.
>(while, in Mayavi, the two SCALARS are read and accessible)
>Maybe a bug ?

No it isn't a bug. The legacy VTK file format (the format your example file=
=20
is in) only supports one SCALAR. At the time this file format was created,=
=20
VTK only allowed you to have one scalar array. If you needed more than one,=
=20
it needed to be in field data. Try making the changes I have noted in your=
=20
example below. The new XML-based VTK file formats do not have this=
 limitation.

># vtk DataFile Version 3.0
>test puiseux/trujillo
>ASCII
>DATASET UNSTRUCTURED_GRID
>POINTS 216 float
>0.000000  0.000000  0.000000
>...
>1.000000  1.000000  1.000000
>CELLS 125  1125
>8 0  1  2  3  4  5  6  7
>.....
>8 172  173  179  178  208  209  215  214
>CELL_TYPES 125
>12
>...
>12
>POINT_DATA 216
>SCALARS solution_approchee float
>LOOKUP_TABLE default
>0.000000
>...
>0.100000
>0.000000

FIELD FieldData 1

>SCALARS erreur float  <-- remove this line
>LOOKUP_TABLE default  <-- remove this line too

erreur 1 216 float <-- indicates that this is a single-component array with=
=20
216 entries

>0.000000
>...
>0.000125
>
>
>--
>Puiseux Pierre <pierre.puiseux at univ-pau.fr>
>Universit=E9 de Pau
>
>_______________________________________________
>ParaView mailing list
>ParaView at paraview.org
>http://www.paraview.org/mailman/listinfo/paraview