[Paraview] vtu file format
Thierry Dubuis
tdubuis at scconsultants.com
Thu Jan 5 12:20:19 EST 2006
Thank you very much Brad for these informations.
I write the write function and it's seems to be Ok.
But the size input is the size after the encoding.
Are you sure of "but the size should be before the encoding"
Thanks again for your support.
Best regards,
Thierry Dubuis
Brad King wrote:
> Thierry Dubuis wrote:
>
>> No, sorry I did't find any information about that.
>> There are information about XML part, binary datas must be encryted
>> with Base64 algorithm and they could be compressed or not,
>> but no information about datas organization.
>
>
> They layout of the binary data chunks is somewhat complicated in order
> to support random access at the same time as base64 encoding and
> compression. The best way to write it is to link VTK into your
> program and either convert to a VTK type directly and use the
> vtkXMLUnstructuredGridWriter or use the C-interface provided by
> vtkXMLWriterC.h.
>
> If you really want to write it yourself then you should use the inline
> binary format with no compression:
>
> <DataArray type="Float32" Name="Scalars" format="binary">
> NNNN........
> </DataArray>
>
> The first four bytes (NNNN) is the number of bytes in the rest of the
> binary block. The rest of the data should be stored contiguously.
> Note that everything including the first four bytes should then be
> base64 encoded but the size should be before the encoding.
>
> The data can be in either endian-ness. Just specify in the VTKData
> element which one is used. Also be sure not to specify a compressor
> in the top element because no compression is used:
>
> <VTKFile type="UnstructuredGrid"
> version="0.1"
> byte_order="LittleEndian">
> ...everything else here...
> </VTKFile>
>
> -Brad
>
>
More information about the ParaView
mailing list