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

Method __init__

monai/transforms/spatial/dictionary.py:831–851  ·  view source on GitHub ↗
(
        self,
        keys: KeysCollection,
        spatial_size: Sequence[int] | int,
        size_mode: str = "all",
        mode: SequenceStr = InterpolateMode.AREA,
        align_corners: Sequence[bool | None] | bool | None = None,
        anti_aliasing: Sequence[bool] | bool = False,
        anti_aliasing_sigma: Sequence[Sequence[float] | float | None] | Sequence[float] | float | None = None,
        dtype: Sequence[DtypeLike | torch.dtype] | DtypeLike | torch.dtype = np.float32,
        allow_missing_keys: bool = False,
        lazy: bool = False,
    )

Source from the content-addressed store, hash-verified

829 backend = Resize.backend
830
831 def __init__(
832 self,
833 keys: KeysCollection,
834 spatial_size: Sequence[int] | int,
835 size_mode: str = "all",
836 mode: SequenceStr = InterpolateMode.AREA,
837 align_corners: Sequence[bool | None] | bool | None = None,
838 anti_aliasing: Sequence[bool] | bool = False,
839 anti_aliasing_sigma: Sequence[Sequence[float] | float | None] | Sequence[float] | float | None = None,
840 dtype: Sequence[DtypeLike | torch.dtype] | DtypeLike | torch.dtype = np.float32,
841 allow_missing_keys: bool = False,
842 lazy: bool = False,
843 ) -> None:
844 MapTransform.__init__(self, keys, allow_missing_keys)
845 LazyTransform.__init__(self, lazy=lazy)
846 self.mode = ensure_tuple_rep(mode, len(self.keys))
847 self.align_corners = ensure_tuple_rep(align_corners, len(self.keys))
848 self.dtype = ensure_tuple_rep(dtype, len(self.keys))
849 self.anti_aliasing = ensure_tuple_rep(anti_aliasing, len(self.keys))
850 self.anti_aliasing_sigma = ensure_tuple_rep(anti_aliasing_sigma, len(self.keys))
851 self.resizer = Resize(spatial_size=spatial_size, size_mode=size_mode, lazy=lazy)
852
853 @LazyTransform.lazy.setter # type: ignore
854 def lazy(self, val: bool) -> None:

Callers

nothing calls this directly

Calls 3

ensure_tuple_repFunction · 0.90
ResizeClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected