[vtkusers] raw uncompressed binary data in VTK XML file

Server Levent Yilmaz leventyilmaz at gmail.com
Sat Mar 8 22:23:54 EST 2008


On Sat, Mar 8, 2008 at 9:36 PM, Server Levent Yilmaz <leventyilmaz at gmail.com>
wrote:

> Hi,
>
> I'd like to output some simulation data in a vti file without using any
> VTKwriter sinks (I won't be linking to VTK libraries).
>
> Reading VTK file formats chapter in the user's guide, it *seems* that is
> it possible to have raw (not encoded) and uncompressed appended data in VTK
> file (I understand that it might violate XML specs but, I hope VTK readers
> would be able to handle that anyway). But it is not specified what
> attributes should be used for <VTKFile> and <AppendedData>. VTK examples are
> of no help since they all contain compressed, base64 encoded data.
>
> What are the correct attributes for having raw, uncompressed binary data
> in a VTI file?


Excuse my double post but, FWIW, I'd like to add an example file which gives
errors in Paraview.

The image file is:

<VTKFile type="ImageData" byte_order="LittleEndian">
   <ImageData WholeExtent="0 3 0 2 0 2" Origin="0 0 0" Spacing="1 1 1">
      <Piece Extent="0 3 0 2 0 2">
          <PointData Scalars="foo">
             <DataArray type="Float32" Name="foo" NumberOfComponents="1"
format="appended" offset="0"/>
          </PointData>
      </Piece>
   </ImageData>
   <AppendedData encoding="raw"> _[exactly 144(=4*3*3*4) bytes of float
data]
   </AppendedData>
<VTKFile>

When this is read in Paraview  the following error is generated:

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "Zik" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "Zik" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "Zik" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "Zik" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "Zik" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "Zik" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "Zik" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "foo" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "foo" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "foo" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "foo" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "foo" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "foo" from
PointData in piece 0. The data array in the element may be too short.

ERROR: In
C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLStructuredDataReader.cxx, line
314

vtkXMLImageDataReader (05F32678): Error reading extent 0 3 0 2 0 2 from
piece 0

ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkXMLDataReader.cxx, line
497

vtkXMLImageDataReader (05F32678): Cannot read point data array "foo" from
PointData in piece 0. The data array in the element may be too short.



>
> thanks,
> Levent
>
> --
> Server Levent Yilmaz
> Mechanical Engineering
> University of Pittsburgh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080308/b6281978/attachment.htm>


More information about the vtkusers mailing list