Skip to content

Commit

Permalink
Fix resize not using order.
Browse files Browse the repository at this point in the history
  • Loading branch information
madil90 committed Mar 5, 2020
1 parent aa8dfbf commit abbb743
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion monai/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(self, output_shape, order=1, mode='reflect', cval=0,
self.anti_aliasing_sigma = anti_aliasing_sigma

def __call__(self, img):
return resize(img, self.output_shape,
return resize(img, self.output_shape, order=self.order,
mode=self.mode, cval=self.cval,
clip=self.clip, preserve_range=self.preserve_range,
anti_aliasing=self.anti_aliasing,
Expand Down
5 changes: 3 additions & 2 deletions tests/test_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def test_invalid_inputs(self, _, order, raises):
resize(self.imt)

@parameterized.expand([
((64, 64, 3), 1, 'reflect', 0, True, True, True, None),
((32, 32, 3), 2, 'constant', 1, False, False, False, None)
((1, 1, 64, 64), 1, 'reflect', 0, True, True, True, None),
((1, 1, 32, 32), 2, 'constant', 3, False, False, False, None),
((1, 1, 256, 256), 3, 'constant', 3, False, False, False, None),
])
def test_correct_results(self, output_shape, order, mode,
cval, clip, preserve_range,
Expand Down

0 comments on commit abbb743

Please sign in to comment.