[Paraview] Programmable filter - Reading a vtkUnstructuredGrid in the Python script

Mathieu Westphal mathieu.westphal at kitware.com
Fri Apr 27 08:51:26 EDT 2018


Dear Gaël

In order to acess vtk*XML*UnstructuredGridReader in the python Script of a
Programmable Filter/Source you need to do the following :

import vtk.vtkIOXML as ext

reader = ext.vtkXMLUnstructuredGridReader()



If you actually need the vtkUnstructuredGridReader in the python Script of
a Programmable Filter/Source you need to do the following :

import vtk.vtkIOLegacy as ext

reader = ext.vtkUnstructuredGridReader()


Best regards,




Mathieu Westphal

On Fri, Apr 27, 2018 at 2:32 PM, Gaël Grail <gael.grail at gmail.com> wrote:

> Dear all,
>
> New to the mailing, and first question for me: hi everyone !
> I'm using the 5.4 binary version of Paraview available online, I'm not
> compiling my own version.
> I'm trying to encapsulate an exe program in a programmable filter ; based
> on the programmable filter inputs and parameters, I run this program in the
> embedded python script ; the program writes a vtkUnstructuredGrid in the
> working folder. Now I want to read this vtk object and give the result as
> output of the programmable filter.
> I have noticed that vtkUnstructuredGridReader is not available in the vtk
> library that is only accessible through the embedded python script.
> Do you know any other way to read a vtkUnstructuredGrid, or any vtkObject,
> in a programmable source/filter, than coding my own reader ?
>
> Many thanks,
> Gaël
>
> _______________________________________________
> 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:
> https://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180427/7c7bda54/attachment.html>


More information about the ParaView mailing list