@@ -32,20 +32,20 @@ class FilterTracksInputSpec(CommandLineInputSpec):
32
32
33
33
out_filename = File (genfile = True , argstr = '%s' , position = - 1 , desc = 'Output filtered track filename' )
34
34
no_mask_interpolation = traits .Bool (argstr = '-nomaskinterp' , desc = "Turns off trilinear interpolation of mask images." )
35
- invert = traits .Bool (argstr = '-invert' , desc = "invert the matching process, so that tracks that would" /
35
+ invert = traits .Bool (argstr = '-invert' , desc = "invert the matching process, so that tracks that would" \
36
36
"otherwise have been included are now excluded and vice-versa." )
37
37
38
38
39
39
quiet = traits .Bool (argstr = '-quiet' , position = 1 , desc = "Do not display information messages or progress status." )
40
40
debug = traits .Bool (argstr = '-debug' , position = 1 , desc = "Display debugging messages." )
41
41
42
42
class FilterTracksOutputSpec (TraitedSpec ):
43
- out_file = File (exists = True , desc = 'the output image of the major eigenvectors of the diffusion tensor image. ' )
43
+ out_file = File (exists = True , desc = 'the output filtered tracks ' )
44
44
45
45
class FilterTracks (CommandLine ):
46
46
"""
47
- Use regions-of-interest to select a sub-set of tracks
48
- from a given track file.
47
+ Use regions-of-interest to select a subset of tracks
48
+ from a given MRtrix track file.
49
49
50
50
Example
51
51
-------
@@ -62,21 +62,22 @@ class FilterTracks(CommandLine):
62
62
63
63
def _list_outputs (self ):
64
64
outputs = self .output_spec ().get ()
65
- outputs ['out_file' ] = self .inputs .out_filename
66
- if not isdefined (outputs ['out_file' ]):
67
- outputs ['out_file' ] = op .abspath (self ._gen_outfilename ())
68
- else :
69
- outputs ['out_file' ] = op .abspath (outputs ['out_file' ])
65
+ outputs ['out_file' ] = op .abspath (self ._gen_outfilename ())
70
66
return outputs
71
67
72
68
def _gen_filename (self , name ):
73
69
if name is 'out_filename' :
74
70
return self ._gen_outfilename ()
75
71
else :
76
72
return None
73
+
77
74
def _gen_outfilename (self ):
78
- _ , name , _ = split_filename (self .inputs .in_file )
79
- return name + '_filt.tck'
75
+ if isdefined (self .inputs .out_filename ):
76
+ path , name , _ = split_filename (self .inputs .out_filename )
77
+ return op .join (path , name + '.tck' )
78
+ else :
79
+ _ , name , _ = split_filename (self .inputs .in_file )
80
+ return op .abspath (name + '_filt.tck' )
80
81
81
82
82
83
class Tracks2ProbInputSpec (CommandLineInputSpec ):
0 commit comments