[Paraview] Paraview Python scripting

David Dupuis david.dupuis at cadensimaging.com
Tue Nov 1 09:28:35 EDT 2011


Hello,



I’m manipulating different dataset and for each of them I have a different
setup (pipeline). I saved the state as a python file and plan to re-use the
python state file to re-open the whole pipeline for each dataset. It seems
that only *.psvm files can be loaded via  “File -> Load state” in Paraview.
Is there a way to load a python state file?



Here is what I tried to do so, but didn’t succeeded.



1- I followed the procedure for Paraview/Python scripting, and added
PYTHONPATH in .bashrc:

export
PYTHONPATH="/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/:/home/david/ParaView-3.12.0-RC2-Linux-x86_64/bin"



* The only thing I can’t do is adding the path to
="/home/david/ParaView-3.12.0-RC2-Linux-x86_64/Utilities/VTKPythonWrapping/site-packages”
since I don’t have any “Utilities” folder in my Paraview directory. I
believe this is required, but don’t know what to install and where to get
it to have it...



2- I tried to load the python state file via python with the setup
described at step 1, but got the following error:



>> python ./sta.py

Traceback (most recent call last):

  File "/home/david/CADv2/Patients/P1/Prone/sta.py", line 2, in <module>

    except: from paraview.simple import *

  File
"/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/paraview/simple.py",
line 39, in <module>

    import servermanager

  File
"/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/paraview/servermanager.py",
line 43, in <module>

    import paraview, re, os, os.path, new, sys, vtk

  File
"/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/paraview/vtk/__init__.py",
line 1, in <module>

    from vtkCommonPython import *

ImportError: No module named vtkCommonPython



I have taken a look and there is no vtkCommonPython module on my machine.
Is it part of the VTKPythonWrapping in Utilities?



Thanks for helping me with this one.

David







[image: L_CadensImaging+rendering_C_gif]



DAVID DUPUIS

Chef de produit | Product manager



116 principale, suite 200

Granby (Qubec), J2G 2V2

CANADA



T: 450.956.3456 I Ext: 5114

F: 450.991.3456

david.dupuis at cadensimaging.com



*Avis :* Ce message est confidentiel et est à l'usage exclusif de son
destinataire.  Il est strictement interdit à toute autre personne de le
diffuser, le distribuer ou le reproduire.  Si le destinataire ne peut être
joint ou vous est inconnu, veuillez informer l'expéditeur par courrier
électronique immédiatement et effacer ce message et en détruire toute
copie. Les communications par Internet sont exposées au risque d'altération
des données,  d'autres erreurs de transmission et  la perte de
confidentialité. Si vous désirez que nous communiquions avec vous par un
autre moyen, veuillez nous en aviser.



*Notice:* This message is confidential and is intended for the exclusive
use of the addressee.  Any other person is strictly prohibited from
disclosing, distributing or reproducing it.  If the addressee cannot be
reached or is unknown to you, please inform the sender by return e-mail
immediately and delete this message and destroy all copies. Internet
communications are subject to the risk of data corruption, other
transmission errors and loss of confidentiality. Please advise if you wish
us to use a different method when communicating with you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111101/31a04968/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 6583 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111101/31a04968/attachment-0001.gif>


More information about the ParaView mailing list