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

Method __init__

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

Source from the content-addressed store, hash-verified

207 """
208
209 def __init__(
210 self,
211 spatial_size: Sequence[int] | int | tuple[tuple[int, ...] | int, ...],
212 method: str = Method.SYMMETRIC,
213 mode: str = PytorchPadMode.CONSTANT,
214 lazy: bool = False,
215 **kwargs,
216 ) -> None:
217 self.spatial_size = spatial_size
218 self.method: Method = look_up_option(method, Method)
219 super().__init__(mode=mode, lazy=lazy, **kwargs)
220
221 def compute_pad_width(self, spatial_shape: Sequence[int]) -> tuple[tuple[int, int]]:
222 """

Callers

nothing calls this directly

Calls 2

look_up_optionFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected