# How do i color mapping nrrd files

**URL:** https://discourse.vtk.org/t/how-do-i-color-mapping-nrrd-files/1171
**Category:** Support
**Created:** [June 19, 2019, 1:29am UTC](https://discourse.vtk.org/t/how-do-i-color-mapping-nrrd-files/1171 "2019-06-19T01:29:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Script\_K](https://discourse.vtk.org/user_avatar/discourse.vtk.org/script_k/32/476_2.png) [@Script\_K](https://discourse.vtk.org/u/Script_K)
#### Post date: [June 19, 2019, 1:29am UTC](https://discourse.vtk.org/t/how-do-i-color-mapping-nrrd-files/1171/1 "2019-06-19T01:29:08Z")

</div>

Hi there.

I’m working on color mapping nrrd files. The language I use is Python.

The nrrd file used is the three-dimensional data corresponding to the head of the person.

I want to do color mapping on the coordinates of the part I want.

Does VTK have color mapping for nrrd?

Any thoughts would be appreciated.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Andrew](https://discourse.vtk.org/user_avatar/discourse.vtk.org/andrew/32/3861_2.png) [@Andrew](https://discourse.vtk.org/u/Andrew)
#### Post date: [June 19, 2019, 5:17am UTC](https://discourse.vtk.org/t/how-do-i-color-mapping-nrrd-files/1171/2 "2019-06-19T05:17:22Z")

</div>

vtkImageMapToColors should do some of what you want. Here’s the c++ example (no python example but more or less the same thing), [https://vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageMapToColors](https://vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageMapToColors) . Give it your vtkImageData and a color function, I prefer to use vtkColorTransferFunction for the lookuptable.
