<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->displayImageAxial->show(); //FLTK Box<br>         this->displayImageAxial->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->AddRenderer(rendererAxial);<br><br>         displayImageAxial->SetRenderWindow(renderWindowAxial);<br>        displayImageAxial->SetInteractorStyle(modeAxial);<br>
        displayImageAxial->Initialize();<br><br><br> vtkLookupTable* hueLut = vtkLookupTable::New();<br><span>         hueLut->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->SetSaturationRange (0, 0);<br>         hueLut->SetHueRange (0, 0);<br>         hueLut->SetValueRange (0, 2);<br>         hueLut->Build(); //effective built<br><br>         vtkImageMapToColors *colorsAxial = vtkImageMapToColors::New();<br>         colorsAxial->SetInput(reader2D->GetOutput());<br>         colorsAxial->SetLookupTable(hueLut);<br><br>         vtkImageActor* actorAxial = vtkImageActor::New();<br>         actorAxial->SetInput(colorsAxial->GetOutput());<br>        actorAxial->SetOpacity(1.0);<br>actorAxial->SetDisplayExtent(0,reader2D->GetWidth()-1 , 0,reader2D->GetHeight()-1,
numberOfFilesOnSelectedFolder/2,numberOfFilesOnSelectedFolder/2); //0,511, 0,511, 100, 100<br> <br>        <br>         vtkCamera* cameraAxial = vtkCamera::New();<br>         cameraAxial->SetViewUp(0, 0, -1);<br>         cameraAxial->SetPosition(0, 1, 0);<br>         cameraAxial->SetFocalPoint(0, 0, 0);<br>         cameraAxial->ComputeViewPlaneNormal();        <br>        cameraAxial->Roll(90);<br>        cameraAxial->Azimuth(90);<br>        cameraAxial->Roll(-90);<br>        <br> <br>        rendererAxial->AddActor(actorAxial);<br>         rendererAxial->SetActiveCamera(cameraAxial);<br>         rendererAxial->ResetCamera();<br>         cameraAxial->Dolly(1.0);<br>         rendererAxial->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 <yxp233@postech.ac.kr><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>