# Painting individual voxels of a Structured Grid (vtkPolyData) differently.

**URL:** https://discourse.vtk.org/t/painting-individual-voxels-of-a-structured-grid-vtkpolydata-differently/1574
**Category:** Development
**Created:** [August 13, 2019, 6:12pm UTC](https://discourse.vtk.org/t/painting-individual-voxels-of-a-structured-grid-vtkpolydata-differently/1574 "2019-08-13T18:12:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Seun](https://discourse.vtk.org/user_avatar/discourse.vtk.org/seun/32/767_2.png) [@Seun](https://discourse.vtk.org/u/Seun)
#### Post date: [August 13, 2019, 6:12pm UTC](https://discourse.vtk.org/t/painting-individual-voxels-of-a-structured-grid-vtkpolydata-differently/1574/1 "2019-08-13T18:12:49Z")

</div>

Hello everyone,

I have a situation where I have a vtkPolyData created from a structured grid and would like the voxels of this grid painted individually based on some criteria. That is for instance if a voxel is being examined and to be painted and it’s between a given threshold or range I would like it to take on a specified colour. Is there already an existing way to do this if not how can one go about achieving it?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [August 16, 2019, 2:16pm UTC](https://discourse.vtk.org/t/painting-individual-voxels-of-a-structured-grid-vtkpolydata-differently/1574/2 "2019-08-16T14:16:31Z")

</div>

You can assign scalar values to points or cells. These scalar values can be used to set the color, select, delete, hide points or cells using various filters and mappers. See [VTK textbook](https://vtk.org/vtk-textbook/) and [VTK examples](https://lorensen.github.io/VTKExamples/site/) for details.
