Args: k: number of times to rotate by 90 degrees. spatial_axes: 2 int numbers, defines the plane to rotate with 2 spatial axes. Default: (0, 1), this is the first two axis in spatial dimensions. allow_missing_keys: don't raise exception if
(
self,
keys: KeysCollection,
k: int = 1,
spatial_axes: tuple[int, int] = (0, 1),
allow_missing_keys: bool = False,
lazy: bool = False,
)
| 646 | backend = Rotate90.backend |
| 647 | |
| 648 | def __init__( |
| 649 | self, |
| 650 | keys: KeysCollection, |
| 651 | k: int = 1, |
| 652 | spatial_axes: tuple[int, int] = (0, 1), |
| 653 | allow_missing_keys: bool = False, |
| 654 | lazy: bool = False, |
| 655 | ) -> None: |
| 656 | """ |
| 657 | Args: |
| 658 | k: number of times to rotate by 90 degrees. |
| 659 | spatial_axes: 2 int numbers, defines the plane to rotate with 2 spatial axes. |
| 660 | Default: (0, 1), this is the first two axis in spatial dimensions. |
| 661 | allow_missing_keys: don't raise exception if key is missing. |
| 662 | lazy: a flag to indicate whether this transform should execute lazily or not. |
| 663 | Defaults to False |
| 664 | """ |
| 665 | MapTransform.__init__(self, keys, allow_missing_keys) |
| 666 | LazyTransform.__init__(self, lazy=lazy) |
| 667 | self.rotator = Rotate90(k, spatial_axes, lazy=lazy) |
| 668 | |
| 669 | @LazyTransform.lazy.setter # type: ignore |
| 670 | def lazy(self, val: bool) -> None: |