- // 0020 000e UI REL Series Instance UID
- std::string uid = header->GetEntryValue (0x0020, 0x000e);
- // if uid == GDCM_UNFOUND then consistently we should find GDCM_UNFOUND
- // no need here to do anything special
+ int allrules = 1;
+ // First step the user has defined s set of rules for the DICOM he is looking for
+ // make sure the file correspond to his set of rules:
+ for(SerieRestrictions::iterator it = Restrictions.begin();
+ it != Restrictions.end();
+ ++it)
+ {
+ const Rule &r = *it;
+ const std::string s;// = header->GetEntryValue( r.first );
+ if( !Util::DicomStringEqual(s, r.second.c_str()))
+ {
+ // Argh ! This rule is unmatch let's just quit
+ allrules = 0;
+ break;
+ }
+ }
+ if( allrules ) // all rules are respected:
+ {
+ // Alright ! we have a found a DICOM that match the user expectation.
+ // Let's add it !
+
+ // 0020 000e UI REL Series Instance UID
+ const std::string &uid = header->GetEntryValue (0x0020, 0x000e);
+ // if uid == GDCM_UNFOUND then consistently we should find GDCM_UNFOUND
+ // no need here to do anything special