Skip to content

Commit 8f29d8b

Browse files
committed
Replaced Robex test.
1 parent e0eddc8 commit 8f29d8b

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

nipype/interfaces/robex/preprocess.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,3 @@ class RobexSegment(CommandLine):
6969
input_spec = RobexInputSpec
7070
output_spec = RobexOutputSpec
7171
_cmd = 'runROBEX.sh'
72-
73-
def _format_arg(self, name, trait_spec, value):
74-
if name == "out_file" or name == "out_mask":
75-
if Path(value).name == value:
76-
value = os.path.join(os.getcwd(), Path(value).name)
77-
setattr(self.inputs, name, value)
78-
return super(RobexSegment, self)._format_arg(name, trait_spec, value)
79-
80-
def _list_outputs(self):
81-
outputs = self._outputs().get()
82-
outputs["out_file"] = self.inputs.out_file
83-
if isdefined(self.inputs.out_mask):
84-
outputs["out_mask"] = self.inputs.out_mask
85-
return outputs
86-
87-
def run(self, cwd=None, ignore_exception=None, **inputs):
88-
if not isdefined(self.inputs.out_file):
89-
_, base, extension = split_filename(self.inputs.in_file)
90-
self.inputs.out_file = base + "_brain_robex" + extension
91-
return super(RobexSegment, self).run(cwd, ignore_exception, **inputs)

nipype/interfaces/robex/tests/test_auto_RobexSegment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def test_RobexSegment_inputs():
2222
extensions=None,
2323
hash_files=False,
2424
keep_extension=True,
25+
name_source=["in_file"],
2526
name_template="%s_brain",
2627
position=1,
2728
),
@@ -30,6 +31,7 @@ def test_RobexSegment_inputs():
3031
extensions=None,
3132
hash_files=False,
3233
keep_extension=True,
34+
name_source=["in_file"],
3335
name_template="%s_brainmask",
3436
position=2,
3537
),

0 commit comments

Comments
 (0)