[Insight-users] 2D CT image visualization problem
Xiaopeng Yang
yxp233 at postech.ac.kr
Thu Dec 16 03:24:20 EST 2010
Hi Yusuf ÖZBEK,
Thank you for your help! Under your suggestion, I solved my problem.
Best regards,
Xiaopeng Yang
发件人: Yusuf OEZBEK [mailto:nasil122002 at yahoo.de]
发送时间: 2010년 12월 16일 목요일 오전 6:15
收件人: ITK Mailinglist
抄送: Xiaopeng Yang
主题: RE: [Insight-users] 2D CT image visualization problem
Hello Yang,
I send you a example. Look at vtkLookupTable (SetTableRange()) for the change of threshold or Hounsfield units.
//Display 2D-CT-Data (Axial)
this->displayImageAxial->show(); //FLTK Box
this->displayImageAxial->redraw();
vtkInteractorStyleTrackballCamera* modeAxial = vtkInteractorStyleTrackballCamera::New();
vtkRenderer* rendererAxial = vtkRenderer::New();
renderWindowAxial* renderWindowAxial = vtkRenderWindow::New();
renderWindowAxial->AddRenderer(rendererAxial);
displayImageAxial->SetRenderWindow(renderWindowAxial);
displayImageAxial->SetInteractorStyle(modeAxial);
displayImageAxial->Initialize();
vtkLookupTable* hueLut = vtkLookupTable::New();
hueLut->SetTableRange (-250,1200); // -250= L 1200= W (http://en.wikipedia.org/wiki/Hounsfield_scale)
hueLut->SetSaturationRange (0, 0);
hueLut->SetHueRange (0, 0);
hueLut->SetValueRange (0, 2);
hueLut->Build(); //effective built
vtkImageMapToColors *colorsAxial = vtkImageMapToColors::New();
colorsAxial->SetInput(reader2D->GetOutput());
colorsAxial->SetLookupTable(hueLut);
vtkImageActor* actorAxial = vtkImageActor::New();
actorAxial->SetInput(colorsAxial->GetOutput());
actorAxial->SetOpacity(1.0);
actorAxial->SetDisplayExtent(0,reader2D->GetWidth()-1 , 0,reader2D->GetHeight()-1, numberOfFilesOnSelectedFolder/2,numberOfFilesOnSelectedFolder/2); //0,511, 0,511, 100, 100
vtkCamera* cameraAxial = vtkCamera::New();
cameraAxial->SetViewUp(0, 0, -1);
cameraAxial->SetPosition(0, 1, 0);
cameraAxial->SetFocalPoint(0, 0, 0);
cameraAxial->ComputeViewPlaneNormal();
cameraAxial->Roll(90);
cameraAxial->Azimuth(90);
cameraAxial->Roll(-90);
rendererAxial->AddActor(actorAxial);
rendererAxial->SetActiveCamera(cameraAxial);
rendererAxial->ResetCamera();
cameraAxial->Dolly(1.0);
rendererAxial->ResetCameraClippingRange();
Mit freundlichen Grüßen
Yusuf ÖZBEK
_____
Von: Xiaopeng Yang <yxp233 at postech.ac.kr>
An: vtkusers at vtk.org; insight-users at itk.org
Gesendet: Mittwoch, den 15. Dezember 2010, 13:04:51 Uhr
Betreff: [Insight-users] 2D CT image visualization problem
Hello everyone,
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.
Thank you very much,
Xiaopeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101216/f18b3cb1/attachment-0001.htm>
More information about the Insight-users
mailing list