[Paraview] Python scripting of selection / labels on contours

Deij, Menno M.Deij at marin.nl
Tue Feb 28 05:38:42 EST 2012


Anyone have any ideas on making selections from Python script in ParaView? Or how to put labels with values on contours? 

Thanks and best wishes,


Menno Deij



-----Original Message-----
From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of Deij, Menno
Sent: Friday, February 17, 2012 1:35 PM
To: paraview at paraview.org
Subject: [Paraview] Python scripting of selection / labels on contours

Dear all,

What I'm trying to achieve is to get labels on contourlines from a python script (that is, non-interactively). To get started, I followed the following advice given on the list on Sep 13, 2010:

"Try doing a slice through all the contour lines, and then selecting the points on the slice that you want to label. Then turn on the selection inspector and show point labels with the variable you want to plot. I've found the number of trailing zeros is a bit annoying, as there's no control over the number format, and I normally choose integer values for the contours. The selection labels aren't persistent so a state file will lose these labels, and you'll have to reselect them if you need another plot."

This works very well in interactive mode when the user makes the selection using the selection tool.

Now, what I want to achieve is to do this from a Python script. I have not been able to reproduce the result if I follow or interpret the output from Python trace when I perform the actions described.

So: if you have any ideas on 1) to achieve selections from python script and/or 2) to create labels on contourlines from python script, I'd be very much obliged.

All the best,


Menno


dr. ir. Menno A. Deij
Software Engineer
Maritime Simulation Group
E mailto:M.Deij at marin.nl
T +31 317 49 35 06

MARIN
2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
T +31 317 49 39 11, F , I www.marin.nl

_______________________________________________
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://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list