(self)
| 103 | |
| 104 | class 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) |
nothing calls this directly
no test coverage detected