Skip to content

Commit 6e857d6

Browse files
committed
Merge pull request #1117 from chrisfilo/enh/robustfov
Enh/robustfov
2 parents 7228a65 + 598e9f6 commit 6e857d6

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

nipype/interfaces/fsl/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
ImageStats, FilterRegressor, Overlay, Slicer,
1717
PlotTimeSeries, PlotMotionParams, ConvertXFM,
1818
SwapDimensions, PowerSpectrum, Reorient2Std,
19-
Complex, InvWarp, WarpUtils, ConvertWarp, WarpPoints, WarpPointsToStd)
19+
Complex, InvWarp, WarpUtils, ConvertWarp, WarpPoints,
20+
WarpPointsToStd, RobustFOV)
2021

2122
from .epi import (PrepareFieldmap, TOPUP, ApplyTOPUP, Eddy, EPIDeWarp,
2223
SigLoss, EddyCorrect, EpiReg)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.fsl.utils import RobustFOV
4+
5+
def test_RobustFOV_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='-i %s',
15+
mandatory=True,
16+
position=0,
17+
),
18+
out_roi=dict(argstr='-r %s',
19+
hash_files=False,
20+
name_source=['in_file'],
21+
name_template='%s_ROI',
22+
),
23+
output_type=dict(),
24+
terminal_output=dict(nohash=True,
25+
),
26+
)
27+
inputs = RobustFOV.input_spec()
28+
29+
for key, metadata in input_map.items():
30+
for metakey, value in metadata.items():
31+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
32+
33+
def test_RobustFOV_outputs():
34+
output_map = dict(out_roi=dict(),
35+
)
36+
outputs = RobustFOV.output_spec()
37+
38+
for key, metadata in output_map.items():
39+
for metakey, value in metadata.items():
40+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
41+

nipype/interfaces/fsl/utils.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@
3131
warn = warnings.warn
3232
warnings.filterwarnings('always', category=UserWarning)
3333

34+
class RobustFOVInputSpec(FSLCommandInputSpec):
35+
in_file = File(exists=True,
36+
desc='input filename',
37+
argstr='-i %s', position=0, mandatory=True)
38+
out_roi = File(desc="ROI volume output name", argstr="-r %s",
39+
name_source=['in_file'], hash_files=False,
40+
name_template='%s_ROI')
41+
42+
43+
class RobustFOVOutputSpec(TraitedSpec):
44+
out_roi = File(exists=True, desc="ROI volume output name")
45+
46+
47+
class RobustFOV(FSLCommand):
48+
_cmd = 'robustfov'
49+
input_spec = RobustFOVInputSpec
50+
output_spec = RobustFOVOutputSpec
51+
3452

3553
class ImageMeantsInputSpec(FSLCommandInputSpec):
3654
in_file = File(exists=True,

0 commit comments

Comments
 (0)