Skip to content

Commit

Permalink
fix order of mppx and mppy in Phillips parser
Browse files Browse the repository at this point in the history
According to the DICOM spec, the first value is row mpp and second is column mpp.

> Physical distance in the imaging target (patient, specimen, or phantom) between the centers of each pixel, specified by a numeric pair - adjacent row spacing (delimiter) adjacent column spacing in mm. See Section 10.7.1.3 for further explanation of the value order.

source: https://dicom.innolitics.com/ciods/vl-whole-slide-microscopy-image/vl-whole-slide-microscopy-image-multi-frame-functional-groups/52009230/00289110/00280030

Related to #80 (review)
  • Loading branch information
kaczmarj authored Nov 30, 2023
1 parent 525e1ed commit d386395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tiffslide/tiffslide.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ def get_first_attribute_with_name(
float(element.strip('"')) * 1000
for element in pixel_spacing_attribute.split(" ")
]
mpp_x, mpp_y = pixel_spacings[0], pixel_spacings[1]
mpp_y, mpp_x = pixel_spacings[0], pixel_spacings[1]
md[PROPERTY_NAME_MPP_X] = mpp_x
md[PROPERTY_NAME_MPP_Y] = mpp_y
return md
Expand Down

0 comments on commit d386395

Please sign in to comment.