(
self,
roi_size: Sequence[int] | int,
num_samples: int,
max_roi_size: Sequence[int] | int | None = None,
random_center: bool = True,
random_size: bool = False,
lazy: bool = False,
)
| 728 | backend = RandSpatialCrop.backend |
| 729 | |
| 730 | def __init__( |
| 731 | self, |
| 732 | roi_size: Sequence[int] | int, |
| 733 | num_samples: int, |
| 734 | max_roi_size: Sequence[int] | int | None = None, |
| 735 | random_center: bool = True, |
| 736 | random_size: bool = False, |
| 737 | lazy: bool = False, |
| 738 | ) -> None: |
| 739 | LazyTransform.__init__(self, lazy) |
| 740 | if num_samples < 1: |
| 741 | raise ValueError(f"num_samples must be positive, got {num_samples}.") |
| 742 | self.num_samples = num_samples |
| 743 | self.cropper = RandSpatialCrop(roi_size, max_roi_size, random_center, random_size, lazy) |
| 744 | |
| 745 | def set_random_state( |
| 746 | self, seed: int | None = None, state: np.random.RandomState | None = None |
nothing calls this directly
no test coverage detected