# Vtk threshold not passing cell and point data

**URL:** https://discourse.vtk.org/t/vtk-threshold-not-passing-cell-and-point-data/3188
**Category:** Support
**Created:** [May 1, 2020, 6:25pm UTC](https://discourse.vtk.org/t/vtk-threshold-not-passing-cell-and-point-data/3188 "2020-05-01T18:25:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![a-jp1](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a-jp1/32/1710_2.png) [@a-jp1](https://discourse.vtk.org/u/a-jp1)
#### Post date: [May 1, 2020, 6:25pm UTC](https://discourse.vtk.org/t/vtk-threshold-not-passing-cell-and-point-data/3188/1 "2020-05-01T18:25:17Z")

</div>

Hi,  
I’m sure I’ve done this before in c++ with vtk. Have a vtkunstructuredgrid that I threshold on a cell based int array. There is other cell and point data on the mesh but it’s not being passed. If I do the same opt in paraview they are all passed.  
Can someone remind me what the option is to get all my cell and point data passed that are on the prethreshold mesh to the output of the threshold for the cells and points that remain after threshold? Using vtk 8.2 and paraview 5.8.  
Thanks  
Andy

---

<div class="post-metadata">

### Author: ![normanius](https://discourse.vtk.org/user_avatar/discourse.vtk.org/normanius/32/611_2.png) [@normanius](https://discourse.vtk.org/u/normanius)
#### Post date: [May 5, 2020, 9:40pm UTC](https://discourse.vtk.org/t/vtk-threshold-not-passing-cell-and-point-data/3188/2 "2020-05-05T21:40:01Z")

</div>

Can you provide some sample code that illustrates your problem?

Maybe it helps to activate the array based on which you threshold.

```auto
sourcePoly->GetCellData()->SetActiveScalars("nameOfArray")

```

In case you have multiple components in the active data array, you may have to use [`SetSelectedComponent()`](https://vtk.org/doc/nightly/html/classvtkThreshold.html).
