# Color Mapping isosurface with the second scalar component

**URL:** https://discourse.vtk.org/t/color-mapping-isosurface-with-the-second-scalar-component/7091
**Category:** Support
**Created:** [November 6, 2021, 1:51am UTC](https://discourse.vtk.org/t/color-mapping-isosurface-with-the-second-scalar-component/7091 "2021-11-06T01:51:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xianger.qi](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/f14d63/32.png) [@xianger.qi](https://discourse.vtk.org/u/xianger.qi)
#### Post date: [November 6, 2021, 1:51am UTC](https://discourse.vtk.org/t/color-mapping-isosurface-with-the-second-scalar-component/7091/1 "2021-11-06T01:51:43Z")

</div>

Hey, I have a question confused me.

I use vtksamplefunction to sample a vtkimagedata with specified implicit function. And i make the point scalar array of imagedata from one dimension to two dimension, The first dimension indicate the signed distance, and the second dimension indicate three status for points. code below

 ![Screenshot from 2021-11-06 09-42-28](https://discourse.vtk.org/uploads/default/original/2X/1/14030933830dfe7c4a8824fe5ee6bb243321e7f7.png)

Then i specify the vtklookuptable for vtkpolydatamapper. the lookuptable corresponding the three status for vtkimagedata points

![Screenshot from 2021-11-06 09-45-32](https://discourse.vtk.org/uploads/default/original/2X/b/b220e6446ff4ad64e62dae79d1655bb566d38d68.png)

Last, i use vtkflyingedges3d to extract isosurface, and map the isosurface with vtkpolydatamapper.

 ![Screenshot from 2021-11-06 09-49-52](https://discourse.vtk.org/uploads/default/original/2X/8/89729dd7639ad36bdca7e7b9ff0d20d79f6900cb.png)

BUT The final color mapping result is incorrect, the color mapping seems does’t work. Can you help me? Thanks a lot!
