[Paraview] Filtering Data Set by Second Data Set
Moritz.Huck at isea.rwth-aachen.de
Moritz.Huck at isea.rwth-aachen.de
Fri May 25 10:42:31 EDT 2018
Hi,
I tried this. But the created object only contains the A data not the B data.
I have created the data set by "Group Datasets" since A and B come from different files.
(I am using Paraview 5.4.1 if there are differences)
Best Regards,
Moritz
Von: Favre Jean [mailto:jfavre at cscs.ch]
Gesendet: Freitag, 25. Mai 2018 16:00
An: Huck, Moritz; paraview at public.kitware.com
Betreff: RE: Filtering Data Set by Second Data Set
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/96bc49a3/attachment.html>
More information about the ParaView
mailing list