[vtkusers] Using qvtkwidget vtkImageViewer2, how to make the dicom image fill entire viewport

ocean 2009222002 at email.szu.edu.cn
Wed Sep 11 07:11:52 EDT 2013


I'm using the qvtkwidget and vtkImageViewer2 , and I want to set points in
the Image , but I found that the Image doesn't fill the viewport entirely,
it shows in the middle of the widget, so the points I get are just based on
the qvtkwidget but not the Image.
Here is my code:
	ConnectorType::Pointer connector = ConnectorType::New();
	connector->SetInput( importFilter->GetOutput() );
	connector->Update();
	vtkSmartPointer< vtkImageViewer2 > m_pImageViewer;  
	m_pImageViewer  = vtkSmartPointer< vtkImageViewer2 >::New(); 
	m_pImageViewer->SetInput(connector->GetOutput()); 
	m_pImageViewer->SetRenderWindow(m_movingWidget->GetRenderWindow());
	m_pImageViewer->SetSliceOrientationToXY(); 
	m_pImageViewer->Render();


////////////////////////////////////////////////////////////////////////////////
Is there anyone know how should I try to get the image fill the entire
viewport??

I have been doing this all day and get nothing.....

Even a liitle clue would be helpful!!

Thanks in advance.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Using-qvtkwidget-vtkImageViewer2-how-to-make-the-dicom-image-fill-entire-viewport-tp5723393.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list