]> Creatis software - gdcm.git/blobdiff - Testing/TestAllReadCompareDicom.cxx
BUG: Fix previously instroduce cmake bug, now should compile fine even without VTK...
[gdcm.git] / Testing / TestAllReadCompareDicom.cxx
index e3212a8500d8e324459ea0b9014bfd7683a51334..23563114b754b500921f210be3d6f65b8bc96472 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllReadCompareDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/04/27 09:14:06 $
-  Version:   $Revision: 1.40 $
+  Date:      $Date: 2005/05/02 17:56:44 $
+  Version:   $Revision: 1.42 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -112,9 +112,10 @@ private:
    static const unsigned int HEADER_SIZE;
 };
 
+const unsigned int MAX_NUMBER_OF_DIFFERENCE = 10;
 const unsigned int TestFile::HEADER_SIZE = 20;
 
-TestFile::TestFile(void)
+TestFile::TestFile()
 {
    fileName = "";
    readable=false;
@@ -514,15 +515,21 @@ 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;
-         for(int i=0;i<testedDataSize;i++)
+         int i;
+         unsigned int j;
+         for(i=0, j=0;i<testedDataSize && j<MAX_NUMBER_OF_DIFFERENCE;i++)
          {
             if(testedImageData[i]!=referenceImageData[i])
+              {
                std::cout << std::hex << "(" << i << " : " 
                          << std::hex << (int)(testedImageData[i]) << " - "
                          << std::hex << (int)(referenceImageData[i]) << ") "
                          << std::dec;
+               ++j;
+              }
          }
          std::cout << std::endl;