[vtkusers] vtkImageViewer ?

Markova Aneta amarkova at etro.vub.ac.be
Mon Jan 23 05:07:52 EST 2006


Dear VTK users,

I am novice in the VTK and I am using the code bellow for displaying a
slice of a volume. 


My question is: Is there a way how to specify the number of the slice
and the direction I want to visualize and if not what image viewer than
I should be using? 

m_readerOutput->SetFileName( "D:\\Data\\Output.mhd" );
m_connectorOutput->SetInput( m_readerOutput->GetOutput() );		
	
vtkImageViewer *viewer = vtkImageViewer::New();	
vtkRenderWindowInteractor *renderWindowInteractor =
vtkRenderWindowInteractor::New();	

viewer->SetupInteractor ( renderWindowInteractor );			
viewer->SetInput ( m_connectorOutput->GetOutput() );			
viewer->Render();

viewer->SetColorWindow( 255 );						
viewer->SetColorLevel ( 128 );						
viewer->GetRenderWindow()->SetWindowName("Output Image");
renderWindowInteractor->Start();




Kind regards,
Aneta


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060123/a4868326/attachment.htm>


More information about the vtkusers mailing list