[Paraview] trouble getting base64 encoding to work in .vtu file

Tim Kostka kostka at berkeley.edu
Tue Nov 24 18:18:30 EST 2009


I have a .VTU file with all ASCII data values which loads fine into
ParaView.  I'm trying to instead write the data as format=binary or
format=appended base64 encoded which doesn't seem to be working.  I get the
error:

ERROR: In ..\..\..\src\VTK\IO\vtkXMLDataReader.cxx, line 544

vtkXMLUnstructuredGridReader (0D842188): Cannot read cell data array
"material" from PointData in piece 0. The data array in the element may be
too short.

Here's the last dataarray input as binary.  Correct me if I'm wrong but 0
written as an UInt32 then encoded to base64 is "AAAAAA==".  So what am I
doing wrong?

...
<DataArray type="UInt32" Name="material" format="binary">
AAAAAA==
</DataArray>
...

Here is my data file (.vtu) as ASCII which works:

<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian">
  <UnstructuredGrid>
    <Piece NumberOfPoints="8" NumberOfCells="1">
      <Points>
        <DataArray type="Float32" NumberOfComponents="3" format="ascii">
 0 0 1 2 0 1 2 2 1 0 2 1 0 0 2 2 0 2 2 2 2 0 2 2
        </DataArray>
      </Points>
      <Cells>
        <DataArray type="Int32" Name="connectivity" format="ascii">
 0 1 2 3 4 5 6 7
        </DataArray>
        <DataArray type="Int32" Name="offsets" format="ascii">
 8
        </DataArray>
        <DataArray type="Int32" Name="types" format="ascii">
 12
        </DataArray>
      </Cells>
      <PointData Scalar="stresses">
        <DataArray type="Float32" Name="vm_stress" format="ascii">
 0 1 2 1 0 3 0 0
        </DataArray>
      </PointData>
      <CellData Scalar="material">
        <DataArray type="UInt32" Name="material" format="ascii">
0
</DataArray>
      </CellData>
    </Piece>
  </UnstructuredGrid>
</VTKFile>

Thanks in advance,
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20091124/b55d5d68/attachment.htm>


More information about the ParaView mailing list