Args: img: channel first array, must have shape: (num_channels, H[, W, ..., ]), lazy: a flag to indicate whether this transform should execute lazily or not during this call. Setting this to False or True overrides the ``lazy`` flag set
(self, img: torch.Tensor, lazy: bool | None = None)
| 1208 | self.spatial_axes = spatial_axes_ |
| 1209 | |
| 1210 | def __call__(self, img: torch.Tensor, lazy: bool | None = None) -> torch.Tensor: |
| 1211 | """ |
| 1212 | Args: |
| 1213 | img: channel first array, must have shape: (num_channels, H[, W, ..., ]), |
| 1214 | lazy: a flag to indicate whether this transform should execute lazily or not |
| 1215 | during this call. Setting this to False or True overrides the ``lazy`` flag set |
| 1216 | during initialization for this call. Defaults to None. |
| 1217 | """ |
| 1218 | img = convert_to_tensor(img, track_meta=get_track_meta()) |
| 1219 | axes = map_spatial_axes(img.ndim, self.spatial_axes) |
| 1220 | lazy_ = self.lazy if lazy is None else lazy |
| 1221 | return rotate90(img, axes, self.k, lazy=lazy_, transform_info=self.get_transform_info()) # type: ignore |
| 1222 | |
| 1223 | def inverse(self, data: torch.Tensor) -> torch.Tensor: |
| 1224 | transform = self.pop_transform(data) |
nothing calls this directly
no test coverage detected