[vtkusers] XML format help

Randy Heiland heiland at ncsa.uiuc.edu
Thu Mar 20 11:26:33 EST 2003


While I go off to look at the code, perhaps a VTK/XML guru could answer my
question...

Trying to follow the XML format described in the VTK file format .pdf, I've
created a simple RectGrid XML file (below) and when I try to read it using:

reader = vtkXMLRectilinearGridReader()
reader.DebugOn()
reader.SetFileName("test1.vtr")
#reader.UpdateWholeExtent()
reader.Update()


I get the error:

ERROR: In /home/heiland/vtk_Dec17.02/VTK/IO/vtkXMLStructuredDataReader.cxx,
line 71
vtkXMLRectilinearGridReader (0x824f4b0): RectilinearGrid element has no
WholeExtent.


--Randy

--- test1.vtr ---

<VTKFile type="RectilinearGrid" version="0.1" byte_order="LittleEndian">
  <RectilinearGrid WholeExtent="0.0 30.0  0.0 30.0  0.0 10.0">
    <Piece Extent="0.0 30.0  0.0 30.0  0.0 10.0">
      <Coordinates>
        <DataArray type="Float32">
          0 10 30
        </DataArray>
        <DataArray type="Float32">
          0 10 30
        </DataArray>
        <DataArray type="Float32">
          0 10
        </DataArray>
      </Coordinates>
      <PointData Scalars="Water">
        <DataArray Name="water" type="Float32" NumberOfComponents="1"
                   format="ascii">
        0 10 30 0 10 30 0 10 30
        5 15 35 5 15 35 5 15 35
        </DataArray>
      </PointData>
    </Piece>
  </RectilinearGrid>
</VTKFile>



More information about the vtkusers mailing list