]> Creatis software - gdcm.git/blobdiff - Testing/TestAllVM.cxx
* Fix compilation error due to the introduction of the CommandManager
[gdcm.git] / Testing / TestAllVM.cxx
index 3dc460c395514430c33a499e3e796cbefe9c081a..88b7930504cd5042427abddd6eb79740d7bdc2de 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllVM.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/25 14:52:30 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/11/21 11:31:06 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -43,13 +43,17 @@ int DoTheVMTest(std::string const &filename)
          if ( !(de->GetGroup() % 2) ) // Don't check shadow elements. Righ now,
                                       // Private Dictionnary are not dealt with
          {    
-            if( !de->IsValueCountValid() )
-            {
-               std::cerr << "Element: " << de->GetKey() <<
+            // We know OB and OW VM is always 1, whatever the actual
+            //  found value is.
+     
+            if (de->GetVR() != "OB" && de->GetVR() != "OW" )
+               if( !de->IsValueCountValid() )
+               {
+                  std::cerr << "Element: " << de->GetKey() <<
                     " (" << de->GetName() << ") " <<
                     "Contains a wrong VM: " << de->GetValueCount() 
                     << " should be: " << de->GetVM() << std::endl;;
-            }
+               }
          }
       }
       else
@@ -80,6 +84,11 @@ int TestAllVM(int argc, char *argv[])
       std::string filename = GDCM_DATA_ROOT;
       filename += "/";
       filename += gdcmDataImages[i];
+      
+      if (gdcmDataImages[i] == "00191113.dcm") // Track bug on Darwin
+          gdcm::Debug::DebugOn();
+      else
+         gdcm::Debug::DebugOff();
 
       if( DoTheVMTest( filename ) )
         return 1;