]> Creatis software - gdcm.git/blobdiff - Example/TestFromScratch.cxx
BUG: Revert to revision 1.99 because current version was breaking on Win32/Vs6 system...
[gdcm.git] / Example / TestFromScratch.cxx
index f7293996266db4a8de47fe44fd322591a0dccbcd..e9760b86cc997558a3f98b031c05b72e0af57d64 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestFromScratch.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/07 16:26:11 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2005/01/14 11:28:28 $
+  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
@@ -36,7 +36,8 @@ int main(int argc, char *argv[])
    }
 
    // Doesn't seems to do anything:
-   gdcm::Debug::SetDebugLevel(-1);
+   gdcm::Debug::SetDebugOn();
+
    // Doesn't link properly:
    //gdcm::Debug::GetReference().SetDebug(1);
 
@@ -53,10 +54,9 @@ int main(int argc, char *argv[])
    // Hopefully default to something
    gdcm::Header *h2 = new gdcm::Header();
 
-   h1->Initialize();
-   gdcm::DocEntry* d = h1->GetNextEntry();
-
    // Copy of the header content
+   h1->InitTraversal();
+   gdcm::DocEntry* d = h1->GetNextEntry();
    while(d)
    {
       if ( gdcm::ValEntry* v = dynamic_cast<gdcm::ValEntry*>(d) )
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
          // Do not bother with field from private dict
          if( v->GetName() != "gdcm::Unknown" )
          {  
-            h2->ReplaceOrCreateByNumber
+            h2->ReplaceOrCreate( 
                               v->GetValue(),
                               v->GetGroup(), 
                               v->GetElement(),