-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Design discussionsrelated to the generic API designsrelated to the generic API designsgood first issueGood for newcomersGood for newcomers
Description
Is your feature request related to a problem? Please describe.
It would be useful to be able to invert certain transforms (notably spatial transforms). In this way, you could, for example, perform a segmentation on a cropped volume of the image, and then after inference you could inverse the cropping such that when saving to file, the segmentation can be superposed on the original image in an external viewer.
Describe the solution you'd like
After initial discussions, we've come up with this proposal:
- Have a new class
InvertibleTransforms. Classes that inherit from this have aninvertmethod implemented - When calling invertible transforms, add a serialisation of this transform to the image
- for this reason, we'll only work with dictionary data initially, as metadata can simply be added as another key in the dictionary
- The compose method will call the inverse methods in the reversed order (last in, first out).
- We will initially focus on spatial transforms, as these features are most desired. However, there is no reason not to expand this to non-spatial transforms if desired
Current progress is here: #1514.
see also: #365
LucasFidon
Metadata
Metadata
Assignees
Labels
Design discussionsrelated to the generic API designsrelated to the generic API designsgood first issueGood for newcomersGood for newcomers