Skip to content
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

add SimpleITK.Image to ANTsImage conversion #726

Merged
merged 8 commits into from
Nov 19, 2024
Merged

Conversation

dyollb
Copy link
Contributor

@dyollb dyollb commented Nov 8, 2024

  • add helper function to get an ANTsImage from a SimpleITK.Image
  • add test that does the roundtrip

@dyollb dyollb changed the title add sitk_to_ants add SimpleITK.Image to ANTsImage conversion Nov 8, 2024
@coveralls
Copy link

coveralls commented Nov 8, 2024

Coverage Status

coverage: 85.061% (-0.3%) from 85.358%
when pulling 3433a63 on dyollb:sitk_to_ants
into f079ba6 on ANTsX:master.

@dyollb
Copy link
Contributor Author

dyollb commented Nov 9, 2024

I guess the coverage went down because the test doesn't run unless SimpleITK is installed. Should I install it in the CI?

@cookpa
Copy link
Member

cookpa commented Nov 15, 2024

This looks very useful. We have other functions like from_numpy() so maybe we should name similarly, eg from_sitk(sitk image) and to_sitk(ANTsImage)?

@dyollb
Copy link
Contributor Author

dyollb commented Nov 15, 2024

This looks very useful. We have other functions like from_numpy() so maybe we should name similarly, eg from_sitk(sitk image) and to_sitk(ANTsImage)?

would you also rename the module?

Update: I renamed the functions.

@cookpa
Copy link
Member

cookpa commented Nov 18, 2024

This is shaping up, @dyollb would you mind editing ants/utils/__init__.py to import the functions, so they can be called as ants.from_sitk etc

@cookpa
Copy link
Member

cookpa commented Nov 19, 2024

This LGTM, thanks

@cookpa cookpa merged commit 2c624f7 into ANTsX:master Nov 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants