MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / __call__

Method __call__

monai/transforms/croppad/array.py:480–487  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

478 )
479
480 def __call__(self, img: torch.Tensor, lazy: bool | None = None) -> torch.Tensor: # type: ignore[override]
481 """
482 Apply the transform to `img`, assuming `img` is channel-first and
483 slicing doesn't apply to the channel dim.
484
485 """
486 lazy_ = self.lazy if lazy is None else lazy
487 return super().__call__(img=img, slices=ensure_tuple(self.slices), lazy=lazy_)
488
489
490class CenterSpatialCrop(Crop):

Callers

nothing calls this directly

Calls 2

ensure_tupleFunction · 0.90
__call__Method · 0.45

Tested by

no test coverage detected