[Paraview] PlotSelectionOverTime filter in python

Paul DesJardin ped3 at buffalo.edu
Thu Mar 26 16:10:45 EDT 2015


Hi Andy,

Thanks for the quick response.  I tried the following in the python
window with the integrated variables highlighted in the GUI ....

>>> ss = GetActiveSource()
>>> selection = SelectCells(query="id==0")
>>> ec = ExtractSelection(Selection=selection)
>>> ec.UpdatePipeline()
>>> PlotSelectionOverTime(Input=ss,Selection=ec)

and the below output was spit to the the Output Messages indicating
that nothing was selected.  Does the above syntax make sense to you?

Paul




Generic Warning: In
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx,
line 134

Failed to generate state.



Traceback (most recent call last):

File "/Applications/paraview.app/Contents/Python/paraview/smstate.py",
line 170, in get_state

traceitem.finalize()

File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",
line 752, in finalize

trace.append(accessor.trace_ctor(ctor, filter_type))

File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",
line 430, in trace_ctor

ctor_props_trace = self.trace_properties(ctor_props, in_ctor=True)

File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",
line 423, in trace_properties

return joiner.join([x.get_property_trace(in_ctor) for x in props])

File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",
line 533, in get_property_trace

if in_ctor: return "%s=%s" % (varname, self.get_value())

File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",
line 553, in get_value

data = [str(Trace.get_accessor(x)) for x in self.get_object()[:]]

File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",
line 167, in get_accessor

"it. Skipping this action." % repr(obj))

paraview.smtrace.Untraceable:
"<paraview.servermanager.IDSelectionSource object at 0x1263de250> is
not 'known' at this point. Hence, we cannot trace it. Skipping this
action."

Empty state generated.

Generic Warning: In
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx,
line 112

Tracing is active. Cannot save state.



Empty state generated.

ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,
line 810

vtkPVCompositeDataPipeline (0x7ff19b7f6dc0): Input for connection
index 0 on input port index 1 for algorithm
vtkPVExtractArraysOverTime(0x7ff198f30380) is of type
vtkUnstructuredGrid, but a vtkSelection is required.



ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,
line 810

vtkPVCompositeDataPipeline (0x7ff19b7f6dc0): Input for connection
index 0 on input port index 1 for algorithm
vtkPVExtractArraysOverTime(0x7ff198f30380) is of type
vtkUnstructuredGrid, but a vtkSelection is required.



Generic Warning: In
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMPropertyHelper.cxx,
line 641

Call not supported for the current property type.



ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,
line 810

vtkPVCompositeDataPipeline (0x7ff19b7f6dc0): Input for connection
index 0 on input port index 1 for algorithm
vtkPVExtractArraysOverTime(0x7ff198f30380) is of type
vtkUnstructuredGrid, but a vtkSelection is required.



ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,
line 810

vtkPVCompositeDataPipeline (0x7ff1963cedc0): Input for connection
index 0 on input port index 1 for algorithm
vtkPVExtractArraysOverTime(0x7ff198b8e7e0) is of type
vtkUnstructuredGrid, but a vtkSelection is required.



ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,
line 810

vtkPVCompositeDataPipeline (0x7ff1963cedc0): Input for connection
index 0 on input port index 1 for algorithm
vtkPVExtractArraysOverTime(0x7ff198b8e7e0) is of type
vtkUnstructuredGrid, but a vtkSelection is required.



Generic Warning: In
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMPropertyHelper.cxx,
line 641

Call not supported for the current property type.



On Thu, Mar 26, 2015 at 3:49 PM, Andy Bauer <andy.bauer at kitware.com> wrote:
> Hi Paul,
>
> This should get tracked in the Python Trace functionality. I'll add a bug
> report for this. For now you can do it manually with something like:
>>>> w = Wavelet()
>
>>>> selection = SelectCells(query="id==0")
>
>>>> ec = ExtractSelection(Selection=selection)
>
>>>> ec.UpdatePipeline()
>
>
> This should select the first cell of the Wavelet source and extract it. For
> point selection replace SelectCells with SelectPoints. There's probably more
> complex selections for multiblock data sets but talking to you I thought you
> had an unstructured data set. For the query string, you can see how more
> complex queries are created in the Find Data option under the Edit menu.
>
>
> Let me know if this doesn't work for you.
>
>
> Cheers,
>
> Andy
>
>
>
> On Thu, Mar 26, 2015 at 3:28 PM, Paul DesJardin <ped3 at buffalo.edu> wrote:
>>
>> Hi,
>>
>> I'm trying to use the PlotSelectionOverTime command in a python script
>> for use with pvbatch.  When using PlotSelectionOverTime in the GUI,
>> there is a "Copy Active Selection" operation required which I cannot
>> replicate in the python script.  The incremental trace option doesn't
>> appear to provide information since nothing is reported when the the
>> "Copy Active Selection" button is pushed.
>>
>> Any help would be much appreciated.....
>>
>> Thanks!
>>
>> Paul
>
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>



-- 
=========================================
Paul DesJardin, Ph.D.
Professor
University at Buffalo, State University of New York
Buffalo, NY 14260-4400
Tel:  716-645-1467
email:  ped3 at buffalo.edu
web:  cet.eng.buffalo.edu
=========================================


More information about the ParaView mailing list