# How to add intensity value at every point in a point cloud using vtk? I am using python

**URL:** https://discourse.vtk.org/t/how-to-add-intensity-value-at-every-point-in-a-point-cloud-using-vtk-i-am-using-python/349
**Category:** Support
**Created:** [February 28, 2019, 10:21pm UTC](https://discourse.vtk.org/t/how-to-add-intensity-value-at-every-point-in-a-point-cloud-using-vtk-i-am-using-python/349 "2019-02-28T22:21:27Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/banesullivan/32/7143_2.png) [@banesullivan](https://discourse.vtk.org/u/banesullivan)
#### Post date: [March 3, 2019, 3:15am UTC](https://discourse.vtk.org/t/how-to-add-intensity-value-at-every-point-in-a-point-cloud-using-vtk-i-am-using-python/349/6 "2019-03-03T03:15:10Z")

</div>

> [@ral](#):
>
> but I need to use vtk

**`vtki` is VTK.** _It simply adds a layer on top to make VTK way easier to use_ so that we don’t have to remember the nuances of lookup tables and rendering, etc.

All `vtki` data objects are instances of VTK data objects:

```python
>>> import vtk
>>> import vtki
>>> isinstance(vtki.PolyData(), vtk.vtkPolyData)
True
>>> isinstance(vtki.UnstructuredGrid(), vtk.vtkUnstructuredGrid)
True

```

> [@ral](#):
>
> adding intensity to the points is just a step from the entire process

- You’ll need to create a mapper: `vtk.vtkDataSetMapper()`
- Then set up that mappers lookup table properly: `mapper.GetLookupTable()` and set its attributes/colormapping

Try following [this example](https://vtk.org/Wiki/VTK/Examples/Python/Widgets/ScalarBarWidget) or [this cpp exmaple which could be translated to Python](https://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints)

---

_[View the full topic](https://discourse.vtk.org/t/how-to-add-intensity-value-at-every-point-in-a-point-cloud-using-vtk-i-am-using-python/349)._
