]> Creatis software - gdcm.git/blobdiff - Testing/TestAllReadCompareDicom.cxx
ENH: Fix compilation on mingw32, also minor cleanup gdcm compilation will fail right...
[gdcm.git] / Testing / TestAllReadCompareDicom.cxx
index f00906cfcfe53abca96129974ed0a4fd297c4f9b..1ac5df48b66e32f8d898eb8e5bee8de3c814ccea 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllReadCompareDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/05/02 17:51:57 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/07/06 09:53:43 $
+  Version:   $Revision: 1.43 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,6 +20,7 @@
 #include "gdcmFileHelper.h"
 #include "gdcmGlobal.h"
 #include "gdcmTS.h"
+#include "gdcmDebug.h"
 
 #include <iostream>
 
@@ -515,9 +516,11 @@ int InternalTest(std::string const &filename,
                    << "        compression : " 
                    << gdcm::Global::GetTS()->GetValue(ts) << std::endl;
 
-         std::cout << "        list of pixels differing (pos : test - ref) :" 
+         std::cout << "        list of the first " << MAX_NUMBER_OF_DIFFERENCE
+                   << " pixels differing (pos : test - ref) :" 
                    << std::endl;
-         int i,j;
+         int i;
+         unsigned int j;
          for(i=0, j=0;i<testedDataSize && j<MAX_NUMBER_OF_DIFFERENCE;i++)
          {
             if(testedImageData[i]!=referenceImageData[i])
@@ -547,7 +550,10 @@ int InternalTest(std::string const &filename,
 
 int TestAllReadCompareDicom(int argc, char *argv[]) 
 {
-   if ( argc == 3 )
+   if (argc == 4)
+      gdcm::Debug::DebugOn();
+
+   if ( argc >= 3 )
    {
       // The test is specified a specific filename, use it instead of looping
       // over all images
@@ -555,7 +561,7 @@ int TestAllReadCompareDicom(int argc, char *argv[])
       const std::string reference = argv[2];
       return InternalTest( input, reference );
    }
-   else if ( argc > 3 || argc == 2 )
+   else if ( argc > 4 || argc == 2 )
    {
       std::cerr << "   Usage: " << argv[0]
                 << " (no arguments needed)." << std::endl;