Skip to content

Commit 4bd928b

Browse files
committed
ENH: Restore apply method, warning of deprecation and calling function
1 parent a9a9fda commit 4bd928b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

nitransforms/base.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,19 @@ def _to_hdf5(self, x5_root):
259259
"""Serialize this object into the x5 file format."""
260260
raise NotImplementedError
261261

262+
def apply(self, *args, **kwargs):
263+
"""Apply the transform to a dataset.
264+
265+
Deprecated. Please use ``nitransforms.resampling.apply`` instead.
266+
"""
267+
warnings.warn(
268+
"The `apply` method is deprecated. Please use `nitransforms.resampling.apply` instead.",
269+
DeprecationWarning,
270+
)
271+
from .resampling import apply
272+
273+
return apply(self, *args, **kwargs)
274+
262275

263276
def _as_homogeneous(xyz, dtype="float32", dim=3):
264277
"""

0 commit comments

Comments
 (0)