VTK volume partition coloring


hello, I’m trouble in learn vtk. I have two nii format file, one is someone’s data, another is standard aal data with scalar range, I want to know how can it be achieved like the screenshot that someone’s data can be colored different area.

Hi,

You need to define a color transfer function and assign the desired colors to the intended intensity ranges.

For example you can interactively design a color transfer function in 3d Slicer (slicer.org) and check the result visually, if you like it then just copy the color transfer to your own vtk solution.

Sorry, I missed that is supposed to be a labelmap visualized, in that case you need to define a lookup table of coloring based on your labelimage and apply it to the volume through vtkImageMapToColors()

The examples here would certainly help :

Thank you for your answer. However, the image on the right appears to be the effect of generating a 3D model using MarchingCube and coloring it according to the AAL template. How is this achieved?