]> Creatis software - gdcm.git/blobdiff - Example/exSerieHelper.cxx
Avoid Doxygen Warnings
[gdcm.git] / Example / exSerieHelper.cxx
index 41a98abd3e135cce57c3f6ddc11e84d159519435..fb48ad03075a4d189f254810546fa9216435c5b3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: exSerieHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/08/30 14:40:28 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/11/14 15:55:17 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -38,9 +38,10 @@ int main(int argc, char *argv[])
   
    std::cout << "Dir Name :[" << dirName << "]" << std::endl;
 
-   s = new gdcm::SerieHelper();
-   s->SetLoadMode(GDCM_LD_ALL);     // Load everything for each File
-   //s->AddRestriction(tagKey, valueToCheck); // Keep only files where
+   s = gdcm::SerieHelper::New();
+   s->SetLoadMode(gdcm::LD_ALL);     // Load everything for each File
+   //gdcm::TagKey t(0x0020,0x0013);
+   //s->AddRestriction(t, "340", gdcm::GDCM_LESS); // Keep only files where
                                               // restriction is true
    s->SetDirectory(dirName, true); // true : recursive exploration
 
@@ -52,8 +53,8 @@ int main(int argc, char *argv[])
              << std::endl;
 
    int nbFiles;
-   // For all the Coherent Files lists of the gdcm::Serie
-   gdcm::FileList *l = s->GetFirstCoherentFileList();
+   // For all the Single SerieUID Files Sets of the gdcm::Serie
+   gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet();
    while (l)
    { 
       nbFiles = l->size() ;
@@ -62,11 +63,11 @@ int main(int argc, char *argv[])
          std::cout << "Sort list : " << nbFiles << " long" << std::endl;
          s->OrderFileList(l);  // sort the list
       }
-      l = s->GetNextCoherentFileList();
+      l = s->GetNextSingleSerieUIDFileSet();
    } 
    std::cout << " -------------------------------------------- Finish sorting"
              << std::endl;
-   s->Print(); // Prints all the Coherent Files lists (sorted or not)
+   s->Print(); // Prints all the Single SerieUID File Sets (sorted or not)
    std::cout << " -------------------------------------------- Finish printing"
              << std::endl;
 
@@ -76,7 +77,7 @@ int main(int argc, char *argv[])
    // Display all the file names
 
    std::string fileName; 
-   l = s->GetFirstCoherentFileList();
+   l = s->GetFirstSingleSerieUIDFileSet();
    for (std::vector<gdcm::File* >::iterator it =  l->begin();
                                             it != l->end();
                                           ++it)
@@ -86,7 +87,7 @@ int main(int argc, char *argv[])
    } 
      
 
-   delete s;
+   s->Delete();
 
    return 0;
 }