[Paraview] Paraview binary format

Hal Canary hal at cs.unc.edu
Fri Aug 17 12:16:51 EDT 2012


The legacy VTK formats are agnostic with respect to endinaness, which is 
one reason why I almost never use the binary versions of them.

If you can't link to VTK and use vtkXMLImageDataWriter, as David 
suggested, then another option is to write a small C++ or Python program 
to convert from legacy ASCII to XML binary.  For example:
   http://www.paraview.org/Wiki/Convert_a_File_from_LegacyVTK_to_VTI


On 08/17/2012 10:45 AM, Kharche, Sanjay wrote:
 >
> Thanks for the suggestion. However, I cannot incorporate any
> dependencies into my code. Since posting my message, I have
> discovered that I can put a text header (similar to VTK ASCII) and
> then the data in binary into the output files. The problem (if there
> a problem!) has now evolved to getting the binary fwrite to be big
> endian - or is there another way?
>
>
> On 17 August 2012 14:02, David Doria wrote:
 >
> > Why don't you construct VTK objects and use a VTK writer to write
> > the file?
> >
> > Something like this:
> > http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/XMLStructuredGridWriter
> >
> >  It seems like you are reinventing the wheel a little bit by
> > actually formatting the file to VTK file format specifications
> > manually.



More information about the ParaView mailing list