<div dir="ltr">Hi Constantine,<div><br></div><div>If you&#39;re using you system installed GDCM then you could use gdcm::Scanner and gdcm::Sorter to organize the files and obtain the lists of filenames for the reader. Take a look at these examples:</div>

<div><br></div><div><a href="http://gdcm.sourceforge.net/2.2/html/VolumeSorter_8cxx-example.html">http://gdcm.sourceforge.net/2.2/html/VolumeSorter_8cxx-example.html</a><br></div><div><br></div><div><a href="http://gdcm.sourceforge.net/2.2/html/SortImage_8cxx-example.html">http://gdcm.sourceforge.net/2.2/html/SortImage_8cxx-example.html</a><br>

</div><div><br></div><div>Once the files are sorted you should do something like:</div><div><br></div><div>FileNamesContainer sorted_files = sorter.GetFilenames();<br></div><div>reader-&gt;SetFileNames(sorted_files);<br>
</div>
<div><br></div><div>HTH,</div><div class="gmail_extra"><div><div dir="ltr"><div>--</div>Mariana<br></div></div>
<br><br><div class="gmail_quote">On Fri, Aug 9, 2013 at 2:25 PM, Constantine Zakkaroff <span dir="ltr">&lt;<a href="mailto:mnkz@leeds.ac.uk" target="_blank">mnkz@leeds.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello ALL.<br>
<br>
I&#39;m trying to sub-refine a series based on some DICOM tag like this:<br>
<br>
namesGenerator-&gt;<u></u>AddSeriesRestriction(&quot;2001|<u></u>100a&quot;);<br>
namesGenerator-&gt;<u></u>SetInputDirectory(argv[1]);<br>
const itk::SerieUIDContainer &amp;seriesUIDs = namesGenerator-&gt;GetSeriesUIDs(<u></u>);<br>
<br>
It is based on the DicomSeriesReadImageWrite2.cxx example.<br>
<br>
In ITK 4.4.1 this doesn&#39;t work. I get only one UID.<br>
<br>
The same code compiled against ITK 3.20.1 gives me the number of UIDs expected.<br>
<br>
Looks like some sort of regression, no?<br>
<br>
Regards,<br>
Constantine<br>
______________________________<u></u>_______<br>
Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/<u></u>products/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" target="_blank">http://www.itk.org/Wiki/ITK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/<u></u>listinfo/insight-users</a><br>
</blockquote></div><br></div></div>