Skip to content
Merged
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
6 changes: 5 additions & 1 deletion src/highdicom/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"""Default tolerance on the dot product to determine perpendicularity."""


_DEFAULT_ORTHOGONAL_TOLERANCE = 1e-4
"""Default tolerance on the matrix elements to determine orthogonality."""


PATIENT_ORIENTATION_OPPOSITES = {
PatientOrientationValuesBiped.L: PatientOrientationValuesBiped.R,
PatientOrientationValuesBiped.R: PatientOrientationValuesBiped.L,
Expand Down Expand Up @@ -957,7 +961,7 @@ def get_closest_patient_orientation(affine: np.ndarray) -> tuple[
def _is_matrix_orthogonal(
m: np.ndarray,
require_unit: bool = True,
tol: float = _DEFAULT_EQUALITY_TOLERANCE,
tol: float = _DEFAULT_ORTHOGONAL_TOLERANCE,
) -> bool:
"""Check whether a matrix is orthogonal.

Expand Down