Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: KumoLiu <[email protected]>
  • Loading branch information
KumoLiu committed Sep 4, 2023
1 parent 50e66fa commit 1558bf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion monai/auto3dseg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_foreground_image(image: MetaTensor) -> np.ndarray:
the size of the output is smaller than the input.
"""

copper = CropForeground(select_fn=lambda x: x > 0)
copper = CropForeground(select_fn=lambda x: x > 0, allow_smaller=False)
image_foreground = copper(image)
return cast(np.ndarray, image_foreground)

Expand Down
4 changes: 2 additions & 2 deletions monai/transforms/utils_create_transform_ims.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ def create_transform_im(
)
create_transform_im(DivisiblePad, dict(k=64), data)
create_transform_im(DivisiblePadd, dict(keys=keys, k=64), data)
create_transform_im(CropForeground, dict(), data)
create_transform_im(CropForegroundd, dict(keys=keys, source_key=CommonKeys.IMAGE), data)
create_transform_im(CropForeground, dict(allow_smaller=False), data)
create_transform_im(CropForegroundd, dict(keys=keys, source_key=CommonKeys.IMAGE, allow_smaller=False), data)
create_transform_im(RandGaussianNoise, dict(prob=1, mean=0, std=0.1), data)
create_transform_im(RandGaussianNoised, dict(keys=CommonKeys.IMAGE, prob=1, mean=0, std=0.1), data)
create_transform_im(KSpaceSpikeNoise, dict(loc=(100, 100, 100), k_intensity=13), data)
Expand Down

0 comments on commit 1558bf8

Please sign in to comment.