comparison OrthancServer/DicomProtocol/DicomUserConnection.cpp @ 2319:ae6245053bcf

made some manufacturer obsolete: MedInria (that was not used), Syngovia & AgfaImpax (replaced by GenericNoWildcardInDates) + added 'GenericNoWildcards'
author amazy
date Thu, 13 Jul 2017 12:37:55 +0200
parents a3a65de1840f
children 174c3616ab6d
comparison
equal deleted inserted replaced
2318:e5fc5db6a84b 2319:ae6245053bcf
482 482
483 483
484 static ParsedDicomFile* ConvertQueryFields(const DicomMap& fields, 484 static ParsedDicomFile* ConvertQueryFields(const DicomMap& fields,
485 ModalityManufacturer manufacturer) 485 ModalityManufacturer manufacturer)
486 { 486 {
487 // Fix outgoing C-Find requests
488 // issue for Syngo.Via and its solution was reported by
489 // Emsy Chan by private mail on 2015-06-17. According to
490 // Robert van Ommen (2015-11-30), the same fix is required for
491 // Agfa Impax.
492 // solutions was generalized for generic manufacturer since it seems to affect PhilipsADW, GEWAServer as well (check issue #31)
493
487 switch (manufacturer) 494 switch (manufacturer)
488 { 495 {
489 case ModalityManufacturer_AgfaImpax: 496 case ModalityManufacturer_GenericNoWildcardInDates:
490 case ModalityManufacturer_SyngoVia: 497 case ModalityManufacturer_GenericNoWildcards:
491 { 498 {
492 std::auto_ptr<DicomMap> fix(fields.Clone()); 499 std::auto_ptr<DicomMap> fix(fields.Clone());
493 500
494 // This issue for Syngo.Via and its solution was reported by
495 // Emsy Chan by private mail on 2015-06-17. According to
496 // Robert van Ommen (2015-11-30), the same fix is required for
497 // Agfa Impax.
498 std::set<DicomTag> tags; 501 std::set<DicomTag> tags;
499 fix->GetTags(tags); 502 fix->GetTags(tags);
500 503
501 for (std::set<DicomTag>::const_iterator it = tags.begin(); it != tags.end(); ++it) 504 for (std::set<DicomTag>::const_iterator it = tags.begin(); it != tags.end(); ++it)
502 { 505 {
503 if (FromDcmtkBridge::LookupValueRepresentation(*it) == ValueRepresentation_Date) 506 // Replace a "*" query by an empty query ("") for "date" or "all" value representations depending on the manufacturer.
507 if ((manufacturer == ModalityManufacturer_GenericNoWildcards)
508 || (manufacturer == ModalityManufacturer_GenericNoWildcardInDates && FromDcmtkBridge::LookupValueRepresentation(*it) == ValueRepresentation_Date))
504 { 509 {
505 // Replace a "*" query by an empty query ("") for "date"
506 // value representations. Necessary to search over dates
507 // in Syngo.Via.
508 const DicomValue* value = fix->TestAndGetValue(*it); 510 const DicomValue* value = fix->TestAndGetValue(*it);
509 511
510 if (value != NULL && 512 if (value != NULL &&
511 !value->IsNull() && 513 !value->IsNull() &&
512 value->GetContent() == "*") 514 value->GetContent() == "*")