def __init__(self, keys: KeysCollection, repeats: int) -> None: """ 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. """ super().__init__(keys) self.repeater = RemoveRepeatedChannel(repeats)
def __init__(self, keys: KeysCollection, repeats: int, allow_missing_keys: bool = False) -> None: """ 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. """ super().__init__(keys, allow_missing_keys) self.repeater = RemoveRepeatedChannel(repeats)