ENH: Add SimpleITK Image to ITK Image conversion support#6021
Draft
blowekamp wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
Draft
ENH: Add SimpleITK Image to ITK Image conversion support#6021blowekamp wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
blowekamp wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
Conversation
Member
|
@blowekamp I made a note this morning that this was going to be needed :)! You must have heard my thoughts! |
Member
Author
|
@dzenanz Raised this issue here: SimpleITK/SimpleITK#2531 |
dzenanz
approved these changes
Apr 7, 2026
hjmjohnson
requested changes
Apr 7, 2026
Member
hjmjohnson
left a comment
There was a problem hiding this comment.
Can you comment on the missing "Image buffer start index" that is missing?
hjmjohnson
approved these changes
Apr 8, 2026
- Implement image_from_simpleitk() function for converting SimpleITK images to ITK images - Support 2D, 3D, and multi-component (vector) images - Preserve spacing, origin, and direction metadata - Preserve MetaData dictionary entries - Integrate SimpleITK support into filter auto-conversion decorator - Add comprehensive tests for conversion functionality
f3b51ac to
98916f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a "generic" interface for an "itk-like" python image object. The itk-like object can be converted to a numpy array and contains "spacing", "direction", and "origin" keys. This should be an interface both ITK and SimpleITK images provide.
Any thoughts on this type of interface?
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.