hi all,<br>  <br>      I sent the message last night!  However, no one responded ! So, i send it again. Please forgive me, if it disrupts you!<br><br>I use
vtkDiscreteMarchingCubes to reconstruct anatomy structure, and use the
vtkLookupTable to map the color. Now, i design the color map as follows:<br>gray value (111) to red,<br>
gray value(121) to blue.<br>Other gray value I don&#39;t care.<br><br>Also, the parameter I set in SetValue() of  vtkDiscreteMarchingCubes is: <br>SetValue(0, 111);<br>SetValue(1, 121);<br><br>Then i set the lookup table as follows:<br>


vtkSmartPointer&lt;vtkLookupTable&gt; colorLookupTable= vtkSmartPointer&lt;vtkLookupTable&gt;::New();<br><div id=":2k" class="ii gt">colorLookupTable-&gt;SetTableRange(0, 122); // <br>colorLookupTable-&gt;SetNumberOfTableValues(123);<br>

colorLookupTable-&gt;Build();<br>
<br>for (int i =0; i &lt; 111; i++)<br>{<br>    colorLookupTable-&gt;SetTableValue(i , i/255.0, i/255.0,i/255.0); // i don&#39;t care this loop<br>}<br>colorLookupTable-&gt;SetTableValue(111, 1,0,0,1); // this is essential for me<br>


for (int j = 112; j &lt;120; j++)<br>{<br>    colorLookupTable-&gt;SetTableValue(j , j/255.0, j/255.0, j/255.0); // i don&#39;t care this loop<br><br>}<br>colorLookupTable-&gt;SetTableValue(121, 0,0,1,1);<br>colorLookupTable-&gt;SetTableValue(122, 0,0,1,1);<br>


<br>vtkSmartPointer&lt;vtkPolyDataMapper&gt; mapper = vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br>...<br>mapper-&gt;ScalarVisibilityOn() ;//#show colour <br>mapper-&gt;SetScalarRange(colorLookupTable-&gt;GetTableRange()); <br>


mapper-&gt;SetScalarModeToUseCellData() ;<br>mapper-&gt;SetLookupTable(colorLookupTable);<br> <br>The result of construction is that two structures whose gray value is 111 and 121 were reconstructed.<br>However, the color of these actors is the same- white.<br>

Ccould anyone tell me why and give some suggestions? <br><br>Thanks<br>Wenwu</div>