]> Creatis software - gdcm.git/commitdiff
Now SerieHeader::SetDirectory() allow recursive exploration of the Directory
authorjpr <jpr>
Fri, 28 Jan 2005 16:56:49 +0000 (16:56 +0000)
committerjpr <jpr>
Fri, 28 Jan 2005 16:56:49 +0000 (16:56 +0000)
src/gdcmSerieHeader.cxx
src/gdcmSerieHeader.h

index f5b5af890a73b23e3f2d66cfa14450faabec1443..c1cd3930b3856ab83a65bef1d5a259fa35f7953f 100644 (file)
@@ -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(); 
index 99b325cd20c60f5c168ffeafc3e2437f966ddaff..b1e81854ecd18d731ba692ccbd7e4fc5b1a6c67c 100644 (file)
@@ -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