Skip to content

Commit b5ccdab

Browse files
authored
Merge pull request #2514 from kesshijordan/satra_fix_specs
FIX: DTITK Interface
2 parents dc09e00 + 62e3456 commit b5ccdab

39 files changed

+1908
-829
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2510,7 +2510,7 @@ class TProjectInputSpec(AFNICommandInputSpec):
25102510
rather than the value stored in the dataset header.""",
25112511
argstr='-TR %g')
25122512
mask = File(
2513-
exist=True,
2513+
exists=True,
25142514
desc="""Only operate on voxels nonzero in the mset dataset.
25152515
++ Voxels outside the mask will be filled with zeros.
25162516
++ If no masking option is given, then all voxels

nipype/interfaces/afni/tests/test_auto_TProject.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ def test_TProject_inputs():
3232
mandatory=True,
3333
position=1,
3434
),
35-
mask=dict(
36-
argstr='-mask %s',
37-
exist=True,
38-
),
35+
mask=dict(argstr='-mask %s', ),
3936
noblock=dict(argstr='-noblock', ),
4037
norm=dict(argstr='-norm', ),
4138
num_threads=dict(

nipype/interfaces/dtitk/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"""
77

88
# from .base import ()
9-
from .registration import (RigidTask, AffineTask, DiffeoTask,
10-
ComposeXfmTask, diffeoSymTensor3DVolTask,
11-
affSymTensor3DVolTask, affScalarVolTask,
12-
diffeoScalarVolTask)
13-
from .utils import (TVAdjustOriginTask, TVAdjustVoxSpTask,
14-
SVAdjustVoxSpTask, TVResampleTask, SVResampleTask,
15-
TVtoolTask, BinThreshTask)
9+
from .registration import (Rigid, Affine, Diffeo,
10+
ComposeXfm, DiffeoSymTensor3DVol, AffSymTensor3DVol,
11+
AffScalarVol, DiffeoScalarVol)
12+
from .utils import (TVAdjustVoxSp, SVAdjustVoxSp, TVResample, SVResample,
13+
TVtool, BinThresh)

nipype/interfaces/dtitk/base.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
* Rigid Tensor Registration
1414
* Affine Tensor Registration
1515
* Diffeomorphic Tensor Registration
16+
* Combine affiine and diffeomorphic transforms
17+
* Application of transform to tensor and scalar volumes
18+
* Threshold and Binarize
19+
* Adjusting the voxel space of tensor and scalar volumes
20+
* Resampling tensor and scalar volumes
21+
* Calculation of tensor metrics from tensor volume
1622
1723
Examples
1824
--------
@@ -28,10 +34,26 @@
2834
from ...utils.filemanip import fname_presuffix
2935
from ..base import CommandLine
3036
from nipype.interfaces.fsl.base import Info
37+
import warnings
3138

3239
LOGGER = logging.getLogger('interface')
3340

3441

42+
class DTITKRenameMixin(object):
43+
def __init__(self, *args, **kwargs):
44+
classes = [cls.__name__ for cls in self.__class__.mro()]
45+
dep_name = classes[0]
46+
rename_idx = classes.index('DTITKRenameMixin')
47+
new_name = classes[rename_idx + 1]
48+
warnings.warn('The {} interface has been renamed to {}\n'
49+
'Please see the documentation for DTI-TK '
50+
'interfaces, as some inputs have been '
51+
'added or renamed for clarity.'
52+
''.format(dep_name, new_name),
53+
DeprecationWarning)
54+
super(DTITKRenameMixin, self).__init__(*args, **kwargs)
55+
56+
3557
class CommandLineDtitk(CommandLine):
3658

3759
def _gen_fname(self, basename, cwd=None, suffix=None, change_ext=True,

0 commit comments

Comments
 (0)