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

Method __init__

monai/transforms/croppad/array.py:1426–1436  ·  view source on GitHub ↗
(
        self,
        spatial_size: Sequence[int] | int,
        method: str = Method.SYMMETRIC,
        mode: str = PytorchPadMode.CONSTANT,
        lazy: bool = False,
        **pad_kwargs,
    )

Source from the content-addressed store, hash-verified

1424 backend = list(set(SpatialPad.backend) & set(CenterSpatialCrop.backend))
1425
1426 def __init__(
1427 self,
1428 spatial_size: Sequence[int] | int,
1429 method: str = Method.SYMMETRIC,
1430 mode: str = PytorchPadMode.CONSTANT,
1431 lazy: bool = False,
1432 **pad_kwargs,
1433 ):
1434 LazyTransform.__init__(self, lazy)
1435 self.padder = SpatialPad(spatial_size=spatial_size, method=method, mode=mode, lazy=lazy, **pad_kwargs)
1436 self.cropper = CenterSpatialCrop(roi_size=spatial_size, lazy=lazy)
1437
1438 @LazyTransform.lazy.setter # type: ignore
1439 def lazy(self, val: bool):

Callers

nothing calls this directly

Calls 3

SpatialPadClass · 0.85
CenterSpatialCropClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected