[Paraview] Binary file read
don fisher
dfisher at as.arizona.edu
Fri Apr 15 23:36:08 EDT 2005
I have not followed this thread, but wanted to offer an example binary
file that is readable by Paraview using the xml format. The major
trick for me was to realize that at the head of each binary segment,
the length of that segment, in integer format, comes first. The
documentation was very clear about the '_' character, but the rest
appeared a bit vague to me. Also, the encoding is "raw" rather than
"binary". Go figure;-)
File with binary section truncated is attached.
don
Mattijs Janssens wrote:
> I did manage to output the old binary format for a 3D mesh + data so if
> you want information on that...
>
> I haven't managed yet to output binary and/or compressed in the new XML
> format. What a b.... to write! (unless you want to link in vtk) Like you
> I did manage the ascii XML. How do you do base64 encoding?
>
> Kind regards,
>
> Mattijs
>
> Thomas Svedberg wrote:
>
>> 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.
>>
>>
>>
>
>
--
-------------------------------------------------------------------
| Don Fisher dfisher at as.arizona.edu |
| Steward Observatory |
| 933 N. Cherry Ave. VOICE: (520)888-7613 |
| University of Arizona |
| Tucson, AZ 85721 |
-------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: template.vts
Type: text/xml
Size: 1355 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/paraview/attachments/20050415/6256ce51/template.bin
More information about the ParaView
mailing list