Args: keys: keys of the corresponding items to be transformed. See also: :py:class:`monai.transforms.compose.MapTransform` channel_dim: which dimension of input image is the channel, default is the first dimension. allow_missing_keys: don'
(self, keys: KeysCollection, channel_dim: int = 0, allow_missing_keys: bool = False)
| 239 | backend = AsChannelLast.backend |
| 240 | |
| 241 | def __init__(self, keys: KeysCollection, channel_dim: int = 0, allow_missing_keys: bool = False) -> None: |
| 242 | """ |
| 243 | Args: |
| 244 | keys: keys of the corresponding items to be transformed. |
| 245 | See also: :py:class:`monai.transforms.compose.MapTransform` |
| 246 | channel_dim: which dimension of input image is the channel, default is the first dimension. |
| 247 | allow_missing_keys: don't raise exception if key is missing. |
| 248 | """ |
| 249 | super().__init__(keys, allow_missing_keys) |
| 250 | self.converter = AsChannelLast(channel_dim=channel_dim) |
| 251 | |
| 252 | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]: |
| 253 | d = dict(data) |
nothing calls this directly
no test coverage detected