Args: box_keys: Keys to pick data for transformation. src_mode: source box mode. If it is not given, this func will assume it is ``StandardMode()``. It follows the same format with ``src_mode`` in :class:`~monai.apps.detection.transforms.array.Convert
(
self,
box_keys: KeysCollection,
src_mode: str | BoxMode | type[BoxMode] | None = None,
dst_mode: str | BoxMode | type[BoxMode] | None = None,
allow_missing_keys: bool = False,
)
| 157 | """ |
| 158 | |
| 159 | def __init__( |
| 160 | self, |
| 161 | box_keys: KeysCollection, |
| 162 | src_mode: str | BoxMode | type[BoxMode] | None = None, |
| 163 | dst_mode: str | BoxMode | type[BoxMode] | None = None, |
| 164 | allow_missing_keys: bool = False, |
| 165 | ) -> None: |
| 166 | """ |
| 167 | Args: |
| 168 | box_keys: Keys to pick data for transformation. |
| 169 | src_mode: source box mode. If it is not given, this func will assume it is ``StandardMode()``. |
| 170 | It follows the same format with ``src_mode`` in :class:`~monai.apps.detection.transforms.array.ConvertBoxMode` . |
| 171 | dst_mode: target box mode. If it is not given, this func will assume it is ``StandardMode()``. |
| 172 | It follows the same format with ``src_mode`` in :class:`~monai.apps.detection.transforms.array.ConvertBoxMode` . |
| 173 | allow_missing_keys: don't raise exception if key is missing. |
| 174 | |
| 175 | See also :py:class:`monai.apps.detection,transforms.array.ConvertBoxMode` |
| 176 | """ |
| 177 | super().__init__(box_keys, allow_missing_keys) |
| 178 | self.converter = ConvertBoxMode(src_mode=src_mode, dst_mode=dst_mode) |
| 179 | |
| 180 | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]: |
| 181 | d = dict(data) |
nothing calls this directly
no test coverage detected