[Paraview] ParaView python vs VTK python api (UNCLASSIFIED)

Andy Bauer andy.bauer at kitware.com
Wed Aug 6 15:53:32 EDT 2014


Hi Simon,

There is more information at
http://www.paraview.org/Wiki/Python_Programmable_Filter. The ParaView
Python API is meant for the client side of ParaView while the VTK Python
API is meant for the server side. You can mix and match a bit by using
Fetch() (see http://www.paraview.org/Wiki/ParaView/Python_Scripting for
more details) where you start on the client with the ParaView Python API
and then "fetch" the output from a filter to the client to be able to do
VTK Python API stuff on VTK objects. For big jobs in parallel though this
fetch operation can overwhelm the client with memory use.

Regards,
Andy


On Wed, Aug 6, 2014 at 3:46 PM, Su, Simon M CTR USARMY ARL (US) <
simon.m.su.ctr at mail.mil> wrote:

> Classification: UNCLASSIFIED
> Caveats: NONE
>
> Hi Andy,
>
> I think the filter option may not be viable as the VTK code is the part
> that
> creates the VTK data structure (points - vtk.vtkPoints(), triangles -
> vtk.vtkCellArray, polydata - vtk.vtkPolydata()) using VTK python api.
>
> This is actually related to the catalyst question I asked. Luckily the
> user's
> code is in python already and Sean Ziegeler mentioned to bypass catalyst
> and
> just call ParaView using PV Python api (and run the simulation code python
> script using pvbath/pvpython). But the user's code is in VTK python and not
> ParaView python which caused some issue here.
>
> In that regards, are there documentation that I can look up on the
> comparable
> Python API between VTK and ParaView?
>
> Thanks
> -simon
>
> -----Original Message-----
> From: Andy Bauer [mailto:andy.bauer at kitware.com]
> Sent: Wednesday, August 06, 2014 3:35 PM
> To: Su, Simon M CTR USARMY ARL (US)
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] ParaView python vs VTK python api (UNCLASSIFIED)
>
> It may not be possible to do what you want explicitly. ParaView can be
> viewed
> in some ways a wrapper around VTK filters. You can try the programmable
> filter
> which uses the VTK Python API but is still intended to operate like a
> filter
> (i.e. not modifying the input data sets, etc.).
>
>
> Andy
>
>
>
> On Wed, Aug 6, 2014 at 3:28 PM, Su, Simon M CTR USARMY ARL (US)
> <simon.m.su.ctr at mail.mil> wrote:
>
>
>         Classification: UNCLASSIFIED
>         Caveats: NONE
>
>         Hello,
>
>         I would like to run some of my VTK python code under ParaView
> (pvbatch or
>         pvpython). Where can I find documentation on porting VTK python
> code to use
>         ParaView python api? I need to create some VTK object in ParaView.
> Is there
>         a shortcut to this (like being able to use VTK python api within
> ParaView
>         Python environment)?  Or am I not making sense / asking the wrong
> question.
>
>         Any help is much appreciated.
>
>         Thanks
>         -simon
>
>         Classification: UNCLASSIFIED
>         Caveats: NONE
>
>
>
>         _______________________________________________
>         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://public.kitware.com/mailman/listinfo/paraview
>
>
>
>
>
> Classification: UNCLASSIFIED
> Caveats: NONE
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140806/47cb75da/attachment-0001.html>


More information about the ParaView mailing list