Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 2 additions & 6 deletions src/highdicom/pr/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,13 +842,9 @@ def _add_presentation_state_identification_attributes(
'Argument "content_creator_identification" must be of type '
'ContentCreatorIdentificationCodeSequence.'
)
dataset.ContentCreatorIdentificationCodeSequence = \
dataset.ContentCreatorIdentificationCodeSequence = (
content_creator_identification

# Not technically part of PR IODs, but we include anyway
now = datetime.datetime.now()
dataset.ContentDate = DA(now.date())
dataset.ContentTime = TM(now.time())
)


def _add_presentation_state_relationship_attributes(
Expand Down
3 changes: 3 additions & 0 deletions tests/test_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,7 @@ def test_construction(self):
assert hasattr(pr, 'RescaleType')
assert pr.RescaleIntercept == self._ct_series[0].RescaleIntercept
assert pr.RescaleSlope == self._ct_series[0].RescaleSlope
assert 'ContentDate' not in pr

def test_construction_with_modality_rescale(self):
gsps = GrayscaleSoftcopyPresentationState(
Expand Down Expand Up @@ -1158,6 +1159,7 @@ def test_construction_with_modality_rescale(self):
assert gsps.RescaleIntercept == 1024
assert gsps.RescaleType == 'HU'
assert not hasattr(gsps, 'ModalityLUTSequence')
assert 'ContentDate' not in gsps

def test_construction_with_modality_lut(self):
gsps = GrayscaleSoftcopyPresentationState(
Expand Down Expand Up @@ -1200,6 +1202,7 @@ def test_construction_with_modality_lut(self):
assert not hasattr(gsps, 'RescaleIntercept')
assert not hasattr(gsps, 'RescaleType')
assert len(gsps.ModalityLUTSequence) == 1
assert 'ContentDate' not in gsps

def test_construction_with_copy_modality_lut(self):
gsps = GrayscaleSoftcopyPresentationState(
Expand Down
Loading