]> Creatis software - gdcm.git/commitdiff
Add verbosity
authorjpr <jpr>
Thu, 22 Sep 2005 14:45:11 +0000 (14:45 +0000)
committerjpr <jpr>
Thu, 22 Sep 2005 14:45:11 +0000 (14:45 +0000)
Example/PrintFile.cxx
Example/TestCopyDicom.cxx

index 8d7bfc077d384d6afb46960dd5970b6fa124c882..5ed9c729e4120278a5db4553abb06151343adf87 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/09/16 16:45:33 $
-  Version:   $Revision: 1.57 $
+  Date:      $Date: 2005/09/22 14:45:11 $
+  Version:   $Revision: 1.58 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -300,13 +300,19 @@ int main(int argc, char *argv[])
 
       std::string strImageOrientationPatient = 
                                       f->GetEntryValue(0x0020,0x0037);
+      gdcm::Orientation o;
+
       if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND )
       {
-         gdcm::Orientation o;
          double orient = o.TypeOrientation( f );
-         std::cout << " ---------------------- Orientation " << orient
+         std::cout << " ---------------------- Type Orientation " << orient
                    << std::endl;
       }
+
+      std::string ori = o.GetOrientation ( f );
+      if (ori != gdcm::GDCM_UNFOUND )
+         std::cout << "Orientation [" << ori << "]" << std::endl;
+
       // Display the LUT as an int array (for debugging purpose)
       if ( f->HasLUT() && showlut )
       {
@@ -456,6 +462,10 @@ int main(int argc, char *argv[])
          fh->SetPrintLevel( level );
 
          fh->Print();
+         gdcm::Orientation o;
+         std::string ori = o.GetOrientation ( f );
+         if (ori != gdcm::GDCM_UNFOUND )
+            std::cout << "Orientation [" << ori << "]" << std::endl;
 
          if (f->IsReadable())
             std::cout <<std::endl<<it->c_str()<<" is Readable"<<std::endl;
index e292ade4be02dc05421661d9f66cdb58e11e0464..9916f6a44108ae5111390d5e56f9c1829d1640ce 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/09/21 13:05:40 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2005/09/22 14:45:11 $
+  Version:   $Revision: 1.29 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -97,10 +97,14 @@ int main(int argc, char *argv[])
       //size_t dataSize;
       uint8_t *imageData;
       //dataSize = original->GetImageDataSize();// just an accesor :useless here
-      imageData = original->GetImageData();
-      (void)imageData; // no enough to avoid warning on 'Golgot'
-      //(void)dataSize;
+      
+      imageData = original->GetImageData(); // VERY important : 
+                                      // brings pixels in memory !
+      //(void)imageData; // not enough to avoid warning with icc compiler
+      //(void)dataSize; //  not enough to avoid warning on 'Golgot'
   
+      std::cout << imageData << std::endl; // to avoid warning ?
+
       //First of all copy the header field by field
 
       gdcm::DocEntry *d = original->GetFile()->GetFirstEntry();