<div dir="auto">This example may help.<div dir="auto"><a href="https://lorensen.github.io/VTKExamples/site/Cxx/Images/FillWindow/">https://lorensen.github.io/VTKExamples/site/Cxx/Images/FillWindow/</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jul 26, 2017 6:36 AM, "K O ranjith" <<a href="mailto:kor1581@gmail.com">kor1581@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>Using  vtkImageViewer2 + QVTKWidget and <span style="color:rgb(128,0,128)">vtkInteractorStyleImage, I created a </span>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, </div><div>like </div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">m_vtkImViewer->GetRenderer()-><wbr>GetActiveCamera()-><wbr>ParallelProjectionOn();</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">m_vtkImViewer->GetRenderer()-><wbr>GetActiveCamera()-><wbr>SetParallelScale(1000);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">m_vtkImViewer->GetRenderer()-><wbr>GetActiveCamera()->Dolly(10);</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,128,0)"><br></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">   </span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">m_vtkImViewer-><wbr>GetRenderWindow()->SetSize(50,</span><span style="color:rgb(192,192,192)"> 50</span><span style="color:rgb(0,128,0)">);</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,128,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px">Please help to fit the image in window.</pre><pre style="margin-top:0px;margin-bottom:0px">Screenshot of current viewer is attached. </pre><pre style="margin-top:0px;margin-bottom:0px">As shown in the screnshot the image is displaying within a margin inside the viewport.</pre><pre style="margin-top:0px;margin-bottom:0px">But the corner annotations (set using vtkCornerAnnotation) are set in corners of the view port.   </pre></div></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div></div>