(self)
| 218 | self.assertTupleEqual(result["img"].shape, (1, 101, 102, 103)) |
| 219 | |
| 220 | def test_inverse_metatensor(self): |
| 221 | transform = Compose( |
| 222 | [ |
| 223 | Resize(spatial_size=[100, 100, 100]), |
| 224 | OneOf([RandScaleIntensity(factors=0.5, prob=1.0), RandShiftIntensity(offsets=0.5, prob=1.0)]), |
| 225 | OneOf([RandScaleIntensity(factors=0.5, prob=1.0), RandShiftIntensity(offsets=0.5, prob=1.0)]), |
| 226 | ] |
| 227 | ) |
| 228 | transform.set_random_state(seed=0) |
| 229 | result = transform(np.ones((1, 101, 102, 103))) |
| 230 | self.assertTupleEqual(result.shape, (1, 100, 100, 100)) |
| 231 | result = transform.inverse(result) |
| 232 | self.assertTupleEqual(result.shape, (1, 101, 102, 103)) |
| 233 | |
| 234 | def test_one_of(self): |
| 235 | p = OneOf((A(), B(), C()), (1, 2, 1)) |
nothing calls this directly
no test coverage detected