]> Creatis software - gdcm.git/blobdiff - Testing/TestSerieHelper.cxx
Add IsParsable() method, to avoid confusion with IsReadable()
[gdcm.git] / Testing / TestSerieHelper.cxx
index f3a101a0916034f47bde5d91f35aa2254b0d5644..77bd81d4d4da819a6150b9d541abc078c4f59567 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestSerieHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/08/30 15:13:07 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/11/14 15:56:55 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -38,7 +38,7 @@ int TestSerieHelper(int argc, char *argv[])
   
    std::cout << "Dir Name :[" << dirName << "]" << std::endl;
 
-   s = new gdcm::SerieHelper();
+   s = gdcm::SerieHelper::New();
    s->SetLoadMode(gdcm::LD_ALL);     // Load everything for each File
    //s->AddRestriction(tagKey, valueToCheck); // Keep only files where
                                               // restriction is true
@@ -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::Serie
+   gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet();
    while (l)
    { 
       nbFiles = l->size() ;
@@ -61,21 +61,21 @@ 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();
+   l = s->GetFirstSingleSerieUIDFileSet();
    for (std::vector<gdcm::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;
 }