]> Creatis software - gdcm.git/blobdiff - Testing/TestLoadAllDocumentsNoPrivNoSeq.cxx
use GDCM_NAME_SPACE:: instead of gdcm::, even in Examples ...
[gdcm.git] / Testing / TestLoadAllDocumentsNoPrivNoSeq.cxx
index 1ebb32ba3ab964103b68f2ff25a54f83a20467dd..187f4cb5ea920d07509fce3c988e131a1ce29364 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestLoadAllDocumentsNoPrivNoSeq.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/09/22 08:41:27 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/09/15 15:49:21 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #include "gdcmFile.h"
 #include "gdcmUtil.h"
 #include "gdcmCommon.h"
-#include "gdcmBinEntry.h"  
 #include "gdcmDocEntry.h" 
 #include "gdcmDocEntrySet.h"           
 #include "gdcmDocument.h"          
 #include "gdcmElementSet.h"        
 #include "gdcmSeqEntry.h" 
 #include "gdcmSQItem.h" 
-#include "gdcmValEntry.h" 
 #include "gdcmOrientation.h"
+
 #include <fstream>
 #include <iostream>
 #include <iomanip> // for std::ios::left, ...
@@ -47,18 +46,18 @@ int TestLoadAllDocumentsNoPrivNoSeq(int, char *[])
    //int swapC;
    //unsigned int j;
    std::string pixelType, photomInterp;
-   int l;
-   l = strlen("PALETTE COLOR ");
+   //int l;
+   //l = strlen("PALETTE COLOR ");
    while( gdcmDataImages[i] != 0 )
    {
       std::string filename = GDCM_DATA_ROOT;
       filename += "/";  //doh!
       filename += gdcmDataImages[i];
 
-      gdcm::File *f= new gdcm::File( );
+      GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( );
       f->SetFileName( filename );
       // just to improve coverage
-      f->SetLoadMode (gdcm::LD_NOSEQ|gdcm::LD_NOSHADOW);
+      f->SetLoadMode (GDCM_NAME_SPACE::LD_NOSEQ|GDCM_NAME_SPACE::LD_NOSHADOW);
       f->Load();
 
 /*
@@ -104,9 +103,9 @@ int TestLoadAllDocumentsNoPrivNoSeq(int, char *[])
 
       std::string strImageOrientationPatient = 
                                           f->GetEntryValue(0x0020,0x0037);
-      if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND )
+      if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND )
       {
-         gdcm::Orientation o;
+         GDCM_NAME_SPACE::Orientation o;
          double orient = o.TypeOrientation( f );
          std::cout << " ---------------------- Orientation " << orient
                    << std::endl;
@@ -121,11 +120,11 @@ int TestLoadAllDocumentsNoPrivNoSeq(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;