I&#39;m trying to read a DICOM image and change the color of a single specific value.<br>I am using vtkLookupTable.<br>But is having a strange behavior.<br>The image not is showed, but a lot of noise. <br>What can be?<br><br>

code:<br clear="all">#include &lt;cstdio&gt;<br>#include &lt;iostream&gt;<br>#include &quot;vtkImageData.h&quot;<br>#include &quot;vtkImageViewer2.h&quot;<br>#include &quot;vtkRenderWindowInteractor.h&quot;<br>#include &quot;vtkDICOMImageReader.h&quot;<br>

#include &quot;vtkImageMapToColors.h&quot;<br>#include &quot;vtkLookupTable.h&quot;<br><br>using namespace std;<br><br><br>int main()<br>{<br><br>vtkDICOMImageReader *reader = vtkDICOMImageReader :: New();<br> reader-&gt; SetDirectoryName(&quot;C:\\volumes\\exemplo2&quot;);<br>

<br> reader-&gt;Update();<br><br><br> vtkLookupTable* table = vtkLookupTable::New();<br><br>   double* range = reader-&gt;GetOutput()-&gt;GetScalarRange();<br>   printf(&quot;\nrange %lf %lf [1]-[0]=%lf\n&quot;,range[0],range[1],range[1]-range[0]);<br>

<br>   table-&gt;SetNumberOfColors( range[1]-range[0] );<br>   table-&gt;SetTableRange(range[0],range[1]);<br>   table-&gt;SetSaturationRange(0,0);<br>   table-&gt;SetHueRange(0,1);<br>   table-&gt;SetValueRange(0,1);<br>

   table-&gt;SetAlphaRange(1,1);<br> <br>   // set new color<br>   table-&gt;SetTableValue(0,0.0,1.0,0.0,0.0);<br> <br>   table-&gt;Build();<br><br><br>  //convert to color:<br>  vtkImageMapToColors* colormap = vtkImageMapToColors::New();<br>

  colormap-&gt;SetInput(reader-&gt;GetOutput());<br>  colormap-&gt;SetLookupTable(table);<br>  colormap-&gt;SetOutputFormatToRGB();<br><br> vtkRenderWindowInteractor* ite = vtkRenderWindowInteractor::New();<br><br> vtkImageViewer2* viewer = vtkImageViewer2::New();<br>

 viewer-&gt;SetInputConnection( colormap-&gt;GetOutputPort() );<br>  viewer-&gt;SetupInteractor( ite );<br> <br>  ite-&gt;Initialize();<br>  ite-&gt;Start();<br><br>return 0;<br>}<br>