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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to