Apply the transform to `img`, assuming `img` is channel-first and slicing doesn't apply to the channel dim.
(self, img: torch.Tensor, lazy: bool | None = None)
| 516 | return super().compute_slices(roi_center=roi_center, roi_size=roi_size) |
| 517 | |
| 518 | def __call__(self, img: torch.Tensor, lazy: bool | None = None) -> torch.Tensor: # type: ignore[override] |
| 519 | """ |
| 520 | Apply the transform to `img`, assuming `img` is channel-first and |
| 521 | slicing doesn't apply to the channel dim. |
| 522 | |
| 523 | """ |
| 524 | lazy_ = self.lazy if lazy is None else lazy |
| 525 | return super().__call__( |
| 526 | img=img, |
| 527 | slices=self.compute_slices(img.peek_pending_shape() if isinstance(img, MetaTensor) else img.shape[1:]), |
| 528 | lazy=lazy_, |
| 529 | ) |
| 530 | |
| 531 | |
| 532 | class CenterScaleCrop(Crop): |
nothing calls this directly
no test coverage detected