-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Expose ITK Image to MONAI MetaTensor conversion #5708
Comments
Hi, I would like to work on this issue. |
thanks @Shadow-Devil, there's an ongoing PR and possibly it's getting redirected to monai InsightSoftwareConsortium/itk-torch-transform-bridge#6. @ntatsisk Please let us know if you need any help or prefer us to take over the PR redirection. cc @thewtex @HastingsGreer |
Hi @Shadow-Devil, @wyli, and thanks for the interest! Feel free to take over the PR redirection, and I can help as well. I am looking forward to seeing this integrated to MONAI. :) I will try to do the final changes in the PR as soon as possible so that it is ready for the transfer. |
Moving these functions into MONAI proper would help with #5711. |
The proposed functions might not properly work, see: InsightSoftwareConsortium/itk-torch-transform-bridge#6 (comment) I suggest we should solve this first. |
Fixes #5708 Fixes #4117 ### Description This is a migration of the PR (by @ntatsisk https://github.com/ntatsisk) InsightSoftwareConsortium/itk-torch-transform-bridge#6 into MONAI. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Felix Schnabel <[email protected]>
In case someone knows what's causing this #6985 |
Is your feature request related to a problem? Please describe.
I am trying to convert easily between ITK Image and MONAI MetaTensor. Currently, I am using my own simple function that works for my partcular use case:
which more-or-less the code that lives insde
LoadImage
: https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/io/array.py#L273-L289Describe the solution you'd like
I would like that MONAI provides two functions e.g.
itk_image_to_metatensor()
andmetatensor_to_itk_image()
. The implementation of the first already exists insideLoadImage
transform (https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/io/array.py#L273-L289) and of the latter inside ITKWriter: https://github.com/Project-MONAI/MONAI/blob/dev/monai/data/image_writer.py#L470-L517. So, ideally they just need to be exposed in order for them to be more easily usable.Thanks in advance ;)
xref for us: InsightSoftwareConsortium/ITKElastix#126
The text was updated successfully, but these errors were encountered: