# identify cells on original filter from filter applied to

**URL:** https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272
**Category:** ParaView Support
**Created:** [October 30, 2025, 7:27am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272 "2025-10-30T07:27:44Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [October 30, 2025, 7:27am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/1 "2025-10-30T07:27:44Z")

</div>

Hello,

I have the following situation:

1. I import a surface mesh
2. I smooth it out
3. I generate curvature on the smoothed surface
4. I extract with threshold some cells (faces)

Now i would like to identiy the extracted cells in 4 but on the original surface mesh imported.

how can I do this kind of manipulation? i see that each time i apply a filter the ID is recreated, i imagine that beween the original surface mesh and the smoothed one as the number of elements did not change the ID would be the same, but after the threshold there will be less cells, i imagine that there exists a solution to select the original ones from the output of the threshold itself.

is this possible?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 30, 2025, 8:37am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/2 "2025-10-30T08:37:43Z")

</div>

IIUC the number of cells does not change here ? Then selection link should “just work”.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [October 30, 2025, 8:39am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/3 "2025-10-30T08:39:30Z")

</div>

in the last step it does, as i am using threshold to get only a part of it. i have found the generateIDs filter that I think will help me do what I wanted (keep the original ID thought the complete pipeline).

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 30, 2025, 8:42am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/4 "2025-10-30T08:42:18Z")

</div>

Indeed, that would help, but then you need to “project back” the original ids, which requires clever use of programmable filter I believe.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [October 30, 2025, 8:47am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/5 "2025-10-30T08:47:20Z")

</div>

well, what I want to do is in the original surface mesh, generate a flag field that will indicate the cells that were ‘selected’ during the thershold with a 1 and the others with a 0.  
how could I do this? i need to pass thought a programmable filter, no? is there any easier way?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 30, 2025, 8:47am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/6 "2025-10-30T08:47:58Z")

</div>

I dont see an easy way, no.

---

<div class="post-metadata">

### Author: ![reox](https://discourse.paraview.org/user_avatar/discourse.paraview.org/reox/32/16237_2.png) [@reox](https://discourse.paraview.org/u/reox)
#### Post date: [April 15, 2026, 11:21am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/7 "2026-04-15T11:21:20Z")

</div>

Perhaps it does not directly help with the problem, as there is also smoothing involved, but I had a similar issue where I needed to know a certain mesh cell ID after I applied a thresholding filter.  
I used a programmable filter before the threshold to add a “original Cell ID”:

```auto
import numpy as np
output.CellData.append(np.arange(inputs[0].GetNumberOfCells()), "OrigCellID")

```

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [May 11, 2026, 5:41am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/8 "2026-05-11T05:41:32Z")

</div>

Hello,  
what i finally did that did not required extra steps (at least steps that are expensive or repeating data). was to use the find data, that can be used with python with the extract selection.  
so, basically:

1. i identify the IDs that i want to recover on the original data (on the root before doing anything i apply the global id filter to have a constant ID)
2. set as active filter the one where i want to identify the specific cells
3. select the respective cells or points using find data using:  
`QuerySelect(QueryString=f'(in1d({fieldName}, {listOfValues}))', FieldType=FieldType, InsideOut=False)`
4. use extract selection filter.

this is an easy workaround without too much extra steps.

---

<div class="post-metadata">

### Author: ![reox](https://discourse.paraview.org/user_avatar/discourse.paraview.org/reox/32/16237_2.png) [@reox](https://discourse.paraview.org/u/reox)
#### Post date: [May 11, 2026, 5:45am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/9 "2026-05-11T05:45:56Z")

</div>

> [@otaolafr](#):
>
> apply the global id filter

oh well, this is exactly what I produced with the programmable filter - I did not know that a builtin method exists! Thanks!

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [May 11, 2026, 5:57am UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/10 "2026-05-11T05:57:35Z")

</div>

yeah, the issue i was having with programmable filter was that i had the list of ids, a list of values as a python object, and outside of hardcoding the values list on the programable filter i was not sure how to do this cleanly. and this was creating a lot of extra data as i was creating a new filter that was copying all the data, getting the specific values then selecting only that, etc. I am pretty lost in regards to programmable filter, pretty sure that it is possible to do it in a ‘clean’ way but did not find it.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [May 11, 2026, 12:14pm UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/11 "2026-05-11T12:14:32Z")

</div>

hey @mwestphal , sorry for the tag, but I just upgraded to 6.1 and the querySelect fails as (I dont know why) the format changed from `in1d` to `isin` is this normal? i could not find anything about this in the release notes of 6.1

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 11, 2026, 12:15pm UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/12 "2026-05-11T12:15:14Z")

</div>

I’m not following, could you provide steps to reproduce ?

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [May 11, 2026, 12:20pm UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/13 "2026-05-11T12:20:12Z")

</div>

for the 6.1 the python command changed:

```auto
paraview.simple._DisableFirstRenderCameraReset()
sphere1 = Sphere(registrationName='Sphere1')
renderView1 = GetActiveViewOrCreate('RenderView')
#######line that changed
QuerySelect(QueryString='(isin(id, [1,2]))', FieldType='POINT', InsideOut=0)
#########
extractSelection1 = ExtractSelection(registrationName='ExtractSelection1', Input=sphere1)
renderView1.Update()

```

when previously (6.0.1) for getting to run correctly one should use:

```auto
QuerySelect(QueryString='(is1d(id, [1,2]))', FieldType='POINT', InsideOut=0)

```

and the issue is that none is compatible with the other version.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 11, 2026, 12:24pm UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/14 "2026-05-11T12:24:43Z")

</div>

I’m afraid that doesnt ring a bell, this looks like a regression or a behavior change that should have been at least documented. Please open an issue.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [May 11, 2026, 12:36pm UTC](https://discourse.paraview.org/t/identify-cells-on-original-filter-from-filter-applied-to/17272/15 "2026-05-11T12:36:32Z")

</div>

created: [https://gitlab.kitware.com/paraview/paraview/-/work\_items/23277](https://gitlab.kitware.com/paraview/paraview/-/work_items/23277)
