# HG changeset patch # User Sebastien Jodogne # Date 1539852491 -7200 # Node ID 3fabf9a673f65628842a03867470a6d6302e4577 # Parent da43ef7ff32a079798934cbddebe12072ae8e387# Parent f5ce33d3295c4735f65e151140535cd67e327bf6 integration mainline->db-changes diff -r da43ef7ff32a -r 3fabf9a673f6 Core/DicomNetworking/DicomUserConnection.cpp --- a/Core/DicomNetworking/DicomUserConnection.cpp Thu Oct 18 10:43:24 2018 +0200 +++ b/Core/DicomNetworking/DicomUserConnection.cpp Thu Oct 18 10:48:11 2018 +0200 @@ -625,12 +625,14 @@ case ResourceType_Instance: clevel = "INSTANCE"; if (manufacturer_ == ModalityManufacturer_ClearCanvas || - manufacturer_ == ModalityManufacturer_Dcm4Chee) + manufacturer_ == ModalityManufacturer_Dcm4Chee || + manufacturer_ == ModalityManufacturer_GE) { // This is a particular case for ClearCanvas, thanks to Peter Somlo . // https://groups.google.com/d/msg/orthanc-users/j-6C3MAVwiw/iolB9hclom8J // http://www.clearcanvas.ca/Home/Community/OldForums/tabid/526/aff/11/aft/14670/afv/topic/Default.aspx DU_putStringDOElement(dataset, DcmTagKey(0x0008, 0x0052), "IMAGE"); + clevel = "IMAGE"; } else { @@ -644,6 +646,18 @@ throw OrthancException(ErrorCode_ParameterOutOfRange); } + + const char* universal; + if (manufacturer_ == ModalityManufacturer_GE) + { + universal = "*"; + } + else + { + universal = ""; + } + + // Add the expected tags for this query level. // WARNING: Do not reorder or add "break" in this switch-case! switch (level) @@ -651,27 +665,37 @@ case ResourceType_Instance: // SOP Instance UID if (!fields.HasTag(0x0008, 0x0018)) - DU_putStringDOElement(dataset, DcmTagKey(0x0008, 0x0018), ""); + { + DU_putStringDOElement(dataset, DcmTagKey(0x0008, 0x0018), universal); + } case ResourceType_Series: // Series instance UID if (!fields.HasTag(0x0020, 0x000e)) - DU_putStringDOElement(dataset, DcmTagKey(0x0020, 0x000e), ""); + { + DU_putStringDOElement(dataset, DcmTagKey(0x0020, 0x000e), universal); + } case ResourceType_Study: // Accession number if (!fields.HasTag(0x0008, 0x0050)) - DU_putStringDOElement(dataset, DcmTagKey(0x0008, 0x0050), ""); + { + DU_putStringDOElement(dataset, DcmTagKey(0x0008, 0x0050), universal); + } // Study instance UID if (!fields.HasTag(0x0020, 0x000d)) - DU_putStringDOElement(dataset, DcmTagKey(0x0020, 0x000d), ""); + { + DU_putStringDOElement(dataset, DcmTagKey(0x0020, 0x000d), universal); + } case ResourceType_Patient: // Patient ID if (!fields.HasTag(0x0010, 0x0020)) - DU_putStringDOElement(dataset, DcmTagKey(0x0010, 0x0020), ""); - + { + DU_putStringDOElement(dataset, DcmTagKey(0x0010, 0x0020), universal); + } + break; default: @@ -709,7 +733,8 @@ case ResourceType_Instance: if (manufacturer_ == ModalityManufacturer_ClearCanvas || - manufacturer_ == ModalityManufacturer_Dcm4Chee) + manufacturer_ == ModalityManufacturer_Dcm4Chee || + manufacturer_ == ModalityManufacturer_GE) { // This is a particular case for ClearCanvas, thanks to Peter Somlo . // https://groups.google.com/d/msg/orthanc-users/j-6C3MAVwiw/iolB9hclom8J diff -r da43ef7ff32a -r 3fabf9a673f6 Core/DicomParsing/ParsedDicomFile.cpp --- a/Core/DicomParsing/ParsedDicomFile.cpp Thu Oct 18 10:43:24 2018 +0200 +++ b/Core/DicomParsing/ParsedDicomFile.cpp Thu Oct 18 10:48:11 2018 +0200 @@ -1174,7 +1174,7 @@ } ReplacePlainString(DICOM_TAG_PLANAR_CONFIGURATION, "0"); // Color channels are interleaved - ReplacePlainString(DICOM_TAG_PHOTOMETRIC_INTERPRETATION, "MONOCHROME2"); + SetIfAbsent(DICOM_TAG_PHOTOMETRIC_INTERPRETATION, "MONOCHROME2"); // by default, greyscale images are in MONOCHROME2 unsigned int bytesPerPixel = 0; diff -r da43ef7ff32a -r 3fabf9a673f6 Core/DicomParsing/ParsedDicomFile.h --- a/Core/DicomParsing/ParsedDicomFile.h Thu Oct 18 10:43:24 2018 +0200 +++ b/Core/DicomParsing/ParsedDicomFile.h Thu Oct 18 10:48:11 2018 +0200 @@ -147,6 +147,16 @@ Replace(tag, utf8Value, false, DicomReplaceMode_InsertIfAbsent); } + void SetIfAbsent(const DicomTag& tag, + const std::string& utf8Value) + { + std::string currentValue; + if (!GetTagValue(currentValue, tag)) + { + ReplacePlainString(tag, utf8Value); + } + } + void RemovePrivateTags() { RemovePrivateTagsInternal(NULL); diff -r da43ef7ff32a -r 3fabf9a673f6 Core/Enumerations.cpp --- a/Core/Enumerations.cpp Thu Oct 18 10:43:24 2018 +0200 +++ b/Core/Enumerations.cpp Thu Oct 18 10:48:11 2018 +0200 @@ -799,6 +799,9 @@ case ModalityManufacturer_Vitrea: return "Vitrea"; + case ModalityManufacturer_GE: + return "GE"; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); } @@ -1420,6 +1423,10 @@ { return ModalityManufacturer_Vitrea; } + else if (manufacturer == "GE") + { + return ModalityManufacturer_GE; + } else if (manufacturer == "AgfaImpax" || manufacturer == "SyngoVia") { diff -r da43ef7ff32a -r 3fabf9a673f6 Core/Enumerations.h --- a/Core/Enumerations.h Thu Oct 18 10:43:24 2018 +0200 +++ b/Core/Enumerations.h Thu Oct 18 10:48:11 2018 +0200 @@ -529,7 +529,8 @@ ModalityManufacturer_StoreScp, ModalityManufacturer_ClearCanvas, ModalityManufacturer_Dcm4Chee, - ModalityManufacturer_Vitrea + ModalityManufacturer_Vitrea, + ModalityManufacturer_GE }; enum DicomRequestType diff -r da43ef7ff32a -r 3fabf9a673f6 NEWS --- a/NEWS Thu Oct 18 10:43:24 2018 +0200 +++ b/NEWS Thu Oct 18 10:48:11 2018 +0200 @@ -22,9 +22,10 @@ Maintenance ----------- +* New modality manufacturer: "GE" for GE Healthcare EA and AW * Executing a query/retrieve from the REST API now creates a job * Fix: Closing DICOM associations after running query/retrieve from REST API - +* Fix: Allow creation of MONOCHROME1 greyscale images in tools/create-dicom Version 1.4.2 (2018-09-20) ========================== diff -r da43ef7ff32a -r 3fabf9a673f6 Resources/CMake/DownloadPackage.cmake --- a/Resources/CMake/DownloadPackage.cmake Thu Oct 18 10:43:24 2018 +0200 +++ b/Resources/CMake/DownloadPackage.cmake Thu Oct 18 10:48:11 2018 +0200 @@ -78,9 +78,9 @@ if ("${MD5}" STREQUAL "no-check") message(WARNING "Not checking the MD5 of: ${Url}") - file(DOWNLOAD "${Url}" "${TMP_PATH}" SHOW_PROGRESS TIMEOUT 60 INACTIVITY_TIMEOUT 60) + file(DOWNLOAD "${Url}" "${TMP_PATH}" SHOW_PROGRESS TIMEOUT 300 INACTIVITY_TIMEOUT 60) else() - file(DOWNLOAD "${Url}" "${TMP_PATH}" SHOW_PROGRESS TIMEOUT 60 INACTIVITY_TIMEOUT 60 EXPECTED_MD5 "${MD5}") + file(DOWNLOAD "${Url}" "${TMP_PATH}" SHOW_PROGRESS TIMEOUT 300 INACTIVITY_TIMEOUT 60 EXPECTED_MD5 "${MD5}") endif() else() diff -r da43ef7ff32a -r 3fabf9a673f6 Resources/Configuration.json --- a/Resources/Configuration.json Thu Oct 18 10:43:24 2018 +0200 +++ b/Resources/Configuration.json Thu Oct 18 10:48:11 2018 +0200 @@ -166,11 +166,16 @@ * specific PACS manufacturers. The allowed values are currently: * - "Generic" (default value), * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields - * in outgoing C-Find requests originating from Orthanc) + * in outgoing C-Find requests originating from Orthanc), * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields - * in outgoing C-Find SCU requests originating from Orthanc) + * in outgoing C-Find SCU requests originating from Orthanc), * - "StoreScp" (storescp tool from DCMTK), - * - "ClearCanvas", "Dcm4Chee" and "Vitrea". + * - "ClearCanvas", + * - "Dcm4Chee", + * - "Vitrea", + * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation + * from GE Healthcare). + * * This parameter is case-sensitive. **/ // "clearcanvas" : [ "CLEARCANVAS", "192.168.1.1", 104, "ClearCanvas" ] diff -r da43ef7ff32a -r 3fabf9a673f6 UnitTestsSources/UnitTestsMain.cpp --- a/UnitTestsSources/UnitTestsMain.cpp Thu Oct 18 10:43:24 2018 +0200 +++ b/UnitTestsSources/UnitTestsMain.cpp Thu Oct 18 10:48:11 2018 +0200 @@ -547,6 +547,7 @@ ASSERT_STREQ("ClearCanvas", EnumerationToString(StringToModalityManufacturer("ClearCanvas"))); ASSERT_STREQ("Dcm4Chee", EnumerationToString(StringToModalityManufacturer("Dcm4Chee"))); ASSERT_STREQ("Vitrea", EnumerationToString(StringToModalityManufacturer("Vitrea"))); + ASSERT_STREQ("GE", EnumerationToString(StringToModalityManufacturer("GE"))); // backward compatibility tests (to remove once we make these manufacturer really obsolete) ASSERT_STREQ("Generic", EnumerationToString(StringToModalityManufacturer("MedInria"))); ASSERT_STREQ("Generic", EnumerationToString(StringToModalityManufacturer("EFilm2")));