[Paraview] Import Raw (binary) Files as Cell Data

Thomas Oliveira thomas.oliveira at gmail.com
Wed Aug 31 06:58:21 EDT 2016


Dear Jean,

Thank you for your reply. The solution you suggested involving XDMF has
worked. I just needed to change NumberType, Precision and Endian attributes
to match to my data.

Best regards,
Thomas

On Mon, Aug 22, 2016 at 9:22 AM, Favre Jean <jfavre at cscs.ch> wrote:

> I personally favor the use of XDMF to import raw binary data. This gives
> the flexibility to import cell-data and/or node-data
>
> the XDMF code most likely to work for your example is the following:
>
> Given your binary data stored in file "rawdata.bin", double-length
> floating point, with 4x4x5 cells, i.e. a grid of 5x5x6 vertices...
>
> <?xml version="1.0" ?>
> <!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
> <Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
>   <Domain>
>     <Grid Name="3DMesh" GridType="Uniform">
>       <Topology TopologyType="3DCORECTMESH" Dimensions="6 5 5"/>
>       <Geometry GeometryType="ORIGIN_DXDYDZ">
>          <DataItem Name="Origin" NumberType="Float" Dimensions="3"
> Format="XML">0. 0. 0.</DataItem>
>          <DataItem Name="Spacing" NumberType="Float" Dimensions="3"
> Format="XML">1. 1. 1.</DataItem>
>       </Geometry>
>       <Attribute Name="Temperature" Active="1" AttributeType="Scalar"
> Center="Cell">
>           <DataItem Dimensions="5 4 4" NumberType="Float" Precision="8"
> Format="Binary">rawdata.bin</DataItem>
>       </Attribute>
>     </Grid>
>   </Domain>
> </Xdmf>
>
> -----------------
> Jean
> CSCS
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160831/fba91221/attachment.html>


More information about the ParaView mailing list