Mercurial > hg > orthanc
changeset 2888:61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 13 Oct 2018 12:17:16 +0200 |
parents | 320a877a1f40 |
children | f3c1eda54e47 |
files | Core/DicomNetworking/DicomUserConnection.cpp Core/Enumerations.cpp Core/Enumerations.h NEWS Resources/Configuration.json UnitTestsSources/UnitTestsMain.cpp |
diffstat | 6 files changed, 52 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomUserConnection.cpp Fri Oct 12 14:37:54 2018 +0200 +++ b/Core/DicomNetworking/DicomUserConnection.cpp Sat Oct 13 12:17:16 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 <peter.somlo@gmail.com>. // 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 <peter.somlo@gmail.com>. // https://groups.google.com/d/msg/orthanc-users/j-6C3MAVwiw/iolB9hclom8J
--- a/Core/Enumerations.cpp Fri Oct 12 14:37:54 2018 +0200 +++ b/Core/Enumerations.cpp Sat Oct 13 12:17:16 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") {
--- a/Core/Enumerations.h Fri Oct 12 14:37:54 2018 +0200 +++ b/Core/Enumerations.h Sat Oct 13 12:17:16 2018 +0200 @@ -529,7 +529,8 @@ ModalityManufacturer_StoreScp, ModalityManufacturer_ClearCanvas, ModalityManufacturer_Dcm4Chee, - ModalityManufacturer_Vitrea + ModalityManufacturer_Vitrea, + ModalityManufacturer_GE }; enum DicomRequestType
--- a/NEWS Fri Oct 12 14:37:54 2018 +0200 +++ b/NEWS Sat Oct 13 12:17:16 2018 +0200 @@ -22,6 +22,7 @@ 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
--- a/Resources/Configuration.json Fri Oct 12 14:37:54 2018 +0200 +++ b/Resources/Configuration.json Sat Oct 13 12:17:16 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" ]
--- a/UnitTestsSources/UnitTestsMain.cpp Fri Oct 12 14:37:54 2018 +0200 +++ b/UnitTestsSources/UnitTestsMain.cpp Sat Oct 13 12:17:16 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")));