annotate Sphinx/source/users/anonymization.rst @ 247:325dd3901547

ohif
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 19 May 2019 10:08:52 +0200
parents 02399e86f046
children 829ce317d215
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 .. _anonymization:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 Anonymization and modification
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 ==============================
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 .. contents::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 :depth: 2
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 Orthanc 0.5.0 introduces the anonymization of DICOM resources
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 (i.e. patients, studies, series or instances). This page summarizes
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 how to use this feature.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 Anonymization of a Single Instance
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 ----------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 Orthanc allows to anonymize a single DICOM instance and to download
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 the resulting anonymized DICOM file. Anonymization consists in erasing
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 all the tags that are specified in Table E.1-1 from PS 3.15 of the
111
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
21 DICOM standard 2008 or 2017c (default). Example::
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 $ curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/anonymize -X POST -d '{}' > Anonymized.dcm
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 It is possible to control how anonymization is achieved by specifying
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 a JSON body::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
28 $ curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/anonymize -X POST -d '{"Replace":{"PatientName":"Hello","0010-1001":"World"},"Keep":["StudyDescription", "SeriesDescription"],"KeepPrivateTags": true, "DicomVersion" : "2017c"}' > Anonymized.dcm
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 Explanations:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 * New UUIDs are automatically generated for the study, the series and
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 the instance.
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
34 * The DICOM tags can be specified either by their name
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
35 (``PatientName``) or by their hexadecimal identifier (in the example
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
36 above, ``0010-1001`` corresponds to ``Other Patient Names``).
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 * ``Replace`` is an associative array that associates a DICOM tag with its
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 new string value. The value is dynamically cast to the proper DICOM
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 data type (an HTTP error will occur if the cast fails). Replacements
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 are applied after all the tags to anonymize have been removed.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 * ``Keep`` specifies a list of tags that should be preserved from full
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 anonymization.
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
43 * If ``KeepPrivateTags`` is set to ``true`` in the JSON request,
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
44 private tags (i.e. manufacturer-specific tags) are not removed by
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
45 the anonymization process. The default behavior consists in removing
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
46 the private tags, as such tags can contain patient-specific
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 information.
111
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
48 * ``DicomVersion`` specifies which version of the DICOM standard shall be used
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
49 for anonymization. Allowed values are ``2008`` and ``2017c`` (default value
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
50 if the parameter is absent). This parameter has been introduced in Orthanc
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
51 1.3.0. In earlier version, the ``2008`` standard was used.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 Modification of a Single Instance
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 ---------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 Orthanc allows to modify a set of specified tags in a single DICOM
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 instance and to download the resulting anonymized DICOM
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 file. Example::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
61 $ curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/modify -X POST -d '{"Replace":{"PatientName":"hello","PatientID":"world"},"Remove":["InstitutionName"],"RemovePrivateTags": true, "Force": true}' > Modified.dcm
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 Remarks:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 * The ``Remove`` array specifies the list of the tags to remove.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 * The ``Replace`` associative array specifies the substitions to be applied (cf. anonymization).
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
67 * If ``RemovePrivateTags`` is set to ``true``, the private tags
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
68 (i.e. manufacturer-specific tags) are removed.
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
69 * The ``Force`` option must be set to ``true``, in order to allow the
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
70 modification of the ``PatientID``, as such a modification of the
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
71 :ref:`DICOM identifiers <dicom-identifiers>` might lead to breaking
113
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
72 the DICOM model of the real-world. In general, any explicit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
73 modification to one of the ``PatientID``, ``StudyInstanceUID``,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
74 ``SeriesInstanceUID``, and ``SOPInstanceUID`` requires ``Force`` to
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
75 be set to ``true``, in order to prevent any unwanted side effect.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 Modification of Studies or Series
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 ---------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 It is possible to modify all the instances from a study or from a
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 series in a single request. In this case, the modified instances are
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 stored back into the Orthanc store. Here is how to modify a series::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 $ curl http://localhost:8042/series/95a6e2bf-9296e2cc-bf614e2f-22b391ee-16e010e0/modify -X POST -d '{"Replace":{"InstitutionName":"My own clinic"}}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 .. highlight:: json
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 The parameters are identical to those used to modify a single
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 instance. Orthanc will answer a JSON message that tells where the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 modified series has been stored::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 {
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 "ID" : "3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 "Path" : "/series/3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce"
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 }
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 Similarly, here is an interaction to modify a study::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 $ curl http://localhost:8042/studies/ef2ce55f-9342856a-aee23907-2667e859-9f3b734d/modify -X POST -d '{"Replace":{"InstitutionName":"My own clinic"}}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 .. highlight:: json
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 ::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 {
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 "ID" : "1c3f7bf4-85b4aa20-236e6315-5d450dcc-3c1bcf28",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 "Path" : "/studies/1c3f7bf4-85b4aa20-236e6315-5d450dcc-3c1bcf28"
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 }
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 Modification of Patients
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 ------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 Starting with Orthanc 0.7.5, Orthanc can also modify all the instances
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 of a patient with a single REST call. Here is a sample::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
126 $ curl http://localhost:8042/patients/6fb47ef5-072f4557-3215aa29-f99515c1-6fa22bf0/modify -X POST -d '{"Replace":{"PatientID":"Hello","PatientName":"Sample patient name"},"Force":true}'
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 .. highlight:: json
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 ::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 {
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 "ID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 "Path" : "/patients/f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 "PatientID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 "Type" : "Patient"
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 }
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 Please note that, in this case, you have to set the value of the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 ``PatientID (0010,0020)`` tag for Orthanc to accept this modification:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 This is a security to prevent the merging of patient data before and
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 after anonymization, if the user does not explicitly tell Orthanc to
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 do so.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 Anonymization of Patients, Studies or Series
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 --------------------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 Study and series can be anonymized the same way as they are modified::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 $ curl http://localhost:8042/patients/6fb47ef5-072f4557-3215aa29-f99515c1-6fa22bf0/anonymize -X POST -d '{}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 $ curl http://localhost:8042/studies/ef2ce55f-9342856a-aee23907-2667e859-9f3b734d/anonymize -X POST -d '{}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 $ curl http://localhost:8042/series/95a6e2bf-9296e2cc-bf614e2f-22b391ee-16e010e0/anonymize -X POST -d '{}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 As written above, the anonymization process can be fine-tuned by using
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 a JSON body.
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
159
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
160
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
161 .. _split-merge:
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
162
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
163 Split/merge of DICOM studies
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
164 ----------------------------
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
165
178
981e5a996b11 Orthanc 1.5.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 167
diff changeset
166 Starting with Orthanc 1.5.0, Orthanc supports splitting and merging
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
167 DICOM studies through its REST API.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
168
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
169 .. _split:
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
170
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
171 Splitting
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
172 ^^^^^^^^^
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
173
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
174 Here is the syntax to **split** a DICOM study::
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
175
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
176 $ curl http://localhost:8042/studies/6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12/split -d \
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
177 '{"Series":["6ca4c9f3-5e895cb3-4d82c6da-09e060fe-9c59f228"],"Replace":{"PatientName":"HELLO"},"Remove":["AccessionNumber"]}'
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
178
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
179 By issuing this command, the series whose :ref:`Orthanc identifier
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
180 <dicom-identifiers>` is
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
181 ``6ca4c9f3-5e895cb3-4d82c6da-09e060fe-9c59f228``, and that is part of
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
182 the source study with identifier
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
183 ``6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12``, will be removed from
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
184 the source study, and will be moved to a brand new study.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
185
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
186 This is done by generating a new value for all the following DICOM
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
187 tags in the DICOM instances of the series of interest:
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
188 ``StudyInstanceUID (0x0020, 0x000d)``, ``SeriesInstanceUID (0x0020,
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
189 0x000e)``, and ``SOPInstanceUID (0x0008, 0x0018)``. Here are the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
190 arguments of this ``/studies/{study}/split`` URI:
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
191
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
192 * ``Series`` gives the list of series to be separated from the parent
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
193 study (mandatory option). These series must all be children of the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
194 same source study, that is specified in the URI.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
195 * ``Replace`` allows to overwrite the DICOM tags that are part of the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
196 "Patient Module Attributes" and the "General Study Module
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
197 Attributes", as specified by the DICOM 2011 standard in Tables C.7-1
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
198 and C.7-3.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
199 * ``Remove`` allows to remove DICOM tags from the same modules as in
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
200 the ``Replace`` options.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
201 * ``KeepSource`` (Boolean value), if set to ``true``, instructs
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
202 Orthanc to keep a copy of the original series in the source study.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
203 By default, the original series are deleted from Orthanc.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
204
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
205 .. _merge:
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
206
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
207 Merging
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
208 ^^^^^^^
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
209
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
210 Here is the syntax to **merge** DICOM series, into another DICOM study::
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
211
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
212 $ curl http://localhost:8042/studies/6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12/merge -d \
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
213 '{"Resources":["ef2ce55f-9342856a-aee23907-2667e859-9f3b734d"]}'
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
214
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
215 By issuing this command, the DICOM series whose :ref:`Orthanc
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
216 identifier <dicom-identifiers>` is
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
217 ``ef2ce55f-9342856a-aee23907-2667e859-9f3b734d``, will be merged into
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
218 target study with identifier
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
219 ``6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12``.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
220
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
221 As in the case of splitting, this is done by updating the following
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
222 DICOM tags: ``StudyInstanceUID (0x0020, 0x000d)``, ``SeriesInstanceUID
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
223 (0x0020, 0x000e)``, and ``SOPInstanceUID (0x0008,
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
224 0x0018)``. Furthermore, all the DICOM tags that are part of the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
225 "Patient Module Attributes" and the "General Study Module Attributes"
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
226 (as specified by the DICOM 2011 standard in Tables C.7-1 and C.7-3),
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
227 are modified to match the target study. Here are the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
228 arguments of this ``/studies/{study}/merge`` URI:
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
229
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
230 * ``Resources`` gives the list of source studies or source series
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
231 that are to be merged into the target study.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
232 * ``KeepSource`` (Boolean value), if set to ``true``, instructs
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
233 Orthanc to keep the source studies and series. By default, the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
234 original resources are deleted from Orthanc.