[vtkusers] fit to screen in vtkImageViewer2 + QVTKWidget
K O ranjith
kor1581 at gmail.com
Wed Jul 26 06:35:44 EDT 2017
Hello,
Using vtkImageViewer2 + QVTKWidget and vtkInteractorStyleImage, I created
a DICOM image viewer. But the image mot filling to the the entire
viewport. I need the fit the image to the viewport. For this I tried
different suggestion available online, but no effect,
like
m_vtkImViewer->GetRenderer()->GetActiveCamera()->ParallelProjectionOn();
m_vtkImViewer->GetRenderer()->GetActiveCamera()->SetParallelScale(1000);
m_vtkImViewer->GetRenderer()->GetActiveCamera()->Dolly(10);
m_vtkImViewer->GetRenderWindow()->SetSize(50, 50);
Please help to fit the image in window.
Screenshot of current viewer is attached.
As shown in the screnshot the image is displaying within a margin
inside the viewport.
But the corner annotations (set using vtkCornerAnnotation) are set in
corners of the view port.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170726/de8926fb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled.jpg
Type: image/jpeg
Size: 170473 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170726/de8926fb/attachment-0001.jpg>
More information about the vtkusers
mailing list