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

Method __init__

monai/transforms/utility/array.py:1223–1233  ·  view source on GitHub ↗

Args: name: The transform name in TorchIO package. args: parameters for the TorchIO transform. kwargs: parameters for the TorchIO transform.

(self, name: str, *args, **kwargs)

Source from the content-addressed store, hash-verified

1221 backend = [TransformBackends.TORCH]
1222
1223 def __init__(self, name: str, *args, **kwargs) -> None:
1224 """
1225 Args:
1226 name: The transform name in TorchIO package.
1227 args: parameters for the TorchIO transform.
1228 kwargs: parameters for the TorchIO transform.
1229 """
1230 super().__init__()
1231 self.name = name
1232 transform, _ = optional_import("torchio.transforms", "0.18.0", min_version, name=name)
1233 self.trans = transform(*args, **kwargs)
1234
1235 def __call__(self, img: NdarrayOrTensor | Mapping[Hashable, NdarrayOrTensor]):
1236 """

Callers

nothing calls this directly

Calls 2

optional_importFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected