Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions monai/transforms/croppad/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
convert_data_type,
convert_to_dst_type,
convert_to_tensor,
deprecated_arg_default,
ensure_tuple,
ensure_tuple_rep,
fall_back_tuple,
Expand Down Expand Up @@ -585,6 +586,7 @@ class RandSpatialCrop(Randomizable, Crop):
if True, the actual size is sampled from `randint(roi_size, max_roi_size + 1)`.
"""

@deprecated_arg_default("random_size", True, False, since="1.1", replaced="1.3")
def __init__(
self,
roi_size: Sequence[int] | int,
Expand Down Expand Up @@ -647,6 +649,7 @@ class RandScaleCrop(RandSpatialCrop):
`randint(roi_scale * image spatial size, max_roi_scale * image spatial size + 1)`.
"""

@deprecated_arg_default("random_size", True, False, since="1.1", replaced="1.3")
def __init__(
self,
roi_scale: Sequence[float] | float,
Expand Down Expand Up @@ -713,6 +716,7 @@ class RandSpatialCropSamples(Randomizable, TraceableTransform):

backend = RandSpatialCrop.backend

@deprecated_arg_default("random_size", True, False, since="1.1", replaced="1.3")
def __init__(
self,
roi_size: Sequence[int] | int,
Expand Down
5 changes: 4 additions & 1 deletion monai/transforms/croppad/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from monai.transforms.inverse import InvertibleTransform
from monai.transforms.transform import MapTransform, Randomizable
from monai.transforms.utils import is_positive
from monai.utils import MAX_SEED, Method, PytorchPadMode, ensure_tuple_rep
from monai.utils import MAX_SEED, Method, PytorchPadMode, deprecated_arg_default, ensure_tuple_rep

__all__ = [
"Padd",
Expand Down Expand Up @@ -475,6 +475,7 @@ class RandSpatialCropd(RandCropd):
allow_missing_keys: don't raise exception if key is missing.
"""

@deprecated_arg_default("random_size", True, False, since="1.1", replaced="1.3")
def __init__(
self,
keys: KeysCollection,
Expand Down Expand Up @@ -513,6 +514,7 @@ class RandScaleCropd(RandCropd):
allow_missing_keys: don't raise exception if key is missing.
"""

@deprecated_arg_default("random_size", True, False, since="1.1", replaced="1.3")
def __init__(
self,
keys: KeysCollection,
Expand Down Expand Up @@ -564,6 +566,7 @@ class RandSpatialCropSamplesd(Randomizable, MapTransform):

backend = RandSpatialCropSamples.backend

@deprecated_arg_default("random_size", True, False, since="1.1", replaced="1.3")
def __init__(
self,
keys: KeysCollection,
Expand Down