[vtkusers] fit to screen in vtkImageViewer2 + QVTKWidget
Bill Lorensen
bill.lorensen at gmail.com
Wed Jul 26 07:46:59 EDT 2017
This example may help.
https://lorensen.github.io/VTKExamples/site/Cxx/Images/FillWindow/
On Jul 26, 2017 6:36 AM, "K O ranjith" <kor1581 at gmail.com> wrote:
> 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.
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170726/eb0ec5c7/attachment.html>
More information about the vtkusers
mailing list