Apply the transform to `img`, assuming `img` is channel-first and slicing doesn't apply to the channel dim.
(self, img: torch.Tensor, randomize: bool = True, lazy: bool | None = None)
| 680 | super().randomize(img_size) |
| 681 | |
| 682 | def __call__(self, img: torch.Tensor, randomize: bool = True, lazy: bool | None = None) -> torch.Tensor: # type: ignore |
| 683 | """ |
| 684 | Apply the transform to `img`, assuming `img` is channel-first and |
| 685 | slicing doesn't apply to the channel dim. |
| 686 | |
| 687 | """ |
| 688 | self.get_max_roi_size(img.peek_pending_shape() if isinstance(img, MetaTensor) else img.shape[1:]) |
| 689 | lazy_ = self.lazy if lazy is None else lazy |
| 690 | return super().__call__(img=img, randomize=randomize, lazy=lazy_) |
| 691 | |
| 692 | |
| 693 | class RandSpatialCropSamples(Randomizable, TraceableTransform, LazyTransform, MultiSampleTrait): |
nothing calls this directly
no test coverage detected