From: jpr Date: Fri, 28 Jan 2005 16:56:49 +0000 (+0000) Subject: Now SerieHeader::SetDirectory() allow recursive exploration of the Directory X-Git-Tag: Version1.0.bp~162 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1df6806a67c2830467246991a950670c84d82eb5;p=gdcm.git Now SerieHeader::SetDirectory() allow recursive exploration of the Directory --- diff --git a/src/gdcmSerieHeader.cxx b/src/gdcmSerieHeader.cxx index f5b5af89..c1cd3930 100644 --- a/src/gdcmSerieHeader.cxx +++ b/src/gdcmSerieHeader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHeader.cxx,v $ Language: C++ - Date: $Date: 2005/01/24 16:10:53 $ - Version: $Revision: 1.13 $ + Date: $Date: 2005/01/28 16:56:49 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -93,11 +93,12 @@ void SerieHeader::AddFileName(std::string const &filename) /** * \brief Sets the Directory * @param dir Name of the directory to deal with + * @param recursive whether we want explore recursively the Directory */ -void SerieHeader::SetDirectory(std::string const &dir) +void SerieHeader::SetDirectory(std::string const &dir, bool recursive) { - CurrentSerieUID = ""; //Reset previous Serie Instance UID - DirList dirList(dir); //OS specific + CurrentSerieUID = ""; // Reset previous Serie Instance UID + DirList dirList(dir, recursive); // OS specific DirListType filenames_list = dirList.GetFilenames(); for( DirListType::const_iterator it = filenames_list.begin(); diff --git a/src/gdcmSerieHeader.h b/src/gdcmSerieHeader.h index 99b325cd..b1e81854 100644 --- a/src/gdcmSerieHeader.h +++ b/src/gdcmSerieHeader.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHeader.h,v $ Language: C++ - Date: $Date: 2005/01/21 11:40:56 $ - Version: $Revision: 1.7 $ + Date: $Date: 2005/01/28 16:56:49 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -40,7 +40,7 @@ public: /// \todo should return bool or throw error ? void AddFileName(std::string const &filename); - void SetDirectory(std::string const &dir); + void SetDirectory(std::string const &dir, bool recursive=false); void OrderGdcmFileList(); /// \brief Gets the *coherent* File List