<div dir="ltr">Thanks for the solution, <div>One more doubt in my application, <span style="background-color:rgb(249,249,249);color:rgb(0,0,0);font-family:monospace,monospace;font-size:1em">vtkDICOMImageReader</span> is used for reading all the DICOM files in a folder and setting directly to <span style="color:rgb(128,0,128)">vtkImageViewer2  through </span><span style="background-color:rgb(249,249,249);color:rgb(0,0,0);font-family:monospace,monospace;font-size:1em">SetInputConnection</span><span class="gmail-br0" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,128,0)">(</span><span style="background-color:rgb(249,249,249);color:rgb(0,0,0);font-family:monospace,monospace;font-size:1em">reader</span><span class="gmail-sy2" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,0,64)">-</span><span class="gmail-sy1" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,0,128)">></span><span style="background-color:rgb(249,249,249);color:rgb(0,0,0);font-family:monospace,monospace;font-size:1em">GetOutputPort</span><span class="gmail-br0" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,128,0)">(</span><span class="gmail-br0" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,128,0)">)</span><span class="gmail-br0" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,128,0)">)</span><span class="gmail-sy4" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,128,128)">;. The DICOM images in the folder might have different size. In this case how can get "Extent" "Orgin" "spacing" parameters of each image.</span></div><div><span class="gmail-sy4" style="font-family:monospace,monospace;font-size:1em;color:rgb(0,128,128)">Have any methods to extract these from  </span><span style="font-size:1em;background-color:rgb(249,249,249);color:rgb(0,0,0);font-family:monospace,monospace">vtkDICOMImageReader</span>  or <span style="color:rgb(128,0,128)">vtkImageViewer2 ?</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 26, 2017 at 5:16 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">This example may help.<div dir="auto"><a href="https://lorensen.github.io/VTKExamples/site/Cxx/Images/FillWindow/" target="_blank">https://lorensen.github.io/<wbr>VTKExamples/site/Cxx/Images/<wbr>FillWindow/</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Jul 26, 2017 6:36 AM, "K O ranjith" <<a href="mailto:kor1581@gmail.com" target="_blank">kor1581@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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()->ParallelPro<wbr>jectionOn();</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()->SetParallel<wbr>Scale(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->GetRenderWindow<wbr>()->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></div></div>______________________________<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/opensou<wbr>rce/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_FA<wbr>Q</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/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div></div>
</blockquote></div><br></div>