[vtkusers] Defining the begining CT value when setting window level of a slice?

chasank chasank at gmail.com
Fri May 20 11:07:17 EDT 2011


I want to be able to define begining HU value of a slice when setting its
color window. The SetColorWindow method sets its window width but from where
to where? 0 HU to 100 HU ? 400 HU to 500 HU ? How can I set the beginning HU
value ? Thanks

        sagittalViewer = vtkSmartPointer < vtkImageViewer2 > :: New();
	sagittalViewer->SetInputConnection(reader->GetOutputPort());
	sagittalViewer->SetSliceOrientation(0); // Saggital = 0, Coronal = 1, Axial
= 2

	vtkSmartPointer < vtkWin32RenderWindowInteractor> iren = vtkSmartPointer <
vtkWin32RenderWindowInteractor>::New();
	sagittalViewer->SetupInteractor(iren);
        sagittalViewer->SetColorLevel(50.0);
        sagittalViewer->SetColorWindow(100.0);
	sagittalViewer->GetRenderer()->GetActiveCamera()->SetViewUp(0, 0, -1);
	sagittalViewer->GetRenderer()->GetActiveCamera()->SetPosition(1, 0, 0);
	sagittalViewer->GetRenderer()->GetActiveCamera()->SetFocalPoint(0, 0, 0);
	sagittalViewer->GetRenderer()->GetActiveCamera()->ComputeViewPlaneNormal();
	sagittalViewer->GetRenderer()->ResetCamera();
	sagittalViewer->GetRenderWindow()->Render();
	iren->Initialize();

--
View this message in context: http://vtk.1045678.n5.nabble.com/Defining-the-begining-CT-value-when-setting-window-level-of-a-slice-tp4412783p4412783.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list