Skip to content

Commit 78ac03b

Browse files
committed
docs: add Warns section to _get_affine docstring documenting the missing-tag warning
Signed-off-by: Raphael Malikian <rtmalikian@gmail.com>
1 parent 05aa9f2 commit 78ac03b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

monai/data/image_reader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,11 @@ def _get_affine(self, metadata: dict, lps_to_ras: bool = True):
735735
metadata: metadata with dict type.
736736
lps_to_ras: whether to convert the affine matrix from "LPS" to "RAS". Defaults to True.
737737
738+
Warns:
739+
UserWarning: when ImageOrientationPatient (00200037) or ImagePositionPatient
740+
(00200032) is missing from metadata. The affine matrix is set to identity,
741+
which may be incorrect. Common with multiframe DICOM files.
742+
738743
"""
739744
affine: np.ndarray = np.eye(4)
740745
if not ("00200037" in metadata and "00200032" in metadata):

0 commit comments

Comments
 (0)