]> Creatis software - gdcm.git/blobdiff - Testing/TestPrintAllDocument.cxx
Hope there will be less compile errors, under msvc6 ...
[gdcm.git] / Testing / TestPrintAllDocument.cxx
index 9d8efd81fb266db207d35738b32ee2a7fbcd7b41..5b8db1d62cacd719bbe5f11cdbde9ecaa78567e6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestPrintAllDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/06/21 14:59:06 $
-  Version:   $Revision: 1.14 $
+  Date:      $Date: 2007/06/22 11:01:58 $
+  Version:   $Revision: 1.17 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -45,7 +45,7 @@ int TestPrintAllDocument(int argc, char *argv[])
    int swapC;
    unsigned int j;
    std::string pixelType, photomInterp;
-   int l;
+   unsigned int l;
    l = strlen("PALETTE COLOR ");
    
    //gdcm::Debug::DebugOn();
@@ -94,11 +94,13 @@ int TestPrintAllDocument(int argc, char *argv[])
          std::cout << " ";
       std::cout << " Smpl.P.Pix.="          << f->GetSamplesPerPixel()
                 << " Plan.Config.="         << f->GetPlanarConfiguration();
+
       photomInterp =  f->GetEntryString(0x0028,0x0004);               
-      std::cout << " Photom.Interp.="       << photomInterp;
-      for (j=0; j<l-photomInterp.length(); j++)
-         std::cout << " ";
+      std::cout << " Photom.Interp.="       << photomInterp << " l : " << l <<"length : " << photomInterp.length()<< std::endl;
+      
+      if (l > photomInterp.length())
+        for (j=0; j<l-photomInterp.length(); j++)
+           std::cout << " ";
  
       std::cout << " TransferSyntaxName= [" << f->GetTransferSyntaxName() << "]" ;