(
self,
spatial_size: Sequence[int] | int,
num_samples: int = 1,
weight_map: NdarrayOrTensor | None = None,
lazy: bool = False,
)
| 971 | backend = SpatialCrop.backend |
| 972 | |
| 973 | def __init__( |
| 974 | self, |
| 975 | spatial_size: Sequence[int] | int, |
| 976 | num_samples: int = 1, |
| 977 | weight_map: NdarrayOrTensor | None = None, |
| 978 | lazy: bool = False, |
| 979 | ): |
| 980 | LazyTransform.__init__(self, lazy) |
| 981 | self.spatial_size = ensure_tuple(spatial_size) |
| 982 | self.num_samples = int(num_samples) |
| 983 | self.weight_map = weight_map |
| 984 | self.centers: list[np.ndarray] = [] |
| 985 | |
| 986 | def randomize(self, weight_map: NdarrayOrTensor) -> None: |
| 987 | self.centers = weighted_patch_samples( |
nothing calls this directly
no test coverage detected