Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomParsing/DicomModification.cpp @ 5334:5b2a5cc64cb1
upgraded anonymization to Basic Profile of PS 3.15-2023b Table E.1-1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Jun 2023 15:12:39 +0200 |
parents | 0ea402b4d901 |
children | 59e3b6f8c5be |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Tue Jun 27 10:39:17 2023 +0200 +++ b/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Tue Jun 27 15:12:39 2023 +0200 @@ -43,6 +43,9 @@ static const std::string ORTHANC_DEIDENTIFICATION_METHOD_2021b = "Orthanc " ORTHANC_VERSION " - PS 3.15-2021b Table E.1-1 Basic Profile"; +static const std::string ORTHANC_DEIDENTIFICATION_METHOD_2023b = + "Orthanc " ORTHANC_VERSION " - PS 3.15-2023b Table E.1-1 Basic Profile"; + namespace Orthanc { namespace @@ -427,7 +430,8 @@ if (it->second->asString() == ORTHANC_DEIDENTIFICATION_METHOD_2008 || it->second->asString() == ORTHANC_DEIDENTIFICATION_METHOD_2017c || - it->second->asString() == ORTHANC_DEIDENTIFICATION_METHOD_2021b) + it->second->asString() == ORTHANC_DEIDENTIFICATION_METHOD_2021b || + it->second->asString() == ORTHANC_DEIDENTIFICATION_METHOD_2023b) { delete it->second; replacements_.erase(it); @@ -831,9 +835,6 @@ * generated automatically by calling: * "../../../OrthancServer/Resources/GenerateAnonymizationProfile.py * https://raw.githubusercontent.com/jodogne/dicom-specification/master/2021b/part15.xml" - * - * http://dicom.nema.org/medical/dicom/2021b/output/chtml/part15/chapter_E.html#table_E.1-1a - * http://dicom.nema.org/medical/dicom/2021b/output/chtml/part15/chapter_E.html#table_E.1-1 **/ #include "DicomModification_Anonymization2021b.impl.h" @@ -843,6 +844,26 @@ } + void DicomModification::SetupAnonymization2023b() + { + /** + * This is Table E.1-1 from PS 3.15-2023b (DICOM Part 15: Security + * and System Management Profiles), "basic profile" column. It was + * generated automatically by calling: + * "../../../OrthancServer/Resources/GenerateAnonymizationProfile.py + * https://raw.githubusercontent.com/jodogne/dicom-specification/master/2023b/part15.xml" + * + * http://dicom.nema.org/medical/dicom/current/output/chtml/part15/chapter_E.html#table_E.1-1a + * http://dicom.nema.org/medical/dicom/current/output/chtml/part15/chapter_E.html#table_E.1-1 + **/ + +#include "DicomModification_Anonymization2023b.impl.h" + + // Set the DeidentificationMethod tag + ReplaceInternal(DICOM_TAG_DEIDENTIFICATION_METHOD, ORTHANC_DEIDENTIFICATION_METHOD_2023b); + } + + void DicomModification::SetupAnonymization(DicomVersion version) { isAnonymization_ = true; @@ -874,6 +895,10 @@ SetupAnonymization2021b(); break; + case DicomVersion_2023b: + SetupAnonymization2023b(); + break; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); } @@ -1344,7 +1369,9 @@ // DicomVersion version = DicomVersion_2008; // For Orthanc <= 1.2.0 // DicomVersion version = DicomVersion_2017c; // For Orthanc between 1.3.0 and 1.9.3 - DicomVersion version = DicomVersion_2021b; // For Orthanc >= 1.9.4 + // DicomVersion version = DicomVersion_2021b; // For Orthanc >= 1.9.4 + DicomVersion version = DicomVersion_2023b; // For Orthanc >= 1.12.1 + if (request.isMember("DicomVersion")) { if (request["DicomVersion"].type() != Json::stringValue)