Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 23, 2024
1 parent 690a3c1 commit 54422e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions monai/transforms/utility/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -1727,12 +1727,12 @@ class ApplyTransformToPoints(InvertibleTransform, Transform):
invert_affine: Whether to invert the affine transformation matrix applied to the points. Defaults to ``True``.
Typically, the affine matrix is derived from the image, while the points are in world coordinates.
If you want to align the points with the image, set this to ``True``. Otherwise, set it to ``False``.
affine_lps_to_ras: Defaults to ``False``. Set this to ``True`` if all of the following are true:
1) The image is read by `ITKReader`,
2) The `ITKReader` has `affine_lps_to_ras=True`,
affine_lps_to_ras: Defaults to ``False``. Set this to ``True`` if all of the following are true:
1) The image is read by `ITKReader`,
2) The `ITKReader` has `affine_lps_to_ras=True`,
3) The data is in world coordinates.
This ensures the correct application of the affine transformation between LPS (left-posterior-superior)
and RAS (right-anterior-superior) coordinate systems. This argument ensures the points and the affine
This ensures the correct application of the affine transformation between LPS (left-posterior-superior)
and RAS (right-anterior-superior) coordinate systems. This argument ensures the points and the affine
matrix are in the same coordinate system.
"""

Expand Down Expand Up @@ -1810,7 +1810,7 @@ def __call__(self, data: torch.Tensor, affine: torch.Tensor | None = None) -> to
"""
Args:
data: The input coordinates, assume to be in shape (C, N, 2 or 3).
affine: A 3x3 or 4x4 affine transformation matrix, this argument will take precedence over ``self.affine``.
affine: A 3x3 or 4x4 affine transformation matrix, this argument will take precedence over ``self.affine``.
"""
if data.ndim != 3 or data.shape[-1] not in (2, 3):
raise ValueError(f"data should be in shape (C, N, 2 or 3), got {data.shape}.")
Expand Down
10 changes: 5 additions & 5 deletions monai/transforms/utility/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -1755,12 +1755,12 @@ class ApplyTransformToPointsd(MapTransform, InvertibleTransform):
invert_affine: Whether to invert the affine transformation matrix applied to the points. Defaults to ``True``.
Typically, the affine matrix is derived from the image, while the points are in world coordinates.
If you want to align the points with the image, set this to ``True``. Otherwise, set it to ``False``.
affine_lps_to_ras: Defaults to ``False``. Set this to ``True`` if all of the following are true:
1) The image is read by `ITKReader`,
2) The `ITKReader` has `affine_lps_to_ras=True`,
affine_lps_to_ras: Defaults to ``False``. Set this to ``True`` if all of the following are true:
1) The image is read by `ITKReader`,
2) The `ITKReader` has `affine_lps_to_ras=True`,
3) The data is in world coordinates.
This ensures the correct application of the affine transformation between LPS (left-posterior-superior)
and RAS (right-anterior-superior) coordinate systems. This argument ensures the points and the affine
This ensures the correct application of the affine transformation between LPS (left-posterior-superior)
and RAS (right-anterior-superior) coordinate systems. This argument ensures the points and the affine
matrix are in the same coordinate system.
allow_missing_keys: Don't raise exception if key is missing.
"""
Expand Down

0 comments on commit 54422e5

Please sign in to comment.