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)
The
decrop_image
function was not able to be called in a chaining manner as all other image-related functions (includingcrop_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: