Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Update data dicts to 2024d #2157

Merged
merged 5 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Ensure consistency of retired placeholder element names
  • Loading branch information
scaramallion committed Nov 8, 2024
commit a52c2aaee82d248cd1a3e4657b1824c981dde8cc
6 changes: 3 additions & 3 deletions src/pydicom/_dicom_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@
0x00180042: ('CS', '1', "Initial Cine Run State", '', 'InitialCineRunState'),
0x00180050: ('DS', '1', "Slice Thickness", '', 'SliceThickness'),
0x00180060: ('DS', '1', "KVP", '', 'KVP'),
0x00180061: ('DS', '1', "", 'Retired', ''),
0x00180061: ('DS', '1', "Retired-blank", 'Retired', ''),
0x00180070: ('IS', '1', "Counts Accumulated", '', 'CountsAccumulated'),
0x00180071: ('CS', '1', "Acquisition Termination Condition", '', 'AcquisitionTerminationCondition'),
0x00180072: ('DS', '1', "Effective Duration", '', 'EffectiveDuration'),
Expand Down Expand Up @@ -3830,7 +3830,7 @@
0x04000120: ('OB', '1', "Signature", '', 'Signature'),
0x04000305: ('CS', '1', "Certified Timestamp Type", '', 'CertifiedTimestampType'),
0x04000310: ('OB', '1', "Certified Timestamp", '', 'CertifiedTimestamp'),
0x04000315: ('FL', '1', "", 'Retired', ''),
0x04000315: ('FL', '1', "Retired-blank", 'Retired', ''),
0x04000401: ('SQ', '1', "Digital Signature Purpose Code Sequence", '', 'DigitalSignaturePurposeCodeSequence'),
0x04000402: ('SQ', '1', "Referenced Digital Signature Sequence", '', 'ReferencedDigitalSignatureSequence'),
0x04000403: ('SQ', '1', "Referenced SOP Instance MAC Sequence", '', 'ReferencedSOPInstanceMACSequence'),
Expand Down Expand Up @@ -4815,7 +4815,7 @@
0x300A0773: ('US', '1', "Referenced Expected In-Vivo Measurement Value Index", '', 'ReferencedExpectedInVivoMeasurementValueIndex'),
0x300A0774: ('SQ', '1', "Dose Measurement Device Code Sequence", '', 'DoseMeasurementDeviceCodeSequence'),
0x300A0780: ('SQ', '1', "Additional Parameter Recording Instance Sequence", '', 'AdditionalParameterRecordingInstanceSequence'),
0x300A0782: ('US', '1', "", 'Retired', ''),
0x300A0782: ('US', '1', "Retired-blank", 'Retired', ''),
0x300A0783: ('ST', '1', "Interlock Origin Description", '', 'InterlockOriginDescription'),
0x300A0784: ('SQ', '1', "RT Patient Position Scope Sequence", '', 'RTPatientPositionScopeSequence'),
0x300A0785: ('UI', '1', "Referenced Treatment Position Group UID", '', 'ReferencedTreatmentPositionGroupUID'),
Expand Down
18 changes: 11 additions & 7 deletions util/generate_dict/generate_dicom_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,17 @@ def setup_argparse():
# replace micro symbol
attr["Name"] = attr["Name"].replace("µ", "u")

# Retired placeholder elements that won't be used - note 3 in Part 6 of PS3.6
# Examples: (0008,0202), (0018,0061)
if not attr["Keyword"] and not attr["Name"]:
attr["Name"] = "Retired-blank"
attr["Retired"] = "Retired"
if not attr["VR"]:
attr["VR"] = "OB"

if not attr["VM"]:
attr["VM"] = "1"

# some new tags don't have the retired entry (2019)
if "Retired" not in attr:
attr["Retired"] = ""
Expand All @@ -318,13 +329,6 @@ def setup_argparse():
# e.g. (0028,1200)
attr["VM"] = attr["VM"].split(" or ")[0]

# If blank then add dummy vals
# e.g. (0018,9445) and (0028,0020)
if attr["VR"] == "" and attr["VM"] == "":
attr["VR"] = "OB"
attr["VM"] = "1"
attr["Name"] = "Retired-blank"

# handle retired 'repeating group' tags
# e.g. (50xx,eeee) or (gggg,31xx)
if "x" in group or "x" in elem:
Expand Down
Loading