Skip to content

Commit 5ad92bd

Browse files
committed
Merge pull request #23 from sgiavasis/new_interfaces_seg
Minor fix to 3dSeg's aggregate_outputs
2 parents a28ed37 + 5c89bdf commit 5ad92bd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,14 +1949,16 @@ class Seg(AFNICommandBase):
19491949

19501950
def aggregate_outputs(self, runtime=None, needed_outputs=None):
19511951

1952+
import glob
1953+
19521954
outputs = self._outputs()
19531955

19541956
if isdefined(self.inputs.prefix):
1955-
outfile = os.path.join(os.getcwd(), self.inputs.prefix, 'Classes+orig.BRIK')
1957+
outfile = os.path.join(os.getcwd(), self.inputs.prefix, 'Classes+*.BRIK')
19561958
else:
1957-
outfile = os.path.join(os.getcwd(), 'Segsy', 'Classes+orig.BRIK')
1959+
outfile = os.path.join(os.getcwd(), 'Segsy', 'Classes+*.BRIK')
19581960

1959-
outputs.out_file = outfile
1961+
outputs.out_file = glob.glob(outfile)[0]
19601962

19611963
return outputs
19621964

0 commit comments

Comments
 (0)