annotate OrthancServer/Resources/GenerateAnonymizationProfile.py @ 4443:fd958175c5b9

ImageProcessing::ConvertJpegYCbCrToRgb()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 12 Jan 2021 13:07:15 +0100
parents d9473bd5ed43
children 7e4d1f2b3a8f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2312
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/usr/bin/env python
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Orthanc - A Lightweight, RESTful DICOM Store
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 # Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4124
diff changeset
6 # Copyright (C) 2017-2021 Osimis S.A., Belgium
2312
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 #
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # This program is free software: you can redistribute it and/or
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # modify it under the terms of the GNU General Public License as
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # published by the Free Software Foundation, either version 3 of the
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # License, or (at your option) any later version.
4124
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
12 #
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
13 # In addition, as a special exception, the copyright holders of this
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
14 # program give permission to link the code of its release with the
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
15 # OpenSSL project's "OpenSSL" library (or with modified versions of it
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
16 # that use the same license as the "OpenSSL" library), and distribute
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
17 # the linked executables. You must obey the GNU General Public License
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
18 # in all respects for all of the code used other than "OpenSSL". If you
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
19 # modify file(s) with this exception, you may extend this exception to
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
20 # your version of the file(s), but you are not obligated to do so. If
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
21 # you do not wish to do so, delete this exception statement from your
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
22 # version. If you delete this exception statement from all source files
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
23 # in the program, then also delete it here.
2312
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 # This program is distributed in the hope that it will be useful, but
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 # WITHOUT ANY WARRANTY; without even the implied warranty of
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 # General Public License for more details.
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 # You should have received a copy of the GNU General Public License
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 import re
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 import sys
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 import xml.etree.ElementTree as ET
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 # Usage:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 # ./GenerateAnonymizationProfile.py ~/Subversion/dicom-specification/2017c/part15.xml
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 if len(sys.argv) != 2:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 raise Exception('Please provide the path to the part15.xml file from the DICOM standard')
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 with open(sys.argv[1], 'r') as f:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 root = ET.fromstring(f.read())
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 br = '{http://docbook.org/ns/docbook}' # Shorthand variable
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 LINES = []
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 def FormatLine(command, name):
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 indentation = 65
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 if len(command) > indentation:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 raise Exception('Too long command')
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 line = ' ' + command + (' ' * (indentation - len(command))) + '// ' + name
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 LINES.append(line)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 def FormatUnknown(rawTag, name, profile):
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 FormatLine('// TODO: %s with rule %s' % (rawTag, profile), name)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 RAW_TAG_RE = re.compile(r'^\(\s*([0-9A-F]{4})\s*,\s*([0-9A-F]{4})\s*\)$')
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 for table in root.iter('%stable' % br):
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 if table.attrib['label'] == 'E.1-1':
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 for row in table.find('%stbody' % br).iter('%str' % br):
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 rawTag = row.find('%std[2]/%spara' % (br, br)).text
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 name = row.find('%std[1]/%spara' % (br, br)).text
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 profile = row.find('%std[5]/%spara' % (br, br)).text
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 if len(name.strip()) == 0:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 continue
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 match = RAW_TAG_RE.match(rawTag)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 if match == None:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 FormatUnknown(rawTag, name, profile)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 else:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 tag = '0x%s, 0x%s' % (match.group(1).lower(), match.group(2).lower())
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 if name in [
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 'SOP Instance UID',
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 'Series Instance UID',
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 'Study Instance UID',
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 ]:
2506
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
89 FormatLine('// Tag (%s) is set in Apply() /* %s */' % (tag, profile), name)
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
90 elif name in [
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
91 'Referenced Image Sequence',
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
92 'Source Image Sequence',
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
93 'Referenced SOP Instance UID',
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
94 'Frame of Reference UID',
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
95 'Referenced Frame of Reference UID',
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
96 'Related Frame of Reference UID',
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
97 ]:
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
98 FormatLine('// Tag (%s) => RelationshipsVisitor /* %s */' % (tag, profile), name)
2313
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
99 elif name in [
2312
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 'Patient\'s Name',
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 'Patient ID',
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ]:
2506
51b91ead6c38 Preservation of UID relationships while anonymizing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
103 FormatLine('// Tag (%s) is set below (*) /* %s */' % (tag, profile), name)
2312
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 elif profile == 'X':
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 FormatLine('removals_.insert(DicomTag(%s));' % tag, name)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 elif profile.startswith('X/'):
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 FormatLine('removals_.insert(DicomTag(%s)); /* %s */' % (tag, profile), name)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 elif profile == 'Z':
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 FormatLine('clearings_.insert(DicomTag(%s));' % tag, name)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 elif profile == 'D' or profile.startswith('Z/'):
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 FormatLine('clearings_.insert(DicomTag(%s)); /* %s */' % (tag, profile), name)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 elif profile == 'U':
2313
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
113 FormatLine('removals_.insert(DicomTag(%s)); /* TODO UID */' % (tag), name)
2312
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 else:
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 FormatUnknown(rawTag, name, profile)
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 for line in sorted(LINES):
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 print line
8700dcaa02e5 GenerateAnonymizationProfile.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
2313
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
120
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
121 # D - replace with a non-zero length value that may be a dummy value and consistent with the VR
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
122 # Z - replace with a zero length value, or a non-zero length value that may be a dummy value and consistent with the VR
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
123 # X - remove
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
124 # K - keep (unchanged for non-sequence attributes, cleaned for sequences)
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
125 # C - clean, that is replace with values of similar meaning known not to contain identifying information and consistent with the VR
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
126 # U - replace with a non-zero length UID that is internally consistent within a set of Instances
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
127 # Z/D - Z unless D is required to maintain IOD conformance (Type 2 versus Type 1)
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
128 # X/Z - X unless Z is required to maintain IOD conformance (Type 3 versus Type 2)
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
129 # X/D - X unless D is required to maintain IOD conformance (Type 3 versus Type 1)
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
130 # X/Z/D - X unless Z or D is required to maintain IOD conformance (Type 3 versus Type 2 versus Type 1)
d19e716b79fa switch to anonymization according to DICOM 2017c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2312
diff changeset
131 # X/Z/U* - X unless Z or replacement of contained instance UIDs (U) is required to maintain IOD conformance (Type 3 versus Type 2 versus Type 1 sequences containing UID references)