[Paraview] Paraview file format documentations

Markus Werle numerical.simulation at web.de
Thu Feb 28 15:40:29 EST 2008


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





More information about the ParaView mailing list