]> Creatis software - gdcm.git/blobdiff - Testing/TestSerieHelper.cxx
Fix mistypings
[gdcm.git] / Testing / TestSerieHelper.cxx
index 76ef8544bd0ced67b3f17f1272c29af9138f19be..81de64be068840d1146b5bdcadc461a68fd6ec00 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestSerieHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/07/17 04:25:12 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/09/15 15:49:21 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -22,7 +22,7 @@
 
 int TestSerieHelper(int argc, char *argv[])
 {  
-   gdcm::SerieHelper *s;
+   GDCM_NAME_SPACE::SerieHelper *s;
   
    std::string dirName; 
    if (argc > 1) 
@@ -33,13 +33,13 @@ int TestSerieHelper(int argc, char *argv[])
    }
 
    //if (argc > 2)
-   //   gdcm::Debug::DebugOn();
+   //   GDCM_NAME_SPACE::Debug::DebugOn();
 
   
-   std::cout << "Dir Name :[" << dirName << "]" << std::endl;
+   std::cout << "-------------- Dir Name :[" << dirName << "]" << std::endl;
 
-   s = new gdcm::SerieHelper();
-   s->SetLoadMode(0x00000000);     // Load everything for each File
+   s = GDCM_NAME_SPACE::SerieHelper::New();
+   s->SetLoadMode(GDCM_NAME_SPACE::LD_ALL);     // Load everything for each File
    //s->AddRestriction(tagKey, valueToCheck); // Keep only files where
                                               // restriction is true
    s->SetDirectory(dirName, true); // true : recursive exploration
@@ -51,8 +51,8 @@ int TestSerieHelper(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 SingleSerieUID filesets of the GDCM_NAME_SPACE::Serie
+   GDCM_NAME_SPACE::FileList *l = s->GetFirstSingleSerieUIDFileSet();
    while (l)
    { 
       nbFiles = l->size() ;
@@ -61,22 +61,22 @@ int TestSerieHelper(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 SingleSerieUID filesets (sorted or not)
    std::cout << " -------------------------------------------- Finish printing"
              << std::endl;
 
 
-   // Only for the first Coherent File Lis
+   // Only for the first SingleSerieUID filese
    // ( Why not ? Just an example, for testing )
    // Display all the file names
 
    std::string fileName; 
-   l = s->GetFirstCoherentFileList();
-   for (std::vector<gdcm::File* >::iterator it =  l->begin();
+   l = s->GetFirstSingleSerieUIDFileSet();
+   for (std::vector<GDCM_NAME_SPACE::File* >::iterator it =  l->begin();
                                             it != l->end();
                                           ++it)
    {
@@ -87,7 +87,7 @@ int TestSerieHelper(int argc, char *argv[])
    } 
      
 
-   delete s;
+   s->Delete();
 
    return 0;
 }