]> Creatis software - gdcm.git/blobdiff - Testing/TestAllReadCompareDicom.cxx
First stage of name normalisation : gdcm::File replace by gdcm::FileHelper
[gdcm.git] / Testing / TestAllReadCompareDicom.cxx
index d31b1f40cd04fb68f23589a2de8533f90fbff107..aba924629643210b6c633898e0368204df8b3c90 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllReadCompareDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:43:36 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/01/20 16:16:59 $
+  Version:   $Revision: 1.24 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 #include <iostream>
 #include <fstream>
@@ -31,7 +31,7 @@ int InternalTest(std::string const & filename,
 
       ////// Step 1:
       std::cout << "      1...";
-      gdcm::File* tested = new gdcm::File( filename );
+      gdcm::FileHelper* tested = new gdcm::FileHelper( filename );
       if( !tested->GetHeader()->IsReadable() )
       {
         std::cout << " Failed" << std::endl
@@ -65,7 +65,7 @@ int InternalTest(std::string const & filename,
       ////// When reference file is not gdcm readable test is failed:
       std::cout << "3a...";
 
-      gdcm::File* reference = new gdcm::File( referenceFileName );
+      gdcm::FileHelper* reference = new gdcm::FileHelper( referenceFileName );
       if( !reference->GetHeader()->IsReadable() )
       {
          std::cout << " Failed" << std::endl
@@ -77,6 +77,8 @@ int InternalTest(std::string const & filename,
          return 1;
       }
 
+      std::string PixelType = reference->GetHeader()->GetPixelType();
+
       ////// Step 3b:
       std::cout << "3b...";
       int testedDataSize    = tested->GetImageDataSize();
@@ -107,7 +109,9 @@ int InternalTest(std::string const & filename,
       if (testedDataSize != referenceDataSize)
       {
          std::cout << " Failed" << std::endl
-                   << "        pixel areas lengths differ: "
+                   << "        pixel ("
+                   << PixelType
+                   <<") areas lengths differ: "
                    << testedDataSize << " # " << referenceDataSize
                    << std::endl;
          delete tested;
@@ -121,7 +125,9 @@ int InternalTest(std::string const & filename,
       {
          (void)res;
          std::cout << " Failed" << std::endl
-                   << "        pixel differ (as expanded in memory)."
+                   << "        pixel (" 
+                   << PixelType
+                   << ") differ (as expanded in memory)."
                    << std::endl;
          delete tested;
          delete reference;