<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()->GetActiveCamera()->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()->GetActiveCamera()->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()->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->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>