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

Method __init__

monai/transforms/utility/dictionary.py:298–307  ·  view source on GitHub ↗

Args: keys: keys of the corresponding items to be transformed. See also: :py:class:`monai.transforms.compose.MapTransform` repeats: the number of repetitions for each element. allow_missing_keys: don't raise exception if key is missing.

(self, keys: KeysCollection, repeats: int, allow_missing_keys: bool = False)

Source from the content-addressed store, hash-verified

296 backend = RepeatChannel.backend
297
298 def __init__(self, keys: KeysCollection, repeats: int, allow_missing_keys: bool = False) -> None:
299 """
300 Args:
301 keys: keys of the corresponding items to be transformed.
302 See also: :py:class:`monai.transforms.compose.MapTransform`
303 repeats: the number of repetitions for each element.
304 allow_missing_keys: don't raise exception if key is missing.
305 """
306 super().__init__(keys, allow_missing_keys)
307 self.repeater = RepeatChannel(repeats)
308
309 def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]:
310 d = dict(data)

Callers

nothing calls this directly

Calls 2

RepeatChannelClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected