<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Swetha,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">the simplest, but not computationally most efficient, is to <a href="https://itk.org/ITKExamples/src/IO/GDCM/ReadDICOMSeriesAndWrite3DImage/Documentation.html" target="_blank">load</a> the series as a 3D image and then access the middle slice:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">image3d=reader->GetOutput();</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">ImageType::IndexType ind=image3d-><wbr>GetBufferedRegion().GetIndex()<wbr>;</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">ind[2]=image3d-><wbr>GetBufferedRegion().GetSize()[<wbr>2]/2; //middle</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">slicePixel00=image3d-><wbr>GetPixel(ind);</font></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Less computation, but more code would be to examine spatial position of each slice in seriesUID and then just load the one closest to the middle.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">We are in the process of switching to <a href="https://discourse.itk.org/" target="_blank">discourse</a>, please post follow-up questions there.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 17, 2017 at 9:54 AM, Swetha Sharma <span dir="ltr"><<a href="mailto:swetha.bsharma@gmail.com" target="_blank">swetha.bsharma@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="ltr">Hi ,<div><br></div><div>I want to know how to get the image values from middle slice of dicom series.</div><span class="m_6413608504335508219HOEnZb"><font color="#888888"><div>-swetha</div></font></span></div>
<br>The ITK community is transitioning from this mailing list to <a href="http://discourse.itk.org" rel="noreferrer" target="_blank">discourse.itk.org</a>. Please join us there!<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<br>
<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>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/product<wbr>s/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FA<wbr>Q</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/insight-users</a><br>
<br></blockquote></div><br></div></div>