]> Creatis software - gdcm.git/blobdiff - Testing/TestPrintAllDocument.cxx
ENH: Patient Birthday is of type VR=DA
[gdcm.git] / Testing / TestPrintAllDocument.cxx
index 76215a247570bd4b0402b3f650865564a1b44409..165518018a1736d6403089c274d040e32dbee52b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestPrintAllDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 08:35:46 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2006/01/19 11:00:28 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -53,7 +53,7 @@ int TestPrintAllDocument(int, char *[])
       filename += "/";  //doh!
       filename += gdcmDataImages[i];
 
-      gdcm::File *f= new gdcm::File( );
+      gdcm::File *f= gdcm::File::New( );
       f->SetFileName( filename );
       f->Load();
 
@@ -101,10 +101,12 @@ int TestPrintAllDocument(int, char *[])
                                           f->GetEntryString(0x0020,0x0037);
       if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND )
       {
-         gdcm::Orientation o;
-         gdcm::OrientationType orient = o.GetOrientationType( f );
+         gdcm::Orientation *o = gdcm::Orientation::New();
+         gdcm::OrientationType orient = o->GetOrientationType( f );
          std::cout << " ---------------------- Orientation " << orient
                    << std::endl;
+         o->Delete(); 
       }
 
       if( f->IsReadable() )
@@ -116,10 +118,10 @@ int TestPrintAllDocument(int, char *[])
       {
          std::cout << filename << " is NOT Readable" 
                    << std::endl << std::endl;
-         delete f;
+         f->Delete();
          return 1;
       }
-      delete f;
+      f->Delete();
       i++;
    }
    return 0;