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

Method __init__

monai/transforms/intensity/array.py:768–782  ·  view source on GitHub ↗
(
        self,
        degree: int = 3,
        coeff_range: tuple[float, float] = (0.0, 0.1),
        dtype: DtypeLike = np.float32,
        prob: float = 0.1,
    )

Source from the content-addressed store, hash-verified

766 backend = [TransformBackends.NUMPY]
767
768 def __init__(
769 self,
770 degree: int = 3,
771 coeff_range: tuple[float, float] = (0.0, 0.1),
772 dtype: DtypeLike = np.float32,
773 prob: float = 0.1,
774 ) -> None:
775 RandomizableTransform.__init__(self, prob)
776 if degree < 1:
777 raise ValueError(f"degree should be no less than 1, got {degree}.")
778 self.degree = degree
779 self.coeff_range = coeff_range
780 self.dtype = dtype
781
782 self._coeff = [1.0]
783
784 def _generate_random_field(self, spatial_shape: Sequence[int], degree: int, coeff: Sequence[float]):
785 """

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected