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)
| 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 | """ |
nothing calls this directly
no test coverage detected