[Paraview] Fetching data from xdmf temporal collection
Armin Wehrfritz
dkxls23 at gmail.com
Thu Mar 26 09:33:07 EDT 2015
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/>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readXDMF.py
Type: text/x-python
Size: 1575 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150326/6f27ceb1/attachment.py>
More information about the ParaView
mailing list