Modify part of a dataset


I have a (2d) dataset in which I would like to modify part of the data. What I can do is load the data, select the points that I want to modify (e.g. using the Select Points with Polygon option) and then use the ExtractSelection filter and apply a Calculator to the selection. However, I do not know how to put the modified region back into the original data set so that I can export the modified data set. Note that I am looking for a solution which is generic regarding the dataset (can also be unstructured polydata for instance) and the selection is also a generic selection of points in that dataset and does not need to be rectangular. Can I do this using the GUI in ParaView? Can I only do this in python? Can someone help me here?


Simple example: rectangular structured dataset of 4 columns (i) by 3 rows (j) with e.g. id values of:
1 2 3 4
5 6 7 8
9 10 11 12
Say I select i=1…2 with j=0…1 and I would like to set the selected point data to 0: result
1 0 0 4
5 0 0 8
9 10 11 12

Lets see …

  • Sources/ Mandlebrot. Apply.
  • Surface (not sure if you need to do this, but it worked.)
  • Select Cells with Polygon.
  • Extract Selection. Apply.
  • Turn visibility off for Extracted Selection, on for your source.
  • Find Data. Invert Selection. Close Find Data.
  • Extract Selection. Apply.
  • Select both Extract Selections in the pipeline browser. Use the key.
  • Group Datasets.