(self)
| 53 | set_track_meta(True) |
| 54 | |
| 55 | def test_k(self): |
| 56 | rotate = Rotate90(k=2) |
| 57 | for p in TEST_NDARRAYS_ALL: |
| 58 | im = p(self.imt[0]) |
| 59 | call_param = {"img": im} |
| 60 | rotated = rotate(**call_param) |
| 61 | |
| 62 | # test lazy |
| 63 | test_resampler_lazy(rotate, rotated, call_param=call_param) |
| 64 | rotate.lazy = False |
| 65 | |
| 66 | test_local_inversion(rotate, rotated, im) |
| 67 | expected = [np.rot90(channel, 2, (0, 1)) for channel in self.imt[0]] |
| 68 | expected = np.stack(expected) |
| 69 | assert_allclose(rotated, p(expected), rtol=1.0e-5, atol=1.0e-8, type_test="tensor") |
| 70 | |
| 71 | def test_spatial_axes(self): |
| 72 | rotate = Rotate90(spatial_axes=(0, -1)) |
nothing calls this directly
no test coverage detected