[Paraview] Distortion when loading time varying vector field from raw binary files using xdmf reader
Tobias Benz
benzt at in.tum.de
Sat Nov 24 05:16:13 EST 2012
Hi again!
Maybe it matters, maybe it doesn't. This is how I am writing those raw
files using Matlab:
% in loop over all frames i = 1:294
f_uv = [filename '_' sprintf('%04d', i-1) '.raw'];
fid_uv = fopen(fullfile(outdir,f_uv), 'w');
fwrite(fid_uv, uv, 'float'); % uv is 256 by 256 by 2 matrix
fclose(fid_uv);
When I do a quiver plot of a frame in Matlab everything seems normal.
I am also very willing to consider other options for getting this time
series from Matlab into ParaView.
Thanks in advance!
Tobias
On 11/23/2012 05:55 PM, Tobias Benz wrote:
> Hi,
>
> I have a time-varying 2D vector field (2D velocities) of the size 256
> by 256 pixels sampled at 294 points in time. Each frame is stored in a
> raw binary file ('uv_0000.raw' to 'uv_0293.raw'). I am using
> 'timeseries.xdmf' [1] to load this data into ParaView.
>
> Unfortunately, in ParaView 3.98.0 on both Linux64 [2] and Windows64
> [3], the vector field is displayed heavily distorted.
>
> Am I doing something wrong or is this a bug?
>
> Any advice would be greatly appreciated!
>
> Tobias
>
>
> [1] Excerpt from 'timeseries.xdmf', full file to be found here:
> http://www.pastebin.ca/2254602
>
> <?xml version="1.0" ?>
> <!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
> <Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
> <Domain Name="My Domain">
> <Grid Name="My Collection" GridType="Collection"
> CollectionType="Temporal">
> <Grid Name="My Uniform Grid" GridType="Uniform">
> <Topology Name="Main Topology" TopologyType="2DCoRectMesh"
> Dimensions="255 255"/>
> <Geometry Name="Main Geometry" GeometryType="ORIGIN_DXDY">
> <DataItem Dimensions="2" NumberType="Float" Precision="4" Format="XML">
> 0 0
> </DataItem>
> <DataItem Dimensions="2" NumberType="Float" Precision="4" Format="XML">
> 1 1
> </DataItem>
> </Geometry>
> <Time Value="0000" />
> <Attribute Name="uv" AttributeType="Vector" Center="Node">
> <DataItem Dimensions="255 255 2" NumberType="Float" Precision="4"
> Format="Binary">uv_0000.raw</DataItem>
> </Attribute>
> </Grid>
> <Grid Name="Structured Grid" GridType="Uniform">
> <Topology Reference="//Topology[@Name='Main Topology']" /><Geometry
> Reference="//Geometry[@Name='Main Geometry']" />
> <Time Value="0001" />
> <Attribute Name="uv" AttributeType="Vector" Center="Node">
> <DataItem Dimensions="255 255 2" NumberType="Float" Precision="4"
> Format="Binary">uv_0001.raw</DataItem>
> </Attribute>
> </Grid>
>
> <!--- Left out time steps 0002 to 0292 -->
>
> <Grid Name="Structured Grid" GridType="Uniform">
> <Topology Reference="//Topology[@Name='Main Topology']" /><Geometry
> Reference="//Geometry[@Name='Main Geometry']" />
> <Time Value="0293" />
> <Attribute Name="uv" AttributeType="Vector" Center="Node">
> <DataItem Dimensions="255 255 2" NumberType="Float" Precision="4"
> Format="Binary">uv_0293.raw</DataItem>
> </Attribute>
> </Grid>
>
> </Grid>
> </Domain>
> </Xdmf>
>
> [2] http://i.imgur.com/eydFz.png
> [3] http://i.imgur.com/MOJNX.png <http://i.imgur.com/MOJNX.png?1>
>
>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20121124/689abc14/attachment.htm>
More information about the ParaView
mailing list