@@ -50,7 +50,77 @@ class TractographyInputSpec(CommandLineInputSpec):
50
50
desc = ('specify a masking region of interest. If defined,'
51
51
'streamlines exiting the mask will be truncated' ))
52
52
53
- # Here streamlines tractography
53
+ # Streamlines tractography options
54
+ step_size = traits .Float (
55
+ argstr = '-step %f' ,
56
+ desc = ('set the step size of the algorithm in mm (default is 0.1'
57
+ ' x voxelsize; for iFOD2: 0.5 x voxelsize)' ))
58
+ angle = traits .Float (
59
+ argstr = '-angle %f' ,
60
+ desc = ('set the maximum angle between successive steps (default '
61
+ 'is 90deg x stepsize / voxelsize)' ))
62
+ n_tracks = traits .Int (
63
+ argstr = '-number %d' ,
64
+ desc = ('set the desired number of tracks. The program will continue'
65
+ ' to generate tracks until this number of tracks have been '
66
+ 'selected and written to the output file' ))
67
+ max_tracks = traits .Int (
68
+ argstr = '-maxnum %d' ,
69
+ desc = ('set the maximum number of tracks to generate. The program '
70
+ 'will not generate more tracks than this number, even if '
71
+ 'the desired number of tracks hasn\' t yet been reached '
72
+ '(default is 100 x number)' ))
73
+ max_length = traits .Float (
74
+ argstr = '-maxlength %f' ,
75
+ desc = ('set the maximum length of any track in mm (default is '
76
+ '100 x voxelsize)' ))
77
+ min_length = traits .Float (
78
+ argstr = '-minlength %f' ,
79
+ desc = ('set the minimum length of any track in mm (default is '
80
+ '5 x voxelsize)' ))
81
+ cutoff = traits .Float (
82
+ argstr = '-cutoff %f' ,
83
+ desc = ('set the FA or FOD amplitude cutoff for terminating '
84
+ 'tracks (default is 0.1)' ))
85
+ cutoff_init = traits .Float (
86
+ argstr = '-initcutoff %f' ,
87
+ desc = ('set the minimum FA or FOD amplitude for initiating '
88
+ 'tracks (default is the same as the normal cutoff)' ))
89
+ n_trials = traits .Int (
90
+ argstr = '-trials %d' ,
91
+ desc = ('set the maximum number of sampling trials at each point'
92
+ ' (only used for probabilistic tracking)' ))
93
+ unidirectional = traits .Bool (
94
+ argstr = '-unidirectional' ,
95
+ desc = ('track from the seed point in one direction only '
96
+ '(default is to track in both directions)' ))
97
+ init_dir = traits .Tuple (
98
+ traits .Float , traits .Float , traits .Float ,
99
+ argstr = '-initdirection %f,%f,%f' ,
100
+ desc = ('specify an initial direction for the tracking (this '
101
+ 'should be supplied as a vector of 3 comma-separated values' ))
102
+ noprecompt = traits .Bool (
103
+ argstr = '-noprecomputed' ,
104
+ desc = ('do NOT pre-compute legendre polynomial values. Warning: this '
105
+ 'will slow down the algorithm by a factor of approximately 4' ))
106
+ power = traits .Int (
107
+ argstr = '-power %d' ,
108
+ desc = ('raise the FOD to the power specified (default is 1/nsamples)' ))
109
+ n_samples = traits .Int (
110
+ 4 , argstr = '-samples %d' ,
111
+ desc = ('set the number of FOD samples to take per step for the 2nd '
112
+ 'order (iFOD2) method' ))
113
+ use_rk4 = traits .Bool (
114
+ argstr = '-rk4' ,
115
+ desc = ('use 4th-order Runge-Kutta integration (slower, but eliminates'
116
+ ' curvature overshoot in 1st-order deterministic methods)' ))
117
+ stop = traits .Bool (
118
+ argstr = '-stop' ,
119
+ desc = ('stop propagating a streamline once it has traversed all '
120
+ 'include regions' ))
121
+ downsample = traits .Float (
122
+ argstr = '-downsample %f' ,
123
+ desc = ('downsample the generated streamlines to reduce output file size' ))
54
124
55
125
# Anatomically-Constrained Tractography options
56
126
act_file = File (
@@ -72,22 +142,39 @@ class TractographyInputSpec(CommandLineInputSpec):
72
142
argstr = '-seed_sphere %f,%f,%f,%f' , desc = 'spherical seed' )
73
143
seed_image = File (exists = True , argstr = '-seed_image %s' ,
74
144
desc = 'seed streamlines entirely at random within mask' )
75
- seed_rnd_voxel = traits .Enum (
76
- traits . Int (), File (exists = True ),
145
+ seed_rnd_voxel = traits .Tuple (
146
+ File (exists = True ), traits . Int ( ),
77
147
argstr = '-seed_random_per_voxel %s %d' ,
78
148
xor = ['seed_image' , 'seed_grid_voxel' ],
79
149
desc = ('seed a fixed number of streamlines per voxel in a mask '
80
150
'image; random placement of seeds in each voxel' ))
81
- seed_grid_voxel = traits .Enum (
82
- traits . Int (), File (exists = True ),
151
+ seed_grid_voxel = traits .Tuple (
152
+ File (exists = True ), traits . Int ( ),
83
153
argstr = '-seed_grid_per_voxel %s %d' ,
84
154
xor = ['seed_image' , 'seed_rnd_voxel' ],
85
155
desc = ('seed a fixed number of streamlines per voxel in a mask '
86
156
'image; place seeds on a 3D mesh grid (grid_size argument '
87
157
'is per axis; so a grid_size of 3 results in 27 seeds per'
88
158
' voxel)' ))
89
-
90
- # missing opts: seed_rejection, seed_gmwmi, seed_dynamic, max_seed_attempts
159
+ seed_rejection = File (
160
+ exists = True , argstr = '-seed_rejection %s' ,
161
+ desc = ('seed from an image using rejection sampling (higher '
162
+ 'values = more probable to seed from' ))
163
+ seed_gmwmi = File (
164
+ exists = True , argstr = '-seed_gmwmi %s' , requires = ['act_file' ],
165
+ desc = ('seed from the grey matter - white matter interface (only '
166
+ 'valid if using ACT framework)' ))
167
+ seed_dynamic = File (
168
+ exists = True , argstr = '-seed_dynamic %s' ,
169
+ desc = ('determine seed points dynamically using the SIFT model '
170
+ '(must not provide any other seeding mechanism). Note that'
171
+ ' while this seeding mechanism improves the distribution of'
172
+ ' reconstructed streamlines density, it should NOT be used '
173
+ 'as a substitute for the SIFT method itself.' ))
174
+ max_seed_attempts = traits .Int (argstr = '-max_seed_attempts %d' ,
175
+ desc = ('set the maximum number of times that the tracking '
176
+ 'algorithm should attempt to find an appropriate tracking'
177
+ ' direction from a given seed point' ))
91
178
out_seeds = File (
92
179
'out_seeds.nii.gz' , argstr = '-output_seeds %s' ,
93
180
desc = ('output the seed location of all successful streamlines to'
0 commit comments