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

Method __init__

monai/transforms/intensity/dictionary.py:741–765  ·  view source on GitHub ↗

Args: keys: keys of the corresponding items to be transformed. See also: :py:class:`monai.transforms.compose.MapTransform` degree: degree of freedom of the polynomials. The value should be no less than 1. Defaults to 3. coe

(
        self,
        keys: KeysCollection,
        degree: int = 3,
        coeff_range: tuple[float, float] = (0.0, 0.1),
        dtype: DtypeLike = np.float32,
        prob: float = 0.1,
        allow_missing_keys: bool = False,
    )

Source from the content-addressed store, hash-verified

739 backend = RandBiasField.backend
740
741 def __init__(
742 self,
743 keys: KeysCollection,
744 degree: int = 3,
745 coeff_range: tuple[float, float] = (0.0, 0.1),
746 dtype: DtypeLike = np.float32,
747 prob: float = 0.1,
748 allow_missing_keys: bool = False,
749 ) -> None:
750 """
751 Args:
752 keys: keys of the corresponding items to be transformed.
753 See also: :py:class:`monai.transforms.compose.MapTransform`
754 degree: degree of freedom of the polynomials. The value should be no less than 1.
755 Defaults to 3.
756 coeff_range: range of the random coefficients. Defaults to (0.0, 0.1).
757 dtype: output data type, if None, same as input image. defaults to float32.
758 prob: probability to do random bias field.
759 allow_missing_keys: don't raise exception if key is missing.
760
761 """
762 MapTransform.__init__(self, keys, allow_missing_keys)
763 RandomizableTransform.__init__(self, prob)
764
765 self.rand_bias_field = RandBiasField(degree=degree, coeff_range=coeff_range, dtype=dtype, prob=1.0)
766
767 def set_random_state(self, seed: int | None = None, state: np.random.RandomState | None = None) -> RandBiasFieldd:
768 super().set_random_state(seed, state)

Callers

nothing calls this directly

Calls 2

RandBiasFieldClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected