[5d12a0]: / ants / decorators.py

Download this file

10 lines (8 with data), 261 Bytes

1
2
3
4
5
6
7
8
9
from functools import wraps
from ants.core.ants_image import ANTsImage
def image_method(func):
@wraps(func)
def wrapper(self, *args, **kwargs):
return func(self, *args, **kwargs)
setattr(ANTsImage, func.__name__, wrapper)
return func