]> Creatis software - gdcm.git/blobdiff - Testing/TestFileAccessors.cxx
use GDCM_NAME_SPACE:: instead of gdcm::, even in Examples ...
[gdcm.git] / Testing / TestFileAccessors.cxx
index 0318eda06b89ab84c91c03ad092fc44d5b2068b1..a685a593f6d89729f9f062b493f7e17e02f8715c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestFileAccessors.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/04/07 10:58:51 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/09/15 15:49:21 $
+  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
@@ -58,8 +58,9 @@ int TestFileAccessors(int argc, char *argv[])
    int i = 0;
 
    float iop[6];
+   float ipp[3];
 
-  // gdcm::Debug::DebugOn();
+  // GDCM_NAME_SPACE::Debug::DebugOn();
    
    while( gdcmDataImages[i] != 0 )
    {
@@ -68,9 +69,9 @@ int TestFileAccessors(int argc, char *argv[])
      // for all the OS.
      
      // if (gdcmDataImages[i] == "00191113.dcm" )
-     //    gdcm::Debug::DebugOn();
+     //    GDCM_NAME_SPACE::Debug::DebugOn();
      // else
-     //    gdcm::Debug::DebugOff();
+     //    GDCM_NAME_SPACE::Debug::DebugOff();
 
       std::string filename;      
       if (argc ==2)
@@ -87,7 +88,7 @@ int TestFileAccessors(int argc, char *argv[])
       std::cout << " ----------------------------------------------"
                 << "Begin with " << filename << std::endl;
 
-      gdcm::File *f= gdcm::File::New( );
+      GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( );
       f->SetFileName( filename );
       f->Load( );
 
@@ -138,12 +139,17 @@ int TestFileAccessors(int argc, char *argv[])
       std::cout << "   Orientation:" << std::endl;
       for (int j=0; j<6; j++)
          std::cout << "      iop[" << j << "] = " << iop[j] << std::endl;
+      f->GetImagePositionPatient( ipp );
+      std::cout << "   Position:" << std::endl;
+      for (int j2=0; j2<3; j2++)
+         std::cout << "      ipp[" << j2 << "] = " << ipp[j2] << std::endl; 
 
       if( f->IsReadable() )
       {
          std::cout << "   " << filename << " is Readable" << std::endl;
 
-         gdcm::FileHelper *fh= gdcm::FileHelper::New( f );   
+         GDCM_NAME_SPACE::FileHelper *fh= GDCM_NAME_SPACE::FileHelper::New( f );   
 
          TestMethodMacro(std::dec,fh,GetImageDataSize)
          TestMethodMacro(std::dec,fh,GetImageDataRawSize)