Skip to content

Commit

Permalink
Test for empty TotalPixelMatrixOriginSequence
Browse files Browse the repository at this point in the history
  • Loading branch information
erikogabrielsson committed Feb 14, 2024
1 parent 6b23403 commit 8e5c816
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/metadata/dicom_schema/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def dicom_image(image: Image, valid_dicom: bool):
origin.YOffsetInSlideCoordinateSystem = image.image_coordinate_system.origin.y

dataset.TotalPixelMatrixOriginSequence = [origin]
elif not valid_dicom:
dataset.ImageOrientationSlide = []
empty_origin = Dataset()
dataset.TotalPixelMatrixOriginSequence = [empty_origin]

if image.extended_depth_of_field is not None:
dataset.ExtendedDepthOfField = "YES"
dataset.NumberOfFocalPlanes = (
Expand Down

0 comments on commit 8e5c816

Please sign in to comment.