Args: keys: keys of the corresponding items to be transformed. See also: :py:class:`monai.transforms.compose.MapTransform` allow_missing_keys: don't raise exception if key is missing.
(self, keys: KeysCollection, allow_missing_keys: bool = False)
| 214 | backend = Identity.backend |
| 215 | |
| 216 | def __init__(self, keys: KeysCollection, allow_missing_keys: bool = False) -> None: |
| 217 | """ |
| 218 | Args: |
| 219 | keys: keys of the corresponding items to be transformed. |
| 220 | See also: :py:class:`monai.transforms.compose.MapTransform` |
| 221 | allow_missing_keys: don't raise exception if key is missing. |
| 222 | |
| 223 | """ |
| 224 | super().__init__(keys, allow_missing_keys) |
| 225 | self.identity = Identity() |
| 226 | |
| 227 | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]: |
| 228 | d = dict(data) |