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

Method __init__

monai/transforms/utility/dictionary.py:216–225  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

IdentityClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected