# Mark points inside a closed surface with a scalar value

**URL:** https://discourse.vtk.org/t/mark-points-inside-a-closed-surface-with-a-scalar-value/1105
**Category:** Support
**Created:** [June 9, 2019, 3:06pm UTC](https://discourse.vtk.org/t/mark-points-inside-a-closed-surface-with-a-scalar-value/1105 "2019-06-09T15:06:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![carpemonf](https://discourse.vtk.org/user_avatar/discourse.vtk.org/carpemonf/32/512_2.png) [@carpemonf](https://discourse.vtk.org/u/carpemonf)
#### Post date: [June 9, 2019, 3:06pm UTC](https://discourse.vtk.org/t/mark-points-inside-a-closed-surface-with-a-scalar-value/1105/1 "2019-06-09T15:06:17Z")

</div>

Hi all,

I want to assign a specific value for the cells enclosed inside a set of surfaces/contours. The filter “vtkSelectEnclosedPoints” creates a mask with values outside (mask value=0) or inside (mask value=1) the surface. Since I need to define different values for the cells inside each of the surface, I only see this possible passing the surfaces to the filter one by one and changing the 1’s with the scalar values I want.

Is there a more optimal way to do this?

Thanks!  
Carlos.
