X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestAllReadCompareDicom.cxx;h=23563114b754b500921f210be3d6f65b8bc96472;hb=04f3bbda36168ed865e04de8b94d2c60206f962a;hp=56f5646b85814d3ae0bbb79aa6b1cabc31154077;hpb=de5fc413dc579fc61f7e04397efd1dc1087fe3cf;p=gdcm.git diff --git a/Testing/TestAllReadCompareDicom.cxx b/Testing/TestAllReadCompareDicom.cxx index 56f5646b..23563114 100644 --- a/Testing/TestAllReadCompareDicom.cxx +++ b/Testing/TestAllReadCompareDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllReadCompareDicom.cxx,v $ Language: C++ - Date: $Date: 2005/04/19 10:05:36 $ - Version: $Revision: 1.39 $ + 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 @@ -18,6 +18,8 @@ #include "gdcmDirList.h" #include "gdcmFile.h" #include "gdcmFileHelper.h" +#include "gdcmGlobal.h" +#include "gdcmTS.h" #include @@ -110,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; @@ -502,11 +505,34 @@ int InternalTest(std::string const &filename, testedDataSize) != 0 ) { (void)res; + std::string ts = tested->GetFile()->GetTransferSyntax(); + std::cout << " Failed" << std::endl << " pixel (" << PixelType << ") differ (as expanded in memory)." + << std::endl + << " compression : " + << gdcm::Global::GetTS()->GetValue(ts) << std::endl; + + std::cout << " list of the first " << MAX_NUMBER_OF_DIFFERENCE + << " pixels differing (pos : test - ref) :" << std::endl; + int i; + unsigned int j; + for(i=0, j=0;i