Program: gdcm
Module: $RCSfile: TestAllVM.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:30 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2006/07/05 13:08:32 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
gdcm::DocEntry *d = file->GetFirstEntry();
std::cerr << "Testing file : " << filename << std::endl;
+ gdcm::DataEntry *de;
while(d)
{
- if ( gdcm::DataEntry *de = dynamic_cast<gdcm::DataEntry *>(d) )
+ if ( (de = dynamic_cast<gdcm::DataEntry *>(d)) )
{
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
std::string filename = GDCM_DATA_ROOT;
filename += "/";
filename += gdcmDataImages[i];
+
+ if (!strcmp(gdcmDataImages[i],"00191113.dcm")) // Track bug on Darwin
+ gdcm::Debug::DebugOn();
+ else
+ gdcm::Debug::DebugOff();
if( DoTheVMTest( filename ) )
return 1;