[Paraview] Paraview binary format

David Doria daviddoria at gmail.com
Fri Aug 17 09:02:10 EDT 2012


On Fri, Aug 17, 2012 at 7:21 AM, Kharche, Sanjay
<Sanjay.Kharche at liverpool.ac.uk> wrote:
>
> Dear All
>
> I am new to ParaView. I need to write binary files from my C code for viz
> with ParaView. So far, I assign values to a M x N 2D array, and write legacy
> VTK files - that works fine. I used code as pasted below to see if I can get
> the binary output (which uses a simple fwrite) working, but was unable to
> viz the data in the binary output. Can someone suggest how to write ParaView
> raw binary files (hopefully with minimal headers), and how to viz them
> interactively using the GUI.
>
> thanks
> Sanjay

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.

David


More information about the ParaView mailing list