Skip to content

Commit

Permalink
add MR as an SOP Class that can be used for doing a Force Link
Browse files Browse the repository at this point in the history
  • Loading branch information
sjswerdloff committed Apr 20, 2024
1 parent efb8ac6 commit e88aba1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Model/ForceLink.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ def force_link(frame_overwrite, file_path, dicom_array_in):
new_id = ""
new_study_id = ""
for dicom_file in dicom:
if dicom_file.FrameOfReferenceUID == frame_overwrite and \
dicom_file.SOPClassUID == src.dicom_constants.CT_IMAGE:
if (
(dicom_file.FrameOfReferenceUID == frame_overwrite)
and
(dicom_file.SOPClassUID == src.dicom_constants.CT_IMAGE
or
dicom_file.SOPClassUID == src.dicom_constants.MR_IMAGE)
):

new_id = dicom_file.FrameOfReferenceUID
new_study_id = dicom_file.StudyInstanceUID
break
Expand Down
1 change: 1 addition & 0 deletions src/dicom_constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Contains DICOM standard SOP class UID"""

CT_IMAGE = "1.2.840.10008.5.1.4.1.1.2"
MR_IMAGE = "1.2.840.10008.5.1.4.1.1.4"
RT_STRUCTURE_SET = "1.2.840.10008.5.1.4.1.1.481.3"
RT_DOSE = "1.2.840.10008.5.1.4.1.1.481.2"
RT_PLAN = "1.2.840.10008.5.1.4.1.1.481.5"
Expand Down

0 comments on commit e88aba1

Please sign in to comment.