<div dir="ltr"><div><div>Hi Simon,<br><br></div>There is more information at <a href="http://www.paraview.org/Wiki/Python_Programmable_Filter">http://www.paraview.org/Wiki/Python_Programmable_Filter</a>. 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 <a href="http://www.paraview.org/Wiki/ParaView/Python_Scripting">http://www.paraview.org/Wiki/ParaView/Python_Scripting</a> 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.<br>
<br></div>Regards,<br>Andy<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 3:46 PM, Su, Simon M CTR USARMY ARL (US) <span dir="ltr"><<a href="mailto:simon.m.su.ctr@mail.mil" target="_blank">simon.m.su.ctr@mail.mil</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Classification: UNCLASSIFIED<br>
Caveats: NONE<br>
<br>
Hi Andy,<br>
<br>
I think the filter option may not be viable as the VTK code is the part that<br>
creates the VTK data structure (points - vtk.vtkPoints(), triangles -<br>
vtk.vtkCellArray, polydata - vtk.vtkPolydata()) using VTK python api.<br>
<br>
This is actually related to the catalyst question I asked. Luckily the user's<br>
code is in python already and Sean Ziegeler mentioned to bypass catalyst and<br>
just call ParaView using PV Python api (and run the simulation code python<br>
script using pvbath/pvpython). But the user's code is in VTK python and not<br>
ParaView python which caused some issue here.<br>
<br>
In that regards, are there documentation that I can look up on the comparable<br>
Python API between VTK and ParaView?<br>
<br>
Thanks<br>
-simon<br>
<div><div class="h5"><br>
-----Original Message-----<br>
From: Andy Bauer [mailto:<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>]<br>
Sent: Wednesday, August 06, 2014 3:35 PM<br>
To: Su, Simon M CTR USARMY ARL (US)<br>
Cc: <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
Subject: Re: [Paraview] ParaView python vs VTK python api (UNCLASSIFIED)<br>
<br>
It may not be possible to do what you want explicitly. ParaView can be viewed<br>
in some ways a wrapper around VTK filters. You can try the programmable filter<br>
which uses the VTK Python API but is still intended to operate like a filter<br>
(i.e. not modifying the input data sets, etc.).<br>
<br>
<br>
Andy<br>
<br>
<br>
<br>
On Wed, Aug 6, 2014 at 3:28 PM, Su, Simon M CTR USARMY ARL (US)<br>
<<a href="mailto:simon.m.su.ctr@mail.mil">simon.m.su.ctr@mail.mil</a>> wrote:<br>
<br>
<br>
        Classification: UNCLASSIFIED<br>
        Caveats: NONE<br>
<br>
        Hello,<br>
<br>
        I would like to run some of my VTK python code under ParaView (pvbatch or<br>
        pvpython). Where can I find documentation on porting VTK python code to use<br>
        ParaView python api? I need to create some VTK object in ParaView. Is there<br>
        a shortcut to this (like being able to use VTK python api within ParaView<br>
        Python environment)?  Or am I not making sense / asking the wrong question.<br>
<br>
        Any help is much appreciated.<br>
<br>
        Thanks<br>
        -simon<br>
<br>
        Classification: UNCLASSIFIED<br>
        Caveats: NONE<br>
<br>
<br>
<br>
        _______________________________________________<br>
        Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
        Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
        Please keep messages on-topic and check the ParaView Wiki at:<br>
<a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
        Follow this link to subscribe/unsubscribe:<br>
        <a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br>
<br>
<br>
<br>
<br>
</div></div>Classification: UNCLASSIFIED<br>
Caveats: NONE<br>
<br>
<br>
</blockquote></div><br></div>