- if ( gdcm::BinEntry *b = dynamic_cast<gdcm::BinEntry*>(d) )
- {
-// copyH->InsertBinEntry( b->GetBinArea(),b->GetLength(),
-// b->GetGroup(),b->GetElement(),
-// b->GetVR() );
- (void)b;
- }
- else if ( gdcm::ValEntry *v = dynamic_cast<gdcm::ValEntry*>(d) )
- {
- if ( !CheckVM(v) )
+ grHT[d->GetGroup()] = 0;
+ d=input->GetNextEntry();
+ }
+ for (GroupHT::iterator it = grHT.begin(); it != grHT.end(); ++it)
+ {
+ std::cout << std::hex << it->first << std::endl;
+ }
+*/
+
+ // berk for now SetInput do two things at the same time
+ d=input->GetFirstEntry();
+ if (!d)
+ {
+ std::cout << "No Entry found" << std::endl;
+ return;
+ }
+ while(d)
+ {
+ if ( DataEntry *v = dynamic_cast<DataEntry *>(d) )
+ {
+ if ( v->GetVM() != gdcm::GDCM_UNKNOWN )
+ if ( !CheckVM(v) )
+ {
+ if (v->GetVM() == "FIXME" )
+ std::cout << "For Tag " << v->GetKey() << " VM = ["
+ << v->GetVM() << "]" << std::endl;
+
+ std::cout << "Tag (" << v->GetKey()
+ << ")-> [" << v->GetName() << "] VR :" << v->GetVR()
+ << " contains an illegal VM. Expected VM :["
+ << v->GetVM() << "], value [" << v->GetString() << "]"
+ << std::endl;
+ }
+
+ if ( v->GetReadLength() % 2 )