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

allow decrop_image to be chained #571

Merged
merged 3 commits into from
Mar 15, 2024
Merged

allow decrop_image to be chained #571

merged 3 commits into from
Mar 15, 2024

Conversation

ncullen93
Copy link
Member

The decrop_image function was not able to be called in a chaining manner as all other image-related functions (including crop_image) can be. This PR fixes that without breaking any existing code.

The function still works exactly the same, but can now be optionally called directly from an image like this:

mni = ants.image_read(ants.get_ants_data('mni'))
mni_crop = mni.crop_image()
mni_decrop = mni_crop.decrop_image(mni) # this didnt work previously
# traditional way still works:
mni_decrop = ants.decrop_image(mni_crop, mni)

@ncullen93 ncullen93 merged commit 63ec454 into master Mar 15, 2024
18 checks passed
@ncullen93 ncullen93 deleted the chain-decrop-image branch March 15, 2024 14:32
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.

1 participant