Skip to content

Commit

Permalink
馃敘 Use existing frame of reference uid if available
Browse files Browse the repository at this point in the history
  • Loading branch information
asim-shrestha committed Jan 6, 2023
1 parent 52b6f15 commit 516de85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions rt_utils/ds_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,8 @@ def add_patient_information(ds: FileDataset, series_data):

def add_refd_frame_of_ref_sequence(ds: FileDataset, series_data):
refd_frame_of_ref = Dataset()
refd_frame_of_ref.FrameOfReferenceUID = (
generate_uid()
) # TODO Find out if random generation is ok
refd_frame_of_ref.RTReferencedStudySequence = create_frame_of_ref_study_sequence(
series_data
)
refd_frame_of_ref.FrameOfReferenceUID = getattr(series_data[0], 'FrameOfReferenceUID', generate_uid())
refd_frame_of_ref.RTReferencedStudySequence = create_frame_of_ref_study_sequence(series_data)

# Add to sequence
ds.ReferencedFrameOfReferenceSequence = Sequence()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import setuptools

VERSION = "1.2.5"
VERSION = "1.2.6"
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
with open("requirements.txt") as f:
Expand Down

0 comments on commit 516de85

Please sign in to comment.