[vtkusers] vtkXdmfReader

David E DeMarle dave.demarle at kitware.com
Sun Dec 13 08:55:36 EST 2015


The reader will produce different types of data dependent on the file it
reads, so you need to use GetOutputDataObject instead and cast
appropriately.



David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Sun, Dec 13, 2015 at 7:36 AM, Nico Schlömer <nico.schloemer at gmail.com>
wrote:

> Hi everyone,
>
> I've been using the `vtkUnstructuredGridReader` and the
> `vtkXMLUnstructuredGridReader` for a while now to read VTK/VTU meshes, e.g.,
> ```
>         reader = vtk.vtkUnstructuredGridReader()
>         reader.SetFileName(filename)
>         reader.Update()
>         vtk_mesh = reader.GetOutput()
> ```
> and then
> ```
>     points = vtk.util.numpy_support.vtk_to_numpy(
>             vtk_mesh.GetPoints().GetData()
>             )
> ```
> etc. From the documentation, it seemed easy enough to phase in the
> `vtkXdmfReader`. However,
> ```
> AttributeError: 'vtkIOXdmf2Python.vtkXdmfReader' object has no attribute
> 'GetOutput'
> ```
> Any hints on how to use the `vtkXdmfReader`?
>
> Cheers,
> Nico
>
> [1] http://www.vtk.org/doc/nightly/html/classvtkXdmfReader.html
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151213/4faa74e4/attachment.html>


More information about the vtkusers mailing list