13
13
__docformat__ = 'restructuredtext'
14
14
15
15
from nipype .interfaces .base import (TraitedSpec , File , traits , CommandLine ,
16
- CommandLineInputSpec )
16
+ InputMultiPath , CommandLineInputSpec )
17
17
18
18
class SplineFilterInputSpec (CommandLineInputSpec ):
19
19
track_file = File (exists = True , desc = "file containing tracks to be filtered" , position = 0 , argstr = "%s" , mandatory = True )
@@ -32,4 +32,23 @@ class SplineFilter(CommandLine):
32
32
def _list_outputs (self ):
33
33
outputs = self .output_spec ().get ()
34
34
outputs ['smoothed_track_file' ] = os .path .abspath (self .inputs .output_file )
35
- return outputs
35
+ return outputs
36
+
37
+
38
+ class TrackMergeInputSpec (CommandLineInputSpec ):
39
+ track_files = InputMultiPath (File (exists = True ), desc = "file containing tracks to be filtered" , position = 0 , argstr = "%s..." , mandatory = True )
40
+ output_file = File ("merged_tracks.trk" , desc = "target file for merged tracks" , position = - 1 , argstr = "%s" , usedefault = True )
41
+
42
+ class TrackMergeOutputSpec (TraitedSpec ):
43
+ track_file = File (exists = True )
44
+
45
+ class TrackMerge (CommandLine ):
46
+ input_spec = TrackMergeInputSpec
47
+ output_spec = TrackMergeOutputSpec
48
+
49
+ _cmd = "track_merge"
50
+
51
+ def _list_outputs (self ):
52
+ outputs = self .output_spec ().get ()
53
+ outputs ['track_file' ] = os .path .abspath (self .inputs .output_file )
54
+ return outputs
0 commit comments