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

Method __init__

monai/transforms/post/dictionary.py:389–399  ·  view source on GitHub ↗

Args: keys: keys of the corresponding items to be transformed. See also: :py:class:`monai.transforms.compose.MapTransform` kernel_type: the method applied to do edge detection, default is "Laplace". allow_missing_keys: don't raise exceptio

(self, keys: KeysCollection, kernel_type: str = "Laplace", allow_missing_keys: bool = False)

Source from the content-addressed store, hash-verified

387 backend = LabelToContour.backend
388
389 def __init__(self, keys: KeysCollection, kernel_type: str = "Laplace", allow_missing_keys: bool = False) -> None:
390 """
391 Args:
392 keys: keys of the corresponding items to be transformed.
393 See also: :py:class:`monai.transforms.compose.MapTransform`
394 kernel_type: the method applied to do edge detection, default is "Laplace".
395 allow_missing_keys: don't raise exception if key is missing.
396
397 """
398 super().__init__(keys, allow_missing_keys)
399 self.converter = LabelToContour(kernel_type=kernel_type)
400
401 def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]:
402 d = dict(data)

Callers

nothing calls this directly

Calls 2

LabelToContourClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected