MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_rotate90_default

Method test_rotate90_default

tests/transforms/test_rotate90.py:105–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103
104class TestRotate903d(NumpyImageTestCase3D):
105 def test_rotate90_default(self):
106 rotate = Rotate90()
107 for p in TEST_NDARRAYS_ALL:
108 im = p(self.imt[0])
109 call_param = {"img": im}
110 rotated = rotate(**call_param)
111
112 # test lazy
113 test_resampler_lazy(rotate, rotated, call_param=call_param)
114 rotate.lazy = False
115
116 test_local_inversion(rotate, rotated, im)
117 expected = [np.rot90(channel, 1, (0, 1)) for channel in self.imt[0]]
118 expected = np.stack(expected)
119 assert_allclose(rotated, p(expected), rtol=1.0e-5, atol=1.0e-8, type_test="tensor")
120
121 def test_k(self):
122 rotate = Rotate90(k=2)

Callers

nothing calls this directly

Calls 5

Rotate90Class · 0.90
test_resampler_lazyFunction · 0.90
test_local_inversionFunction · 0.90
assert_allcloseFunction · 0.90
rotateFunction · 0.85

Tested by

no test coverage detected