[Paraview] Binary file read

Thomas Svedberg Thomas.Svedberg at me.chalmers.se
Fri Apr 15 06:07:05 EDT 2005


Hello,

Brian Dotson wrote:
> Thomas,
> 
> Are you using the vtkXMLUnstructuredGridWriter class?  There are some pieces of test code in the documentation that will show you how to use the class.  If you have trouble, let me know and I'll find a code snipet.

The problem is I am not using the vtk code at all, I am trying to write 
my own small code snippet to export something for paraview to read.

ascii is no problem (to write/read), but I want to get smaller file and 
hence use compression (and base64 encoding fore readability). Preferably 
I want to have the datablocks inline.

So what are the format of such blocks for encoded only and compressed + 
encoded ? It seems there is supposed to be a small header part followed 
by the data. So far I tried the following, all base64 encoded (and with 
no luck):

- no header, inline
- no header, all data in one array before encoding
- no header, every data encoded separately in the appended array
- header (4 byte int) consisting av data size in bytes together with
   data encoded inline
- header and data encoded sepparately inline

all help would be appriciated.

/Thomas

> 
> Brian
> 
> 
> 
>>>>Thomas Svedberg <Thomas.Svedberg at me.chalmers.se> 4/14/2005 10:57 AM >>>
> 
> Could someone please give me pointers on how to write binary, compressed
> files for reading into Paraview.
> I use unstructured mesh (.vtu xml file)
> So far all my attempts give errors, like "Floating exception", or 
> "Cannot read point data array "v" from PointData in piece 0.  The data 
> array in the element may be too short." or something else.

-- 
.......................................................................
  Thomas Svedberg
  Department of Applied Mechanics
  Chalmers University of Technology

  Address: SE-412 96 Göteborg, SWEDEN
  E-mail : Thomas.Svedberg at me.chalmers.se, thsv at chalmers.se, 
thsv at bigfoot.com
  Phone  : +46 31 772 1522
  Fax    : +46 31 772 3827
.......................................................................




More information about the ParaView mailing list