How do i color mapping nrrd files

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.

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 . Give it your vtkImageData and a color function, I prefer to use vtkColorTransferFunction for the lookuptable.