<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:"tahoma", "new york", "times", serif;font-size:10pt"><p><br></p><p>Hello Yang,</p><p><br></p><p><br></p><p>I send you a example. Look at vtkLookupTable (SetTableRange()) for the change of threshold or Hounsfield units. </p><p><br></p><p><br></p><p>//Display 2D-CT-Data (Axial)</p><p><br></p><p>this-&gt;displayImageAxial-&gt;show();  //FLTK Box<br>         this-&gt;displayImageAxial-&gt;redraw();<br></p><p><br></p><p>vtkInteractorStyleTrackballCamera* modeAxial = vtkInteractorStyleTrackballCamera::New();<br><br>            vtkRenderer* rendererAxial = vtkRenderer::New();<br><br>            renderWindowAxial* renderWindowAxial = vtkRenderWindow::New();<br>        renderWindowAxial-&gt;AddRenderer(rendererAxial);<br><br>            displayImageAxial-&gt;SetRenderWindow(renderWindowAxial);<br>        displayImageAxial-&gt;SetInteractorStyle(modeAxial);<br>    
        displayImageAxial-&gt;Initialize();<br><br><br> vtkLookupTable* hueLut = vtkLookupTable::New();<br><span>            hueLut-&gt;SetTableRange (-250,1200); // -250= L  1200= W  (<a target="_blank" href="http://en.wikipedia.org/wiki/Hounsfield_scale">http://en.wikipedia.org/wiki/Hounsfield_scale</a>)</span><br>        hueLut-&gt;SetSaturationRange (0, 0);<br>            hueLut-&gt;SetHueRange (0, 0);<br>            hueLut-&gt;SetValueRange (0, 2);<br>            hueLut-&gt;Build(); //effective built<br><br>          vtkImageMapToColors *colorsAxial = vtkImageMapToColors::New();<br>            colorsAxial-&gt;SetInput(reader2D-&gt;GetOutput());<br>            colorsAxial-&gt;SetLookupTable(hueLut);<br><br>          vtkImageActor* actorAxial = vtkImageActor::New();<br>            actorAxial-&gt;SetInput(colorsAxial-&gt;GetOutput());<br>        actorAxial-&gt;SetOpacity(1.0);<br>actorAxial-&gt;SetDisplayExtent(0,reader2D-&gt;GetWidth()-1 , 0,reader2D-&gt;GetHeight()-1,
 numberOfFilesOnSelectedFolder/2,numberOfFilesOnSelectedFolder/2); //0,511, 0,511, 100, 100<br> <br>        <br>          vtkCamera* cameraAxial = vtkCamera::New();<br>            cameraAxial-&gt;SetViewUp(0, 0, -1);<br>            cameraAxial-&gt;SetPosition(0, 1, 0);<br>            cameraAxial-&gt;SetFocalPoint(0, 0, 0);<br>            cameraAxial-&gt;ComputeViewPlaneNormal();        <br>        cameraAxial-&gt;Roll(90);<br>        cameraAxial-&gt;Azimuth(90);<br>        cameraAxial-&gt;Roll(-90);<br>        <br> <br>        rendererAxial-&gt;AddActor(actorAxial);<br>          rendererAxial-&gt;SetActiveCamera(cameraAxial);<br>          rendererAxial-&gt;ResetCamera();<br>          cameraAxial-&gt;Dolly(1.0);<br>          rendererAxial-&gt;ResetCameraClippingRange();<br><br></p><p><br></p><div> </div>Mit freundlichen Grüßen<br>Yusuf ÖZBEK<div><br></div><div style="font-family:tahoma, new york, times, serif;font-size:10pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1"><b><span
 style="font-weight: bold;">Von:</span></b> Xiaopeng Yang &lt;yxp233@postech.ac.kr&gt;<br><b><span style="font-weight: bold;">An:</span></b> vtkusers@vtk.org; insight-users@itk.org<br><b><span style="font-weight: bold;">Gesendet:</span></b> Mittwoch, den 15. Dezember 2010, 13:04:51 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> [Insight-users] 2D CT image visualization problem<br></font><br><style><!--
 
 _filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered {font-family:"Malgun Gothic";panose-1:0 0 0 0 0 0 0 0 0 0;}
 _filtered {panose-1:0 0 0 0 0 0 0 0 0 0;}
 
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"sans-serif";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
span.EmailStyle17
        {font-family:"sans-serif";color:windowtext;}
.MsoChpDefault
        {}
 _filtered {margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {}
--></style><div class="WordSection1"><p class="MsoNormal">Hello everyone,</p><p class="MsoNormal">  </p><p class="MsoNormal">I applied VTKimageViewer2 to visualize 2D CT images. And I succeeded. Furthermore, I would like to only show the pixels within a given gray scale threshold interval. But I have no idea how to do it. I would appreciate any help.</p><p class="MsoNormal">  </p><p class="MsoNormal">Thank you very much,</p><p class="MsoNormal">Xiaopeng</p></div></div></div>


</div><br></body></html>