Skip to content

Commit bf7938e

Browse files
committed
Merge pull request #861 from oesteban/enh/AddInterfaceFSLWarpUtils
Interfaces for fnirtfileutils and convertwarp (FSL)
2 parents 48bf276 + b065c71 commit bf7938e

File tree

6 files changed

+351
-6
lines changed

6 files changed

+351
-6
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Next Release
22
============
33

4+
* ENH: Added new interfaces (fsl.utils.WarpUtils, ConvertWarp) to fnirtfileutils and convertwarp
45
* API: Interfaces to external packages are no longer available in the top-level
56
``nipype`` namespace, and must be imported directly (e.g.
67
``from nipype.interfaces import fsl``).

nipype/interfaces/fsl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
ImageStats, FilterRegressor, Overlay, Slicer,
1717
PlotTimeSeries, PlotMotionParams, ConvertXFM,
1818
SwapDimensions, PowerSpectrum, Reorient2Std,
19-
Complex, InvWarp)
19+
Complex, InvWarp, WarpUtils, ConvertWarp)
2020

2121
from .epi import (PrepareFieldmap, TOPUP, ApplyTOPUP, Eddy, EPIDeWarp,
2222
SigLoss, EddyCorrect)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.fsl.utils import ConvertWarp
4+
5+
def test_ConvertWarp_inputs():
6+
input_map = dict(abswarp=dict(argstr='--abs',
7+
xor=['relwarp'],
8+
),
9+
args=dict(argstr='%s',
10+
),
11+
cons_jacobian=dict(argstr='--constrainj',
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
jacobian_max=dict(argstr='--jmax=%f',
20+
),
21+
jacobian_min=dict(argstr='--jmin=%f',
22+
),
23+
out_abswarp=dict(argstr='--absout',
24+
xor=['out_relwarp'],
25+
),
26+
out_file=dict(argstr='--out=%s',
27+
name_source=['reference'],
28+
name_template='%s_concatwarp',
29+
output_name='out_file',
30+
position=-1,
31+
),
32+
out_relwarp=dict(argstr='--relout',
33+
xor=['out_abswarp'],
34+
),
35+
output_type=dict(),
36+
postmat=dict(argstr='--postmat=%s',
37+
),
38+
premat=dict(argstr='--premat=%s',
39+
),
40+
reference=dict(argstr='--ref=%s',
41+
mandatory=True,
42+
position=1,
43+
),
44+
relwarp=dict(argstr='--rel',
45+
xor=['abswarp'],
46+
),
47+
shift_direction=dict(argstr='--shiftdir=%s',
48+
requires=['shift_in_file'],
49+
),
50+
shift_in_file=dict(argstr='--shiftmap=%s',
51+
),
52+
terminal_output=dict(mandatory=True,
53+
nohash=True,
54+
),
55+
warp1=dict(argstr='--warp1=%s',
56+
),
57+
warp2=dict(argstr='--warp2=%s',
58+
),
59+
)
60+
inputs = ConvertWarp.input_spec()
61+
62+
for key, metadata in input_map.items():
63+
for metakey, value in metadata.items():
64+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
65+
66+
def test_ConvertWarp_outputs():
67+
output_map = dict(out_file=dict(),
68+
)
69+
outputs = ConvertWarp.output_spec()
70+
71+
for key, metadata in output_map.items():
72+
for metakey, value in metadata.items():
73+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
74+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.fsl.utils import WarpUtils
4+
5+
def test_WarpUtils_inputs():
6+
input_map = dict(args=dict(argstr='%s',
7+
),
8+
environ=dict(nohash=True,
9+
usedefault=True,
10+
),
11+
ignore_exception=dict(nohash=True,
12+
usedefault=True,
13+
),
14+
in_file=dict(argstr='--in=%s',
15+
mandatory=True,
16+
),
17+
knot_space=dict(argstr='--knotspace=%d,%d,%d',
18+
),
19+
out_file=dict(argstr='--out=%s',
20+
name_source=['in_file'],
21+
output_name='out_file',
22+
position=-1,
23+
),
24+
out_format=dict(argstr='--outformat=%s',
25+
),
26+
out_jacobian=dict(argstr='--jac=%s',
27+
),
28+
output_type=dict(),
29+
reference=dict(argstr='--ref=%s',
30+
mandatory=True,
31+
),
32+
terminal_output=dict(mandatory=True,
33+
nohash=True,
34+
),
35+
warp_resolution=dict(argstr='--warpres=%0.4f,%0.4f,%0.4f',
36+
),
37+
with_affine=dict(argstr='--withaff',
38+
),
39+
write_jacobian=dict(mandatory=True,
40+
usedefault=True,
41+
),
42+
)
43+
inputs = WarpUtils.input_spec()
44+
45+
for key, metadata in input_map.items():
46+
for metakey, value in metadata.items():
47+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
48+
49+
def test_WarpUtils_outputs():
50+
output_map = dict(out_file=dict(),
51+
out_jacobian=dict(),
52+
)
53+
outputs = WarpUtils.output_spec()
54+
55+
for key, metadata in output_map.items():
56+
for metakey, value in metadata.items():
57+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
58+

0 commit comments

Comments
 (0)