From: Simon Rit Date: Fri, 26 Jul 2013 10:50:07 +0000 (+0200) Subject: Sort series under Linux X-Git-Tag: v1.4.0~2^2~6 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=48e744cf9484096891bd44bd74099c82bd238b20;p=clitk.git Sort series under Linux --- diff --git a/vv/vvQPacsConnection.cxx b/vv/vvQPacsConnection.cxx index 905c668..443447d 100644 --- a/vv/vvQPacsConnection.cxx +++ b/vv/vvQPacsConnection.cxx @@ -8,6 +8,8 @@ #include "vvPacsSettingsDialog.h" #include "vvUtils.h" #include +#include +#include vvQPacsConnection::vvQPacsConnection(QWidget *i_parent) @@ -385,8 +387,31 @@ void vvQPacsConnection::on_importButton_clicked() getDicomClientPort(), getDicomClientAETitle().c_str(), m_aetitle.c_str(), path.toStdString().c_str() ); gdcm::Directory theDir; theDir.Load(path.toStdString().c_str()); - m_files = theDir.GetFilenames(); - std::sort (m_files.begin(), m_files.end()); // make sure names are in lexicographical order + //m_files = theDir.GetFilenames(); + + typedef itk::GDCMSeriesFileNames NamesGeneratorType; + NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); + nameGenerator->SetUseSeriesDetails(true); + + //ds gérer recursive moi-meme pour progress ... + nameGenerator->SetInputDirectory(path.toStdString()); + + // insert in table + typedef std::vector SeriesIdContainer; + const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs(); + std::map* > mListOfSeriesFilenames; + + + for (unsigned int i=0; i * filenames = new std::vector; + m_files = nameGenerator->GetFileNames(seriesUID[i]); + /* for (unsigned int j=0; jpush_back(temp[j]); + }*/ + + } accept(); setCursor(QCursor(Qt::ArrowCursor));