Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 4687:fcd2dc7c8f31
"Replace", "Keep" and "Remove" in "/modify" and "/anonymize" accept paths to subsequences
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jun 2021 17:24:44 +0200 |
parents | f75c63aa9de0 |
children | 45bce660ce3a |
comparison
equal
deleted
inserted
replaced
4685:693f049729ba | 4687:fcd2dc7c8f31 |
---|---|
44 #include "../ServerJobs/SplitStudyJob.h" | 44 #include "../ServerJobs/SplitStudyJob.h" |
45 | 45 |
46 #include <boost/lexical_cast.hpp> | 46 #include <boost/lexical_cast.hpp> |
47 #include <boost/algorithm/string/predicate.hpp> | 47 #include <boost/algorithm/string/predicate.hpp> |
48 | 48 |
49 #define INFO_SUBSEQUENCES \ | |
50 "Starting with Orthanc 1.9.4, paths to subsequences can be provided using the "\ | |
51 "same syntax as the `dcmodify` command-line tool (wildcards are supported as well)." | |
52 | |
49 namespace Orthanc | 53 namespace Orthanc |
50 { | 54 { |
51 // Modification of DICOM instances ------------------------------------------ | 55 // Modification of DICOM instances ------------------------------------------ |
52 | 56 |
53 | 57 |
69 "Allow the modification of tags related to DICOM identifiers, at the risk of " | 73 "Allow the modification of tags related to DICOM identifiers, at the risk of " |
70 "breaking the DICOM model of the real world", false) | 74 "breaking the DICOM model of the real world", false) |
71 .SetRequestField("RemovePrivateTags", RestApiCallDocumentation::Type_Boolean, | 75 .SetRequestField("RemovePrivateTags", RestApiCallDocumentation::Type_Boolean, |
72 "Remove the private tags from the DICOM instances (defaults to `false`)", false) | 76 "Remove the private tags from the DICOM instances (defaults to `false`)", false) |
73 .SetRequestField("Replace", RestApiCallDocumentation::Type_JsonObject, | 77 .SetRequestField("Replace", RestApiCallDocumentation::Type_JsonObject, |
74 "Associative array to change the value of some DICOM tags in the DICOM instances", false) | 78 "Associative array to change the value of some DICOM tags in the DICOM instances. " INFO_SUBSEQUENCES, false) |
75 .SetRequestField("Remove", RestApiCallDocumentation::Type_JsonListOfStrings, | 79 .SetRequestField("Remove", RestApiCallDocumentation::Type_JsonListOfStrings, |
76 "List of tags that must be removed from the DICOM instances", false) | 80 "List of tags that must be removed from the DICOM instances. " INFO_SUBSEQUENCES, false) |
77 .SetRequestField("Keep", RestApiCallDocumentation::Type_JsonListOfStrings, | 81 .SetRequestField("Keep", RestApiCallDocumentation::Type_JsonListOfStrings, |
78 "Keep the original value of the specified tags, to be chosen among the `StudyInstanceUID`, " | 82 "Keep the original value of the specified tags, to be chosen among the `StudyInstanceUID`, " |
79 "`SeriesInstanceUID` and `SOPInstanceUID` tags. Avoid this feature as much as possible, " | 83 "`SeriesInstanceUID` and `SOPInstanceUID` tags. Avoid this feature as much as possible, " |
80 "as this breaks the DICOM model of the real world.", false) | 84 "as this breaks the DICOM model of the real world.", false) |
81 .SetRequestField("PrivateCreator", RestApiCallDocumentation::Type_String, | 85 .SetRequestField("PrivateCreator", RestApiCallDocumentation::Type_String, |
94 "Version of the DICOM standard to be used for anonymization. Check out " | 98 "Version of the DICOM standard to be used for anonymization. Check out " |
95 "configuration option `DeidentifyLogsDicomVersion` for possible values.", false) | 99 "configuration option `DeidentifyLogsDicomVersion` for possible values.", false) |
96 .SetRequestField("KeepPrivateTags", RestApiCallDocumentation::Type_Boolean, | 100 .SetRequestField("KeepPrivateTags", RestApiCallDocumentation::Type_Boolean, |
97 "Keep the private tags from the DICOM instances (defaults to `false`)", false) | 101 "Keep the private tags from the DICOM instances (defaults to `false`)", false) |
98 .SetRequestField("Replace", RestApiCallDocumentation::Type_JsonObject, | 102 .SetRequestField("Replace", RestApiCallDocumentation::Type_JsonObject, |
99 "Associative array to change the value of some DICOM tags in the DICOM instances", false) | 103 "Associative array to change the value of some DICOM tags in the DICOM instances. " INFO_SUBSEQUENCES, false) |
100 .SetRequestField("Remove", RestApiCallDocumentation::Type_JsonListOfStrings, | 104 .SetRequestField("Remove", RestApiCallDocumentation::Type_JsonListOfStrings, |
101 "List of additional tags to be removed from the DICOM instances", false) | 105 "List of additional tags to be removed from the DICOM instances. " INFO_SUBSEQUENCES, false) |
102 .SetRequestField("Keep", RestApiCallDocumentation::Type_JsonListOfStrings, | 106 .SetRequestField("Keep", RestApiCallDocumentation::Type_JsonListOfStrings, |
103 "List of DICOM tags whose value must not be destroyed by the anonymization", false) | 107 "List of DICOM tags whose value must not be destroyed by the anonymization. " INFO_SUBSEQUENCES, false) |
104 .SetRequestField("PrivateCreator", RestApiCallDocumentation::Type_String, | 108 .SetRequestField("PrivateCreator", RestApiCallDocumentation::Type_String, |
105 "The private creator to be used for private tags in `Replace`", false); | 109 "The private creator to be used for private tags in `Replace`", false); |
106 } | 110 } |
107 | 111 |
108 | 112 |