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

Su, Simon M CTR USARMY ARL (US) simon.m.su.ctr at mail.mil
Wed Aug 6 16:02:07 EDT 2014


Classification: UNCLASSIFIED
Caveats: NONE

Dave,

Thank you for the explanation. I have a better understand now on ParaView 
python and VTK python.

Thanks
-simon

-----Original Message-----
From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of David E 
DeMarle
Sent: Wednesday, August 06, 2014 3:51 PM
To: Sebastien Jourdain
Cc: paraview at paraview.org
Subject: Re: [Paraview] ParaView python vs VTK python api (UNCLASSIFIED)

Adding to what Andy and Seb said,

"ParaView can be viewed in some ways a wrapper around VTK filters" + that 
often exist on remote MPI parallel processes + "."


In Paraview client side scripts (tools->Python Shell or pvpython or pvbatch) 
you create python objects that create proxies that create remote vtk objects 
somewhere. Which is why it is not typically safe to mix vtk and paraview 
python code and do things like modifying the input data sets. See python trace 
and the paraview python wiki page to learn about this level of scripting.

Within the python programmable filter and source, you are running inside those 
remote processes. Here the API is pretty much standard python wrapped VTK. See 
the wiki page about python programmable filters for starters and standard vtk 
documentation to learn details about this secondary level of scripting.


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

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


On Wed, Aug 6, 2014 at 3:45 PM, Sebastien Jourdain 
<sebastien.jourdain at kitware.com> wrote:


	Hi Simon,

	if the VTK work that you are targeting is not parallel, you can directly run 
a vtkpython script inside pvpython or pvbatch.
	Otherwise Andy is right, you can not mix parallel ParaView and VTK python 
code.

	Seb


	On Wed, Aug 6, 2014 at 1:35 PM, Andy Bauer <andy.bauer at kitware.com> wrote:


		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





		_______________________________________________
		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





	_______________________________________________
	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 --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5633 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140806/370a72a6/attachment.bin>


More information about the ParaView mailing list