[Paraview] Paraview file format documentations

Berk Geveci berk.geveci at kitware.com
Thu Feb 28 16:42:36 EST 2008


Before you go too far down this path, I want to warn you that I
recently realized that reading ASCII based XML files is rather slow. I
assume this is due to the fact that we use an XML parser to read the
XML portion of the file and that is rather slow. If your data is
relatively small and simple, I suggest using the legacy VTK format. It
is very easy to write and is faster for the ASCII case.

-berk

On 2/28/08, Markus Werle <numerical.simulation at web.de> wrote:
> Hi!
>
>  Thanks for your answers.
>  After rethinking what I really want to achieve I come to the conclusion that
>  my data is so simple that it might be a good idea to give the vtu file format
>  a second try.
>
>  What I did not understand is the "offsets" entry in this format.
>  What is meant with
>  "offset into the connectivity array for the end of each cell"?
>
>  Probably  a little example will help: consider I have two quadratic cells
>  lying side by side like in the example below, which entries have to be made
>  in the offsets section?
>
>
>  <?xml version="1.0"?>
>  <VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian"
>  compressor="vtkZLibDataCompressor">
>   <UnstructuredGrid>
>     <Piece NumberOfPoints="6" NumberOfCells="2">
>       <PointData Scalars="scalars">
>         <DataArray type="Float32" Name="scalars" format="ascii">
>           1 0.3 0.5 0.9 0.5 0
>         </DataArray>
>       </PointData>
>       <CellData>
>       </CellData>
>       <Points>
>         <DataArray type="Float32" NumberOfComponents="3" format="ascii">
>           0 0 0
>           1 0 0
>           1 1 0
>           0 1 0
>           2 0 0
>           2 1 0
>         </DataArray>
>       </Points>
>       <Cells>
>         <DataArray type="Int32" Name="connectivity" format="ascii">
>         4 0 1 2 3
>         4 1 4 5 2
>         </DataArray>
>         <DataArray type="Int32" Name="offsets" format="ascii">
>
>  SOMETHING IS WRONG HERE:
>        1 5
>         </DataArray>
>         <DataArray type="UInt8" Name="types" format="ascii">
>           9 9
>         </DataArray>
>       </Cells>
>     </Piece>
>   </UnstructuredGrid>
>  </VTKFile>
>
>
>  best regards,
>
>  Markus
>
>  P.S.: paraview crashes on
>   <DataArray type="Float32" NumberOfComponents="2" format="ascii">
>           0 0
>           1 0
>  etc.
>
>  ERROR: In /home/berk/Work/ReleaseBuilds/ParaView3/VTK/Common/vtkPoints.cxx,
>  line 177
>  vtkPoints (0x890b090): Number of components is different...can't set data
>
>
>
>
>  _______________________________________________
>  ParaView mailing list
>  ParaView at paraview.org
>  http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list