Mercurial > hg > orthanc-book
comparison Sphinx/source/users/anonymization.rst @ 694:bcd1a6a89280
replace, keep and remove accept sequences in Orthanc 1.9.4
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jun 2021 17:35:58 +0200 |
parents | 549824ebdf5a |
children | 4f658c25addd |
comparison
equal
deleted
inserted
replaced
693:650100457193 | 694:bcd1a6a89280 |
---|---|
38 ], | 38 ], |
39 "KeepPrivateTags": true, | 39 "KeepPrivateTags": true, |
40 "DicomVersion" : "2017c" | 40 "DicomVersion" : "2017c" |
41 }' > Anonymized.dcm | 41 }' > Anonymized.dcm |
42 | 42 |
43 Explanations: | 43 **Explanations:** |
44 | 44 |
45 * New UUIDs are automatically generated for the study, the series and | 45 * New UUIDs are automatically generated for the study, the series and |
46 the instance. | 46 the instance. |
47 * The DICOM tags can be specified either by their name | 47 * The DICOM tags can be specified either by their name |
48 (``PatientName``) or by their hexadecimal identifier (in the example | 48 (``PatientName``) or by their hexadecimal identifier (in the example |
63 be used for anonymization. Allowed values are ``2008``, ``2017c``, | 63 be used for anonymization. Allowed values are ``2008``, ``2017c``, |
64 or ``2021b`` (new in Orthanc 1.9.4). This parameter has been | 64 or ``2021b`` (new in Orthanc 1.9.4). This parameter has been |
65 introduced in Orthanc 1.3.0. In earlier version, the ``2008`` | 65 introduced in Orthanc 1.3.0. In earlier version, the ``2008`` |
66 standard was used. If the parameter is absent, the highest version | 66 standard was used. If the parameter is absent, the highest version |
67 that is supported by Orthanc is used. | 67 that is supported by Orthanc is used. |
68 | 68 * ``Remove`` can also be used to provide a list of tags to be manually |
69 deleted. | |
70 | |
71 **Important:** Starting with Orthanc 1.9.4, the ``Replace``, ``Keep`` | |
72 and ``Remove`` fields can also specify sequences, using the same | |
73 syntax as the ``dcmodify`` command-line tool (wildcards are supported | |
74 as well). Earlier versions were limited to top-level tags in the DICOM | |
75 dataset. Check out the integration test ``test_modify_subsequences`` | |
76 for `examples | |
77 <https://hg.orthanc-server.com/orthanc-tests/file/default/Tests/Tests.py>`__. | |
69 | 78 |
70 **Implementation:** Internally, the setup of the anonymization | 79 **Implementation:** Internally, the setup of the anonymization |
71 profiles can be found in the methods ``SetupAnonymizationXXX()`` of | 80 profiles can be found in the methods ``SetupAnonymizationXXX()`` of |
72 the class ``Orthanc::DicomModification`` (cf. `source code | 81 the class ``Orthanc::DicomModification`` (cf. `source code |
73 <https://hg.orthanc-server.com/orthanc/file/tip/OrthancFramework/Sources/DicomParsing/DicomModification.cpp>`__). | 82 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.3/OrthancFramework/Sources/DicomParsing/DicomModification.cpp>`__). |
74 | 83 |
75 | 84 |
76 Modification of a Single Instance | 85 Modification of a Single Instance |
77 --------------------------------- | 86 --------------------------------- |
78 | 87 |
92 "RemovePrivateTags": true, | 101 "RemovePrivateTags": true, |
93 "Force": true, | 102 "Force": true, |
94 "Transcode": "1.2.840.10008.1.2.4.70" | 103 "Transcode": "1.2.840.10008.1.2.4.70" |
95 }' > Modified.dcm | 104 }' > Modified.dcm |
96 | 105 |
97 Remarks: | 106 **Remarks:** |
98 | 107 |
99 * The ``Remove`` array specifies the list of the tags to remove. | 108 * The ``Remove`` array specifies the list of the tags to remove. |
100 * The ``Replace`` associative array specifies the substitions to be applied (cf. anonymization). | 109 * The ``Replace`` associative array specifies the substitions to be applied (cf. anonymization). |
101 * If ``RemovePrivateTags`` is set to ``true``, the private tags | 110 * If ``RemovePrivateTags`` is set to ``true``, the private tags |
102 (i.e. manufacturer-specific tags) are removed. | 111 (i.e. manufacturer-specific tags) are removed. |
107 :ref:`DICOM identifiers <dicom-identifiers>` might lead to breaking | 116 :ref:`DICOM identifiers <dicom-identifiers>` might lead to breaking |
108 the DICOM model of the real-world. In general, any explicit | 117 the DICOM model of the real-world. In general, any explicit |
109 modification to one of the ``PatientID``, ``StudyInstanceUID``, | 118 modification to one of the ``PatientID``, ``StudyInstanceUID``, |
110 ``SeriesInstanceUID``, and ``SOPInstanceUID`` requires ``Force`` to | 119 ``SeriesInstanceUID``, and ``SOPInstanceUID`` requires ``Force`` to |
111 be set to ``true``, in order to prevent any unwanted side effect. | 120 be set to ``true``, in order to prevent any unwanted side effect. |
112 | 121 |
113 .. highlight:: json | 122 .. highlight:: json |
114 | 123 |
115 * To replace a sequence of tags, you may use this syntax:: | 124 * To replace a sequence of tags, you may use this syntax:: |
116 | 125 |
117 | 126 |
137 "EncryptedContent" : "data:application/octet-stream;base64,SSB3YXMgaGVyZSBpbiAyMDE5LiAgTWFydHkgTWNGbHku" | 146 "EncryptedContent" : "data:application/octet-stream;base64,SSB3YXMgaGVyZSBpbiAyMDE5LiAgTWFydHkgTWNGbHku" |
138 } | 147 } |
139 ] | 148 ] |
140 } | 149 } |
141 } | 150 } |
151 | |
152 | |
153 **Important:** Similarly to anonymization, starting with Orthanc | |
154 1.9.4, the ``Replace``, ``Keep`` and ``Remove`` fields can also | |
155 specify sequences, using the same syntax as the ``dcmodify`` | |
156 command-line tool (wildcards are supported as well). Earlier versions | |
157 were limited to top-level tags in the DICOM dataset. Check out the | |
158 integration test ``test_modify_subsequences`` for `examples | |
159 <https://hg.orthanc-server.com/orthanc-tests/file/default/Tests/Tests.py>`__. | |
160 | |
142 | 161 |
143 .. _study-modification: | 162 .. _study-modification: |
144 | 163 |
145 Modification of Studies or Series | 164 Modification of Studies or Series |
146 --------------------------------- | 165 --------------------------------- |