Mercurial > hg > orthanc
changeset 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 | e5fc5db6a84b |
children | 09cce85735b9 |
files | OrthancServer/DicomProtocol/DicomUserConnection.cpp OrthancServer/ServerEnumerations.cpp OrthancServer/ServerEnumerations.h Resources/Configuration.json UnitTestsSources/UnitTestsMain.cpp |
diffstat | 5 files changed, 46 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp Thu Jul 13 11:42:14 2017 +0200 +++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp Thu Jul 13 12:37:55 2017 +0200 @@ -484,27 +484,29 @@ static ParsedDicomFile* ConvertQueryFields(const DicomMap& fields, ModalityManufacturer manufacturer) { + // Fix outgoing C-Find requests + // issue for Syngo.Via and its solution was reported by + // Emsy Chan by private mail on 2015-06-17. According to + // Robert van Ommen (2015-11-30), the same fix is required for + // Agfa Impax. + // solutions was generalized for generic manufacturer since it seems to affect PhilipsADW, GEWAServer as well (check issue #31) + switch (manufacturer) { - case ModalityManufacturer_AgfaImpax: - case ModalityManufacturer_SyngoVia: + case ModalityManufacturer_GenericNoWildcardInDates: + case ModalityManufacturer_GenericNoWildcards: { std::auto_ptr<DicomMap> fix(fields.Clone()); - // This issue for Syngo.Via and its solution was reported by - // Emsy Chan by private mail on 2015-06-17. According to - // Robert van Ommen (2015-11-30), the same fix is required for - // Agfa Impax. std::set<DicomTag> tags; fix->GetTags(tags); for (std::set<DicomTag>::const_iterator it = tags.begin(); it != tags.end(); ++it) { - if (FromDcmtkBridge::LookupValueRepresentation(*it) == ValueRepresentation_Date) + // Replace a "*" query by an empty query ("") for "date" or "all" value representations depending on the manufacturer. + if ((manufacturer == ModalityManufacturer_GenericNoWildcards) + || (manufacturer == ModalityManufacturer_GenericNoWildcardInDates && FromDcmtkBridge::LookupValueRepresentation(*it) == ValueRepresentation_Date)) { - // Replace a "*" query by an empty query ("") for "date" - // value representations. Necessary to search over dates - // in Syngo.Via. const DicomValue* value = fix->TestAndGetValue(*it); if (value != NULL &&
--- a/OrthancServer/ServerEnumerations.cpp Thu Jul 13 11:42:14 2017 +0200 +++ b/OrthancServer/ServerEnumerations.cpp Thu Jul 13 12:37:55 2017 +0200 @@ -325,24 +325,21 @@ case ModalityManufacturer_Generic: return "Generic"; + case ModalityManufacturer_GenericNoWildcardInDates: + return "GenericNoWildcardInDates"; + + case ModalityManufacturer_GenericNoWildcards: + return "GenericNoWildcards"; + case ModalityManufacturer_StoreScp: return "StoreScp"; case ModalityManufacturer_ClearCanvas: return "ClearCanvas"; - case ModalityManufacturer_MedInria: - return "MedInria"; - case ModalityManufacturer_Dcm4Chee: return "Dcm4Chee"; - case ModalityManufacturer_SyngoVia: - return "SyngoVia"; - - case ModalityManufacturer_AgfaImpax: - return "AgfaImpax"; - case ModalityManufacturer_Vitrea: return "Vitrea"; @@ -389,6 +386,14 @@ { return ModalityManufacturer_Generic; } + else if (manufacturer == "GenericNoWildcardInDates") + { + return ModalityManufacturer_GenericNoWildcardInDates; + } + else if (manufacturer == "GenericNoWildcards") + { + return ModalityManufacturer_GenericNoWildcards; + } else if (manufacturer == "ClearCanvas") { return ModalityManufacturer_ClearCanvas; @@ -397,27 +402,20 @@ { return ModalityManufacturer_StoreScp; } - else if (manufacturer == "MedInria") - { - return ModalityManufacturer_MedInria; - } else if (manufacturer == "Dcm4Chee") { return ModalityManufacturer_Dcm4Chee; } - else if (manufacturer == "SyngoVia") - { - return ModalityManufacturer_SyngoVia; - } - else if (manufacturer == "AgfaImpax") - { - return ModalityManufacturer_AgfaImpax; - } else if (manufacturer == "Vitrea") { return ModalityManufacturer_Vitrea; } - else if (manufacturer == "EFilm2") + else if (manufacturer == "AgfaImpax" || manufacturer == "SyngoVia") + { + LOG(WARNING) << "The " << manufacturer << " manufacturer is obsolete since Orthanc 1.2.1. To guarantee compatibility with future Orthanc version, you should use \"GenericNoWildcardInDates\" instead in your configuration file."; + return ModalityManufacturer_GenericNoWildcardInDates; + } + else if (manufacturer == "EFilm2" || manufacturer == "MedInria") { LOG(WARNING) << "The " << manufacturer << " manufacturer is obsolete since Orthanc 1.2.1. To guarantee compatibility with future Orthanc version, you should remove it from your configuration file.";
--- a/OrthancServer/ServerEnumerations.h Thu Jul 13 11:42:14 2017 +0200 +++ b/OrthancServer/ServerEnumerations.h Thu Jul 13 12:37:55 2017 +0200 @@ -59,12 +59,11 @@ enum ModalityManufacturer { ModalityManufacturer_Generic, + ModalityManufacturer_GenericNoWildcardInDates, + ModalityManufacturer_GenericNoWildcards, ModalityManufacturer_StoreScp, ModalityManufacturer_ClearCanvas, - ModalityManufacturer_MedInria, ModalityManufacturer_Dcm4Chee, - ModalityManufacturer_SyngoVia, - ModalityManufacturer_AgfaImpax, ModalityManufacturer_Vitrea };
--- a/Resources/Configuration.json Thu Jul 13 11:42:14 2017 +0200 +++ b/Resources/Configuration.json Thu Jul 13 12:37:55 2017 +0200 @@ -158,9 +158,11 @@ /** * A fourth parameter is available to enable patches for a * specific PACS manufacturer. The allowed values are currently - * "Generic" (default value), "StoreScp" (storescp tool from - * DCMTK), "ClearCanvas", "MedInria", "Dcm4Chee", "SyngoVia", - * "AgfaImpax" (Agfa IMPAX), and "Vitrea". + * "Generic" (default value), + * "GenericNoWildcardInDates" (to replace '*' by '' in date fields in outgoing C-Find) + * "GenericNoWildcards" (to replace '*' by '' in all fields in outgoing C-Find) + * "StoreScp" (storescp tool from DCMTK), + * "ClearCanvas", "Dcm4Chee" and "Vitrea". * This parameter is case-sensitive. **/ // "clearcanvas" : [ "CLEARCANVAS", "192.168.1.1", 104, "ClearCanvas" ]
--- a/UnitTestsSources/UnitTestsMain.cpp Thu Jul 13 11:42:14 2017 +0200 +++ b/UnitTestsSources/UnitTestsMain.cpp Thu Jul 13 12:37:55 2017 +0200 @@ -527,14 +527,17 @@ ASSERT_EQ(2047, StringToMetadata("Ceci est un test")); ASSERT_STREQ("Generic", EnumerationToString(StringToModalityManufacturer("Generic"))); + ASSERT_STREQ("GenericNoWildcardInDates", EnumerationToString(StringToModalityManufacturer("GenericNoWildcardInDates"))); + ASSERT_STREQ("GenericNoWildcards", EnumerationToString(StringToModalityManufacturer("GenericNoWildcards"))); ASSERT_STREQ("StoreScp", EnumerationToString(StringToModalityManufacturer("StoreScp"))); ASSERT_STREQ("ClearCanvas", EnumerationToString(StringToModalityManufacturer("ClearCanvas"))); - ASSERT_STREQ("MedInria", EnumerationToString(StringToModalityManufacturer("MedInria"))); ASSERT_STREQ("Dcm4Chee", EnumerationToString(StringToModalityManufacturer("Dcm4Chee"))); - ASSERT_STREQ("SyngoVia", EnumerationToString(StringToModalityManufacturer("SyngoVia"))); - ASSERT_STREQ("AgfaImpax", EnumerationToString(StringToModalityManufacturer("AgfaImpax"))); - ASSERT_STREQ("EFilm2", EnumerationToString(StringToModalityManufacturer("EFilm2"))); ASSERT_STREQ("Vitrea", EnumerationToString(StringToModalityManufacturer("Vitrea"))); + // backward compatibility tests (to remove once we make these manufacturer really obsolete) + ASSERT_STREQ("Generic", EnumerationToString(StringToModalityManufacturer("MedInria"))); + ASSERT_STREQ("Generic", EnumerationToString(StringToModalityManufacturer("EFilm2"))); + ASSERT_STREQ("GenericNoWildcardInDates", EnumerationToString(StringToModalityManufacturer("SyngoVia"))); + ASSERT_STREQ("GenericNoWildcardInDates", EnumerationToString(StringToModalityManufacturer("AgfaImpax"))); }