[Paraview] Customize filter toolbar

Zenker, Dr. Matthias Matthias.Zenker at erbe-med.com
Tue Mar 27 07:45:04 EDT 2012


Hi David,

thank you for your answer.
The procedure you proposed did not work for me - clicking on the eye has no effect. What does work is the following:

1. Create selection manually
2. Play trace
3. Click on "Apply"
4. Open a new view
5. Check "Display"-> "Visible"

However, selecting the PlotSelectionOverTime filter from the menu and clicking "Apply" makes the plot appear in two steps. I was thinking that a PlotSelectionOverTime button could save me two clicks, as I often have to process many datasets in a row.  But it seems that the two clicks saved here have to be done elsewhere for making the plot appear...

I should perhaps think about learning how to program a  macro in order to automate the whole thing - the procedure I do all  the time is:

1. Open the dataset
2. Change the displayed variable, edit the color map
3. Select a point (always the same)
4. Plot selection over time
5. Save data in a csv file

Steps 2 and 3 are optional - I think steps 1,4,5 must be easy to do automatically if I know how... ;)
Is there a good starting point, a tutorial or something for macro programming apart from the ParaView Manual?

Thank you for your help,

Matthias

-----Ursprüngliche Nachricht-----
Von: David E DeMarle [mailto:dave.demarle at kitware.com]
Gesendet: Dienstag, 27. März 2012 12:35
An: Zenker, Dr. Matthias
Cc: paraview at paraview.org
Betreff: Re: [Paraview] Customize filter toolbar

I missed that you were using a selection related filter.

You could record the action of making the selection too in that case.
But that is problematic because you don't have as much control over what to plot.

Otherwise, for when you make the selection manually and then apply the macro you've already got, it seems that ParaView isn't creating the plot view for you like it normally does for some reason. To work around, open up a line chart view and then replay your trace. Select the plot view and then click the eye icon in the pipeline browser next to the plot filter to show the result.

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



On Mon, Mar 26, 2012 at 10:34 AM, Zenker, Dr. Matthias <Matthias.Zenker at erbe-med.com> wrote:
> Hi David,
>
> thank you for the hints. Unfortunately it doesn't work for me that
> way. The macro I get is
>
> ---------------------------------
> try: paraview.simple
> except: from paraview.simple import *
> paraview.simple._DisableFirstRenderCameraReset()
>
> my_file_pvd = GetActiveSource()
> PlotSelectionOverTime8 = PlotSelectionOverTime()
>
> Render()
> ----------------------------
>
> I must admit that I don't know Python at all. It's not the same
> language as in "Life of Brian"...  ;-)) I have had a look in the ParaView Manual which did not enlighten me for this specific problem.
> When I execute the macro above, ParaView creates a Plot SelectionOverTime object, but when I hit "Apply", nothing happens. Also it seems to me that the Macro expects a specific name for the dataset. How can I generalize it, once it works?
>
> Thanks for some more hints...
>
> Matthias
>
>
> -----Ursprüngliche Nachricht-----
> Von: David E DeMarle [mailto:dave.demarle at kitware.com]
> Gesendet: Montag, 26. März 2012 16:00
> An: Zenker, Dr. Matthias
> Cc: paraview at paraview.org
> Betreff: Re: [Paraview] Customize filter toolbar
>
> You can record a trace in which you just apply that filter, and then save the trace as a macro.  It won't be in the common filters toolbar, but it will be in the macros toolbar which is by default right next to it.
>
> If you are building from source you can add the filter to the Common group in Applications/ParaView/ParaViewFilters.xml.
>
> You could also write a plugin that does it.
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
>
> On Mon, Mar 26, 2012 at 9:27 AM, Zenker, Dr. Matthias <Matthias.Zenker at erbe-med.com> wrote:
>> Hi,
>>
>> is there an easy way to customize the filter toolbar? For example,
>> the "Plot selection over time" I filter is the one I use all the
>> time. I would like to have a button on the toolbar, like there are
>> buttons for the calculator, contour plot, clip, ...
>>
>> How do I do it?
>>
>> Thanks,
>>
>> Matthias
>>
>>
>>
>> _____________________________________________________________________
>> ERBE Elektromedizin GmbH
>> Firmensitz: 72072 Tuebingen
>> Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
>> Registergericht: Stuttgart HRB 380137
>>
>>
>> _______________________________________________
>> 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
>>
>
>
> _____________________________________________________________________
> ERBE Elektromedizin GmbH
> Firmensitz: 72072 Tuebingen
> Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
> Registergericht: Stuttgart HRB 380137
>


_____________________________________________________________________
ERBE Elektromedizin GmbH
Firmensitz: 72072 Tuebingen
Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
Registergericht: Stuttgart HRB 380137



More information about the ParaView mailing list