Skip to content

Commit 1127b4d

Browse files
committed
added # doctest: +SKIP
1 parent 7b8b5db commit 1127b4d

21 files changed

+898
-35
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class AlignEpiAnatPyOutputSpec(TraitedSpec):
119119
desc="matrix to volume register and align epi"
120120
"to anatomy and put into standard space")
121121
epi_vr_motion = File(
122-
desc="motion parameters from EPI time-series"
122+
desc="motion parameters from EPI time-series"
123123
"registration (tsh included in name if slice"
124124
"timing correction is also included).")
125125
skullstrip = File(
@@ -131,20 +131,20 @@ class AlignEpiAnatPy(AFNIPythonCommand):
131131
an EPI and an anatomical structural dataset, and applies the resulting
132132
transformation to one or the other to bring them into alignment.
133133
134-
This script computes the transforms needed to align EPI and
135-
anatomical datasets using a cost function designed for this purpose. The
136-
script combines multiple transformations, thereby minimizing the amount of
134+
This script computes the transforms needed to align EPI and
135+
anatomical datasets using a cost function designed for this purpose. The
136+
script combines multiple transformations, thereby minimizing the amount of
137137
interpolation applied to the data.
138-
138+
139139
Basic Usage:
140140
align_epi_anat.py -anat anat+orig -epi epi+orig -epi_base 5
141-
141+
142142
The user must provide EPI and anatomical datasets and specify the EPI
143-
sub-brick to use as a base in the alignment.
143+
sub-brick to use as a base in the alignment.
144144
145145
Internally, the script always aligns the anatomical to the EPI dataset,
146-
and the resulting transformation is saved to a 1D file.
147-
As a user option, the inverse of this transformation may be applied to the
146+
and the resulting transformation is saved to a 1D file.
147+
As a user option, the inverse of this transformation may be applied to the
148148
EPI dataset in order to align it to the anatomical data instead.
149149
150150
This program generates several kinds of output in the form of datasets
@@ -182,7 +182,7 @@ def _list_outputs(self):
182182
epi_prefix = ''.join(self._gen_fname(self.inputs.in_file).split('+')[:-1])
183183
outputtype = self.inputs.outputtype
184184
if outputtype == 'AFNI':
185-
ext = '.HEAD'
185+
ext = '.HEAD'
186186
else:
187187
Info.output_type_to_ext(outputtype)
188188
matext = '.1D'
@@ -620,7 +620,7 @@ class AutoTLRCInputSpec(CommandLineInputSpec):
620620
mandatory=True,
621621
exists=True,
622622
copyfile=False)
623-
base = traits.Str(
623+
base = traits.Str(
624624
desc = ' Reference anatomical volume'
625625
' Usually this volume is in some standard space like'
626626
' TLRC or MNI space and with afni dataset view of'
@@ -706,7 +706,7 @@ def _list_outputs(self):
706706
ext = '.HEAD'
707707
outputs['out_file'] = os.path.abspath(self._gen_fname(self.inputs.in_file, suffix='+tlrc')+ext)
708708
return outputs
709-
709+
710710
class BandpassInputSpec(AFNICommandInputSpec):
711711
in_file = File(
712712
desc='input file to 3dBandpass',
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import TCatSubBrick
4+
5+
6+
def test_TCatSubBrick_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
ignore_exception=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
in_files=dict(argstr='%s%s ...',
16+
copyfile=False,
17+
mandatory=True,
18+
position=-1,
19+
),
20+
out_file=dict(argstr='-prefix %s',
21+
genfile=True,
22+
),
23+
outputtype=dict(),
24+
rlt=dict(argstr='-rlt%s',
25+
position=1,
26+
),
27+
terminal_output=dict(nohash=True,
28+
),
29+
)
30+
inputs = TCatSubBrick.input_spec()
31+
32+
for key, metadata in list(input_map.items()):
33+
for metakey, value in list(metadata.items()):
34+
assert getattr(inputs.traits()[key], metakey) == value
35+
36+
37+
def test_TCatSubBrick_outputs():
38+
output_map = dict(out_file=dict(),
39+
)
40+
outputs = TCatSubBrick.output_spec()
41+
42+
for key, metadata in list(output_map.items()):
43+
for metakey, value in list(metadata.items()):
44+
assert getattr(outputs.traits()[key], metakey) == value

nipype/interfaces/dtitk/__init__.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
Top-level namespace for dti-tk.
66
"""
77

8-
#from .base import ()
9-
from ..dtitk.registration import (RigidTask, AffineTask, DiffeoTask, ComposeXfmTask,
10-
diffeoSymTensor3DVolTask, affSymTensor3DVolTask, affScalarVolTask, diffeoScalarVolTask)
11-
from ..dtitk.utils import (TVAdjustOriginTask, TVAdjustVoxSpTask, SVAdjustVoxSpTask,
12-
TVResampleTask, SVResampleTask, TVtoolTask, BinThreshTask)
8+
# from .base import ()
9+
from ..dtitk.registration import (RigidTask, AffineTask, DiffeoTask,
10+
ComposeXfmTask, diffeoSymTensor3DVolTask,
11+
affSymTensor3DVolTask, affScalarVolTask,
12+
diffeoScalarVolTask)
13+
from ..dtitk.utils import (TVAdjustOriginTask, TVAdjustVoxSpTask,
14+
SVAdjustVoxSpTask, TVResampleTask, SVResampleTask,
15+
TVtoolTask, BinThreshTask)

nipype/interfaces/dtitk/registration.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RigidTask(CommandLineDtitk):
3333
>>> node.inputs.fixed_file = 'diffusion.nii'
3434
>>> node.inputs.moving_file = 'diffusion.nii'
3535
>>> node.inputs.similarity_metric = 'EDS'
36-
>>> node.run()
36+
>>> node.run() # doctest: +SKIP
3737
"""
3838
input_spec = RigidInputSpec
3939
output_spec = RigidOutputSpec
@@ -79,7 +79,7 @@ class AffineTask(CommandLineDtitk):
7979
>>> node.inputs.in_fixed_tensor = 'diffusion.nii'
8080
>>> node.inputs.in_moving_txt = 'dirs.txt'
8181
>>> node.inputs.in_similarity_metric = 'EDS'
82-
>>> node.run()
82+
>>> node.run() # doctest: +SKIP
8383
"""
8484

8585
input_spec = AffineInputSpec
@@ -126,7 +126,7 @@ class DiffeoTask(CommandLineDtitk):
126126
>>> node.inputs.in_moving_txt = 'dirs.txt'
127127
>>> node.inputs.in_mask = 'mask.nii'
128128
>>> node.inputs.in_numbers = '6 0.002'
129-
>>> node.run()
129+
>>> node.run() # doctest: +SKIP
130130
"""
131131
input_spec = DiffeoInputSpec
132132
output_spec = DiffeoOutputSpec
@@ -166,7 +166,7 @@ class ComposeXfmTask(CommandLineDtitk):
166166
>>> node = dtitk.ComposeXfmTask()
167167
>>> node.inputs.in_df = 'ants_Warp.nii.gz'
168168
>>> node.inputs.in_aff= 'ants_Affine.txt'
169-
>>> node.run()
169+
>>> node.run() # doctest: +SKIP
170170
"""
171171
input_spec = ComposeXfmInputSpec
172172
output_spec = ComposeXfmOutputSpec
@@ -206,7 +206,7 @@ class diffeoSymTensor3DVolTask(CommandLineDtitk):
206206
>>> node = dtitk.diffeoSymTensor3DVolTask()
207207
>>> node.inputs.in_tensor = 'diffusion.nii'
208208
>>> node.inputs.in_xfm = 'ants_Warp.nii.gz'
209-
>>> node.run()
209+
>>> node.run() # doctest: +SKIP
210210
"""
211211

212212
input_spec = diffeoSymTensor3DVolInputSpec
@@ -246,7 +246,7 @@ class affSymTensor3DVolTask(CommandLineDtitk):
246246
>>> node = dtitk.affSymTensor3DVolTask()
247247
>>> node.inputs.in_tensor = 'diffusion.nii'
248248
>>> node.inputs.in_xfm = 'ants_Affine.txt'
249-
>>> node.run()
249+
>>> node.run() # doctest: +SKIP
250250
"""
251251
input_spec = affSymTensor3DVolInputSpec
252252
output_spec = affSymTensor3DVolOutputSpec
@@ -284,7 +284,7 @@ class affScalarVolTask(CommandLineDtitk):
284284
>>> node = dtitk.affScalarVolTask()
285285
>>> node.inputs.in_volume = 'fa.nii.gz'
286286
>>> node.inputs.in_xfm = 'ants_Affine.txt'
287-
>>> node.run()
287+
>>> node.run() # doctest: +SKIP
288288
"""
289289
input_spec = affScalarVolInputSpec
290290
output_spec = affScalarVolOutputSpec
@@ -331,7 +331,7 @@ class diffeoScalarVolTask(CommandLineDtitk):
331331
>>> node = dtitk.diffeoScalarVolTask()
332332
>>> node.inputs.in_tensor = 'fa.nii.gz'
333333
>>> node.inputs.in_xfm = 'ants_Warp.nii.gz'
334-
>>> node.run()
334+
>>> node.run() # doctest: +SKIP
335335
"""
336336

337337
input_spec = diffeoScalarVolInputSpec
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..registration import AffineTask
4+
5+
6+
def test_AffineTask_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
ignore_exception=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
in_fixed_tensor=dict(argstr='%s',
16+
exists=True,
17+
mandatory=False,
18+
position=0,
19+
),
20+
in_moving_txt=dict(argstr='%s',
21+
exists=True,
22+
mandatory=False,
23+
position=1,
24+
),
25+
in_similarity_metric=dict(argstr='%s',
26+
exists=True,
27+
mandatory=False,
28+
position=3,
29+
),
30+
in_usetrans_flag=dict(argstr='%s',
31+
exists=True,
32+
mandatory=False,
33+
position=4,
34+
),
35+
terminal_output=dict(nohash=True,
36+
),
37+
)
38+
inputs = AffineTask.input_spec()
39+
40+
for key, metadata in list(input_map.items()):
41+
for metakey, value in list(metadata.items()):
42+
assert getattr(inputs.traits()[key], metakey) == value
43+
44+
45+
def test_AffineTask_outputs():
46+
output_map = dict(out_file=dict(),
47+
out_file_xfm=dict(),
48+
)
49+
outputs = AffineTask.output_spec()
50+
51+
for key, metadata in list(output_map.items()):
52+
for metakey, value in list(metadata.items()):
53+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import BinThreshTask
4+
5+
6+
def test_BinThreshTask_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
ignore_exception=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
in_image=dict(argstr='%s',
16+
exists=True,
17+
mandatory=False,
18+
position=0,
19+
),
20+
in_numbers=dict(argstr='%s',
21+
exists=True,
22+
mandatory=False,
23+
position=2,
24+
),
25+
out_path=dict(argstr='%s',
26+
exists=True,
27+
mandatory=False,
28+
position=1,
29+
),
30+
terminal_output=dict(nohash=True,
31+
),
32+
)
33+
inputs = BinThreshTask.input_spec()
34+
35+
for key, metadata in list(input_map.items()):
36+
for metakey, value in list(metadata.items()):
37+
assert getattr(inputs.traits()[key], metakey) == value
38+
39+
40+
def test_BinThreshTask_outputs():
41+
output_map = dict(out_file=dict(),
42+
)
43+
outputs = BinThreshTask.output_spec()
44+
45+
for key, metadata in list(output_map.items()):
46+
for metakey, value in list(metadata.items()):
47+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..base import CommandLineDtitk
4+
5+
6+
def test_CommandLineDtitk_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
ignore_exception=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
terminal_output=dict(nohash=True,
16+
),
17+
)
18+
inputs = CommandLineDtitk.input_spec()
19+
20+
for key, metadata in list(input_map.items()):
21+
for metakey, value in list(metadata.items()):
22+
assert getattr(inputs.traits()[key], metakey) == value
23+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..registration import ComposeXfmTask
4+
5+
6+
def test_ComposeXfmTask_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
ignore_exception=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
in_aff=dict(argstr='-aff %s',
16+
exists=True,
17+
mandatory=False,
18+
position=0,
19+
),
20+
in_df=dict(argstr='-df %s',
21+
exists=True,
22+
mandatory=False,
23+
position=1,
24+
),
25+
out_path=dict(argstr='-out %s',
26+
exists=True,
27+
mandatory=False,
28+
name_source='in_df',
29+
name_template='%s_comboaff.nii.gz',
30+
position=2,
31+
),
32+
terminal_output=dict(nohash=True,
33+
),
34+
)
35+
inputs = ComposeXfmTask.input_spec()
36+
37+
for key, metadata in list(input_map.items()):
38+
for metakey, value in list(metadata.items()):
39+
assert getattr(inputs.traits()[key], metakey) == value
40+
41+
42+
def test_ComposeXfmTask_outputs():
43+
output_map = dict(out_file=dict(),
44+
)
45+
outputs = ComposeXfmTask.output_spec()
46+
47+
for key, metadata in list(output_map.items()):
48+
for metakey, value in list(metadata.items()):
49+
assert getattr(outputs.traits()[key], metakey) == value

0 commit comments

Comments
 (0)