[vtkusers] vtkXMLReader and vtkXMLWriter data headers

Edern Haumont edern.haumont at kitware.com
Mon Jun 25 09:20:35 EDT 2018


Hello,

I am writing a python application which requires to send a stored
compressed vtkImageData by block to a client.
I read on this <https://www.vtk.org/Wiki/VTK_XML_Formats> (
https://www.vtk.org/Wiki/VTK_XML_Formats) link (and by looking at the
vtkXMLWriter source) that the actual data array is preceded by some header.
Either :
- [#bytes]*[DATA] *if the data is not compressed
- [#blocks][#u-size][#p-size][#c-size-1][#c-size-2]...[#c-size-#blocks]*[DATA]
*if it is compressed.

My problem : I did not succeed in manually reading those values, either in
the uncompressed (binary or ascii) or compressed case. Does anyone have any
pointer or example on how to do that ? I could not find a lot of
documentation on the subject.

Also side question : I am not sure the ZLib compressor uses a full flush.
If that is not the case, it seems impossible to read only one random data
block. Am I right ?

Thanks a lot.
Bests.

-- 
Edern Haumont
*edern.haumont at kitware.com* <edern.haumont at kitware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180625/372e138e/attachment.html>


More information about the vtkusers mailing list