[Paraview] Filtering Data Set by Second Data Set

Favre Jean jfavre at cscs.ch
Fri May 25 09:59:58 EDT 2018


The Find Data filter (under the Edit menu) will do exactly this

suppose you have a dataset with two fields called "A" and "B"

Use Find Data
Create a Selection

Find Cells from "<name of your grid in the pipeline browser>"
Select   "A"    is >= x   # (replace "x" by the numeric value

click on "Run Selection Query"
click on Extract Selection and a new object is created in the pipeline.
-----------------------------------------------------------------------------------------------------------

Should you want to do this programmatically (using python), it is a far less obvious to figure out the right syntax, because the calls are not being traced. :-(

Here is the code I would use:

selection=SelectCells()
selection.QueryString="scalar2 >= x"  # (replace "x" by the numeric value
selection.FieldType = 'CELL'
selection.UpdatePipelineInformation()

# create a new 'Extract Selection'
# assuming your input object is called "grid"

mySelection = ExtractSelection(Input=grid, Selection=selection)
mySelection.UpdatePipeline()
Show(mySelection)

HTH
-----------------
Jean/CSCS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180525/5962e4d5/attachment.html>


More information about the ParaView mailing list