[Paraview] Fetching data from xdmf temporal collection
Jean-Michel
jm.lucas at gantha.com
Thu Mar 26 12:14:17 EDT 2015
Hi Armin,
thanks a lot for your script, it's everything I needed to be able to read my data.
Jean-Michel
-----Message d'origine-----
De : Armin Wehrfritz [mailto:dkxls23 at gmail.com]
Envoyé : jeudi 26 mars 2015 14:33
À : Jean-Michel
Cc : paraview at paraview.org
Objet : Re: [Paraview] Fetching data from xdmf temporal collection
Hi Jean-Michel,
just to mention, I don't think VTK is significantly more efficient than ParaView. In practice you shouldn't feel a difference, since all the heavy data handling is anyways done by VTK.
Anyway, I attached a script that shows you how to read XDMF data, step through the time steps, wrap the data for numpy and print out some basic infos.
Regarding the GetOutput() method, to get data object from the XDMF reader you have to use the GetOutputDataObject(0) method.
But I don't know the difference between the two of them, and this also may depends on your VTK version, I'm using 6.2.
-Armin
On 03/23/2015 03:15 PM, Jean-Michel wrote:
> Armin,
>
> you said you would rather use vtk directly to access raw data in xdmf
> files. I tried to follow your advice, but I struggle with the
> vtkXdmfReader. Basically, here is what I do:
>
> import vtk
>
> reader = vtk.vtkXdmfReader()
>
> reader.SetFileName(myfile)
>
> reader.ReadAllScalarsOn()
>
> reader.Update()
>
> However, I don't know how to access the data inside reader once this
> is done. The GetOutput() method doesn't seem to work. Do you know what
> I am missing here ? If not, I'll try and move the discussion over at
> the vtk-users list.
>
> Thank you for your help.
>
> Jean-Michel
>
>
>
> ------------------------------------------------------------------------
> Avast logo <http://www.avast.com/>
>
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> www.avast.com <http://www.avast.com/>
>
>
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
http://www.avast.com
More information about the ParaView
mailing list