| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from ....data.subject import Subject |
||
| 24 | def apply_transform(self, subject: Subject) -> Subject: |
||
| 25 | for image in self.get_images(subject): |
||
| 26 | old_orientation = image.orientation_str |
||
| 27 | new_orientation = old_orientation[::-1] |
||
| 28 | transform = ToOrientation(new_orientation) |
||
| 29 | transposed = transform(image) |
||
| 30 | image.set_data(transposed.data) |
||
| 31 | image.affine = transposed.affine |
||
| 32 | return subject |
||
| 33 | |||
| 39 |