niwrap-mrtrix 0.6.2__py3-none-any.whl → 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of niwrap-mrtrix might be problematic. Click here for more details.

Files changed (122) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +133 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +59 -68
  3. niwrap_mrtrix/mrtrix/amp2response.py +72 -77
  4. niwrap_mrtrix/mrtrix/amp2sh.py +109 -74
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +77 -79
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +52 -62
  7. niwrap_mrtrix/mrtrix/connectomestats.py +117 -104
  8. niwrap_mrtrix/mrtrix/dcmedit.py +68 -73
  9. niwrap_mrtrix/mrtrix/dcminfo.py +67 -72
  10. niwrap_mrtrix/mrtrix/dirflip.py +56 -66
  11. niwrap_mrtrix/mrtrix/dirgen.py +68 -75
  12. niwrap_mrtrix/mrtrix/dirmerge.py +56 -66
  13. niwrap_mrtrix/mrtrix/dirorder.py +53 -64
  14. niwrap_mrtrix/mrtrix/dirsplit.py +56 -66
  15. niwrap_mrtrix/mrtrix/dirstat.py +70 -75
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +67 -74
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +141 -96
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +70 -76
  19. niwrap_mrtrix/mrtrix/dwi2response.py +238 -157
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +87 -88
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +97 -95
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +67 -74
  23. niwrap_mrtrix/mrtrix/dwiextract.py +143 -99
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +89 -91
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +77 -51
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +54 -65
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +56 -66
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +62 -70
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +145 -93
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +62 -70
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +136 -69
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +61 -69
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +53 -64
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +139 -71
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +53 -64
  36. niwrap_mrtrix/mrtrix/fod2dec.py +70 -75
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +84 -85
  38. niwrap_mrtrix/mrtrix/label2colour.py +58 -67
  39. niwrap_mrtrix/mrtrix/label2mesh.py +53 -64
  40. niwrap_mrtrix/mrtrix/labelconvert.py +58 -67
  41. niwrap_mrtrix/mrtrix/labelstats.py +53 -63
  42. niwrap_mrtrix/mrtrix/maskdump.py +52 -64
  43. niwrap_mrtrix/mrtrix/maskfilter.py +93 -61
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +53 -64
  45. niwrap_mrtrix/mrtrix/meshconvert.py +66 -73
  46. niwrap_mrtrix/mrtrix/meshfilter.py +59 -68
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +62 -70
  48. niwrap_mrtrix/mrtrix/mrcalc.py +522 -397
  49. niwrap_mrtrix/mrtrix/mrcat.py +59 -68
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +53 -63
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +58 -67
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +119 -105
  53. niwrap_mrtrix/mrtrix/mrcolour.py +62 -70
  54. niwrap_mrtrix/mrtrix/mrconvert.py +275 -173
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +66 -73
  56. niwrap_mrtrix/mrtrix/mrdump.py +55 -66
  57. niwrap_mrtrix/mrtrix/mredit.py +97 -94
  58. niwrap_mrtrix/mrtrix/mrfilter.py +124 -81
  59. niwrap_mrtrix/mrtrix/mrgrid.py +131 -88
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +64 -71
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +64 -71
  62. niwrap_mrtrix/mrtrix/mrinfo.py +160 -137
  63. niwrap_mrtrix/mrtrix/mrmath.py +65 -73
  64. niwrap_mrtrix/mrtrix/mrmetric.py +69 -73
  65. niwrap_mrtrix/mrtrix/mrregister.py +263 -212
  66. niwrap_mrtrix/mrtrix/mrstats.py +66 -72
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +80 -81
  68. niwrap_mrtrix/mrtrix/mrtransform.py +162 -109
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +85 -88
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +51 -63
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +54 -65
  72. niwrap_mrtrix/mrtrix/responsemean.py +51 -62
  73. niwrap_mrtrix/mrtrix/sh2amp.py +98 -65
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +81 -83
  75. niwrap_mrtrix/mrtrix/sh2power.py +53 -64
  76. niwrap_mrtrix/mrtrix/sh2response.py +62 -70
  77. niwrap_mrtrix/mrtrix/shbasis.py +51 -62
  78. niwrap_mrtrix/mrtrix/shconv.py +78 -52
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +93 -88
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +57 -65
  81. niwrap_mrtrix/mrtrix/tckconvert.py +99 -65
  82. niwrap_mrtrix/mrtrix/tckdfc.py +82 -83
  83. niwrap_mrtrix/mrtrix/tckedit.py +240 -122
  84. niwrap_mrtrix/mrtrix/tckgen.py +364 -207
  85. niwrap_mrtrix/mrtrix/tckglobal.py +127 -115
  86. niwrap_mrtrix/mrtrix/tckinfo.py +50 -61
  87. niwrap_mrtrix/mrtrix/tckmap.py +121 -79
  88. niwrap_mrtrix/mrtrix/tckresample.py +97 -93
  89. niwrap_mrtrix/mrtrix/tcksample.py +62 -69
  90. niwrap_mrtrix/mrtrix/tcksift.py +102 -97
  91. niwrap_mrtrix/mrtrix/tcksift2.py +119 -107
  92. niwrap_mrtrix/mrtrix/tckstats.py +72 -78
  93. niwrap_mrtrix/mrtrix/tcktransform.py +53 -64
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +93 -94
  95. niwrap_mrtrix/mrtrix/transformcalc.py +53 -64
  96. niwrap_mrtrix/mrtrix/transformcompose.py +74 -48
  97. niwrap_mrtrix/mrtrix/transformconvert.py +53 -64
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +53 -64
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +53 -63
  100. niwrap_mrtrix/mrtrix/tsfmult.py +51 -63
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +54 -65
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +55 -65
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +50 -61
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +54 -65
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +69 -75
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +51 -62
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +73 -79
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +132 -86
  109. niwrap_mrtrix/mrtrix/vectorstats.py +92 -88
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +54 -63
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +56 -66
  112. niwrap_mrtrix/mrtrix/warp2metric.py +71 -77
  113. niwrap_mrtrix/mrtrix/warpconvert.py +61 -69
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +61 -71
  115. niwrap_mrtrix/mrtrix/warpinit.py +51 -63
  116. niwrap_mrtrix/mrtrix/warpinvert.py +56 -66
  117. niwrap_mrtrix-0.7.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.7.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.7.0.dist-info/WHEEL +4 -0
  120. niwrap_mrtrix-0.6.2.dist-info/METADATA +0 -8
  121. niwrap_mrtrix-0.6.2.dist-info/RECORD +0 -119
  122. niwrap_mrtrix-0.6.2.dist-info/WHEEL +0 -4
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  TCKGEN_METADATA = Metadata(
9
- id="14b8283e2f566ed63503a0f4d3dae99649fc54d2.boutiques",
9
+ id="49bb9108a82b9af72391f635d21ece29154ff9f6.boutiques",
10
10
  name="tckgen",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,119 +14,244 @@ TCKGEN_METADATA = Metadata(
14
14
 
15
15
 
16
16
  TckgenSeedImageParameters = typing.TypedDict('TckgenSeedImageParameters', {
17
- "__STYXTYPE__": typing.Literal["seed_image"],
17
+ "@type": typing.NotRequired[typing.Literal["seed_image"]],
18
+ "image": InputPathType,
19
+ })
20
+ TckgenSeedImageParametersTagged = typing.TypedDict('TckgenSeedImageParametersTagged', {
21
+ "@type": typing.Literal["seed_image"],
18
22
  "image": InputPathType,
19
23
  })
20
24
 
21
25
 
22
26
  TckgenSeedSphereParameters = typing.TypedDict('TckgenSeedSphereParameters', {
23
- "__STYXTYPE__": typing.Literal["seed_sphere"],
27
+ "@type": typing.NotRequired[typing.Literal["seed_sphere"]],
28
+ "spec": list[float],
29
+ })
30
+ TckgenSeedSphereParametersTagged = typing.TypedDict('TckgenSeedSphereParametersTagged', {
31
+ "@type": typing.Literal["seed_sphere"],
24
32
  "spec": list[float],
25
33
  })
26
34
 
27
35
 
28
36
  TckgenSeedRandomPerVoxelParameters = typing.TypedDict('TckgenSeedRandomPerVoxelParameters', {
29
- "__STYXTYPE__": typing.Literal["seed_random_per_voxel"],
37
+ "@type": typing.NotRequired[typing.Literal["seed_random_per_voxel"]],
38
+ "image": InputPathType,
39
+ "num_per_voxel": int,
40
+ })
41
+ TckgenSeedRandomPerVoxelParametersTagged = typing.TypedDict('TckgenSeedRandomPerVoxelParametersTagged', {
42
+ "@type": typing.Literal["seed_random_per_voxel"],
30
43
  "image": InputPathType,
31
44
  "num_per_voxel": int,
32
45
  })
33
46
 
34
47
 
35
48
  TckgenSeedGridPerVoxelParameters = typing.TypedDict('TckgenSeedGridPerVoxelParameters', {
36
- "__STYXTYPE__": typing.Literal["seed_grid_per_voxel"],
49
+ "@type": typing.NotRequired[typing.Literal["seed_grid_per_voxel"]],
50
+ "image": InputPathType,
51
+ "grid_size": int,
52
+ })
53
+ TckgenSeedGridPerVoxelParametersTagged = typing.TypedDict('TckgenSeedGridPerVoxelParametersTagged', {
54
+ "@type": typing.Literal["seed_grid_per_voxel"],
37
55
  "image": InputPathType,
38
56
  "grid_size": int,
39
57
  })
40
58
 
41
59
 
42
60
  TckgenSeedRejectionParameters = typing.TypedDict('TckgenSeedRejectionParameters', {
43
- "__STYXTYPE__": typing.Literal["seed_rejection"],
61
+ "@type": typing.NotRequired[typing.Literal["seed_rejection"]],
62
+ "image": InputPathType,
63
+ })
64
+ TckgenSeedRejectionParametersTagged = typing.TypedDict('TckgenSeedRejectionParametersTagged', {
65
+ "@type": typing.Literal["seed_rejection"],
44
66
  "image": InputPathType,
45
67
  })
46
68
 
47
69
 
48
70
  TckgenSeedGmwmiParameters = typing.TypedDict('TckgenSeedGmwmiParameters', {
49
- "__STYXTYPE__": typing.Literal["seed_gmwmi"],
71
+ "@type": typing.NotRequired[typing.Literal["seed_gmwmi"]],
72
+ "image": InputPathType,
73
+ })
74
+ TckgenSeedGmwmiParametersTagged = typing.TypedDict('TckgenSeedGmwmiParametersTagged', {
75
+ "@type": typing.Literal["seed_gmwmi"],
50
76
  "image": InputPathType,
51
77
  })
52
78
 
53
79
 
54
80
  TckgenVariousStringParameters = typing.TypedDict('TckgenVariousStringParameters', {
55
- "__STYXTYPE__": typing.Literal["VariousString"],
81
+ "@type": typing.NotRequired[typing.Literal["VariousString"]],
82
+ "obj": str,
83
+ })
84
+ TckgenVariousStringParametersTagged = typing.TypedDict('TckgenVariousStringParametersTagged', {
85
+ "@type": typing.Literal["VariousString"],
56
86
  "obj": str,
57
87
  })
58
88
 
59
89
 
60
90
  TckgenVariousFileParameters = typing.TypedDict('TckgenVariousFileParameters', {
61
- "__STYXTYPE__": typing.Literal["VariousFile"],
91
+ "@type": typing.NotRequired[typing.Literal["VariousFile"]],
92
+ "obj": InputPathType,
93
+ })
94
+ TckgenVariousFileParametersTagged = typing.TypedDict('TckgenVariousFileParametersTagged', {
95
+ "@type": typing.Literal["VariousFile"],
62
96
  "obj": InputPathType,
63
97
  })
64
98
 
65
99
 
66
100
  TckgenIncludeParameters = typing.TypedDict('TckgenIncludeParameters', {
67
- "__STYXTYPE__": typing.Literal["include"],
68
- "spec": typing.Union[TckgenVariousStringParameters, TckgenVariousFileParameters],
101
+ "@type": typing.NotRequired[typing.Literal["include"]],
102
+ "spec": typing.Union[TckgenVariousStringParametersTagged, TckgenVariousFileParametersTagged],
103
+ })
104
+ TckgenIncludeParametersTagged = typing.TypedDict('TckgenIncludeParametersTagged', {
105
+ "@type": typing.Literal["include"],
106
+ "spec": typing.Union[TckgenVariousStringParametersTagged, TckgenVariousFileParametersTagged],
69
107
  })
70
108
 
71
109
 
72
110
  TckgenIncludeOrderedParameters = typing.TypedDict('TckgenIncludeOrderedParameters', {
73
- "__STYXTYPE__": typing.Literal["include_ordered"],
111
+ "@type": typing.NotRequired[typing.Literal["include_ordered"]],
112
+ "image": str,
113
+ })
114
+ TckgenIncludeOrderedParametersTagged = typing.TypedDict('TckgenIncludeOrderedParametersTagged', {
115
+ "@type": typing.Literal["include_ordered"],
74
116
  "image": str,
75
117
  })
76
118
 
77
119
 
78
120
  TckgenVariousString1Parameters = typing.TypedDict('TckgenVariousString1Parameters', {
79
- "__STYXTYPE__": typing.Literal["VariousString_1"],
121
+ "@type": typing.NotRequired[typing.Literal["VariousString_1"]],
122
+ "obj": str,
123
+ })
124
+ TckgenVariousString1ParametersTagged = typing.TypedDict('TckgenVariousString1ParametersTagged', {
125
+ "@type": typing.Literal["VariousString_1"],
80
126
  "obj": str,
81
127
  })
82
128
 
83
129
 
84
130
  TckgenVariousFile1Parameters = typing.TypedDict('TckgenVariousFile1Parameters', {
85
- "__STYXTYPE__": typing.Literal["VariousFile_1"],
131
+ "@type": typing.NotRequired[typing.Literal["VariousFile_1"]],
132
+ "obj": InputPathType,
133
+ })
134
+ TckgenVariousFile1ParametersTagged = typing.TypedDict('TckgenVariousFile1ParametersTagged', {
135
+ "@type": typing.Literal["VariousFile_1"],
86
136
  "obj": InputPathType,
87
137
  })
88
138
 
89
139
 
90
140
  TckgenExcludeParameters = typing.TypedDict('TckgenExcludeParameters', {
91
- "__STYXTYPE__": typing.Literal["exclude"],
92
- "spec": typing.Union[TckgenVariousString1Parameters, TckgenVariousFile1Parameters],
141
+ "@type": typing.NotRequired[typing.Literal["exclude"]],
142
+ "spec": typing.Union[TckgenVariousString1ParametersTagged, TckgenVariousFile1ParametersTagged],
143
+ })
144
+ TckgenExcludeParametersTagged = typing.TypedDict('TckgenExcludeParametersTagged', {
145
+ "@type": typing.Literal["exclude"],
146
+ "spec": typing.Union[TckgenVariousString1ParametersTagged, TckgenVariousFile1ParametersTagged],
93
147
  })
94
148
 
95
149
 
96
150
  TckgenVariousString2Parameters = typing.TypedDict('TckgenVariousString2Parameters', {
97
- "__STYXTYPE__": typing.Literal["VariousString_2"],
151
+ "@type": typing.NotRequired[typing.Literal["VariousString_2"]],
152
+ "obj": str,
153
+ })
154
+ TckgenVariousString2ParametersTagged = typing.TypedDict('TckgenVariousString2ParametersTagged', {
155
+ "@type": typing.Literal["VariousString_2"],
98
156
  "obj": str,
99
157
  })
100
158
 
101
159
 
102
160
  TckgenVariousFile2Parameters = typing.TypedDict('TckgenVariousFile2Parameters', {
103
- "__STYXTYPE__": typing.Literal["VariousFile_2"],
161
+ "@type": typing.NotRequired[typing.Literal["VariousFile_2"]],
162
+ "obj": InputPathType,
163
+ })
164
+ TckgenVariousFile2ParametersTagged = typing.TypedDict('TckgenVariousFile2ParametersTagged', {
165
+ "@type": typing.Literal["VariousFile_2"],
104
166
  "obj": InputPathType,
105
167
  })
106
168
 
107
169
 
108
170
  TckgenMaskParameters = typing.TypedDict('TckgenMaskParameters', {
109
- "__STYXTYPE__": typing.Literal["mask"],
110
- "spec": typing.Union[TckgenVariousString2Parameters, TckgenVariousFile2Parameters],
171
+ "@type": typing.NotRequired[typing.Literal["mask"]],
172
+ "spec": typing.Union[TckgenVariousString2ParametersTagged, TckgenVariousFile2ParametersTagged],
173
+ })
174
+ TckgenMaskParametersTagged = typing.TypedDict('TckgenMaskParametersTagged', {
175
+ "@type": typing.Literal["mask"],
176
+ "spec": typing.Union[TckgenVariousString2ParametersTagged, TckgenVariousFile2ParametersTagged],
111
177
  })
112
178
 
113
179
 
114
180
  TckgenFslgradParameters = typing.TypedDict('TckgenFslgradParameters', {
115
- "__STYXTYPE__": typing.Literal["fslgrad"],
181
+ "@type": typing.NotRequired[typing.Literal["fslgrad"]],
182
+ "bvecs": InputPathType,
183
+ "bvals": InputPathType,
184
+ })
185
+ TckgenFslgradParametersTagged = typing.TypedDict('TckgenFslgradParametersTagged', {
186
+ "@type": typing.Literal["fslgrad"],
116
187
  "bvecs": InputPathType,
117
188
  "bvals": InputPathType,
118
189
  })
119
190
 
120
191
 
121
192
  TckgenConfigParameters = typing.TypedDict('TckgenConfigParameters', {
122
- "__STYXTYPE__": typing.Literal["config"],
193
+ "@type": typing.NotRequired[typing.Literal["config"]],
194
+ "key": str,
195
+ "value": str,
196
+ })
197
+ TckgenConfigParametersTagged = typing.TypedDict('TckgenConfigParametersTagged', {
198
+ "@type": typing.Literal["config"],
123
199
  "key": str,
124
200
  "value": str,
125
201
  })
126
202
 
127
203
 
128
204
  TckgenParameters = typing.TypedDict('TckgenParameters', {
129
- "__STYXTYPE__": typing.Literal["tckgen"],
205
+ "@type": typing.NotRequired[typing.Literal["mrtrix/tckgen"]],
206
+ "algorithm": typing.NotRequired[str | None],
207
+ "select": typing.NotRequired[int | None],
208
+ "step": typing.NotRequired[float | None],
209
+ "angle": typing.NotRequired[float | None],
210
+ "minlength": typing.NotRequired[float | None],
211
+ "maxlength": typing.NotRequired[float | None],
212
+ "cutoff": typing.NotRequired[float | None],
213
+ "trials": typing.NotRequired[int | None],
214
+ "noprecomputed": bool,
215
+ "rk4": bool,
216
+ "stop": bool,
217
+ "downsample": typing.NotRequired[int | None],
218
+ "seed_image": typing.NotRequired[list[TckgenSeedImageParameters] | None],
219
+ "seed_sphere": typing.NotRequired[list[TckgenSeedSphereParameters] | None],
220
+ "seed_random_per_voxel": typing.NotRequired[list[TckgenSeedRandomPerVoxelParameters] | None],
221
+ "seed_grid_per_voxel": typing.NotRequired[list[TckgenSeedGridPerVoxelParameters] | None],
222
+ "seed_rejection": typing.NotRequired[list[TckgenSeedRejectionParameters] | None],
223
+ "seed_gmwmi": typing.NotRequired[list[TckgenSeedGmwmiParameters] | None],
224
+ "seed_dynamic": typing.NotRequired[InputPathType | None],
225
+ "seeds": typing.NotRequired[int | None],
226
+ "max_attempts_per_seed": typing.NotRequired[int | None],
227
+ "seed_cutoff": typing.NotRequired[float | None],
228
+ "seed_unidirectional": bool,
229
+ "seed_direction": typing.NotRequired[list[float] | None],
230
+ "output_seeds": typing.NotRequired[str | None],
231
+ "include": typing.NotRequired[list[TckgenIncludeParameters] | None],
232
+ "include_ordered": typing.NotRequired[list[TckgenIncludeOrderedParameters] | None],
233
+ "exclude": typing.NotRequired[list[TckgenExcludeParameters] | None],
234
+ "mask": typing.NotRequired[list[TckgenMaskParameters] | None],
235
+ "act": typing.NotRequired[InputPathType | None],
236
+ "backtrack": bool,
237
+ "crop_at_gmwmi": bool,
238
+ "power": typing.NotRequired[float | None],
239
+ "samples": typing.NotRequired[int | None],
240
+ "grad": typing.NotRequired[InputPathType | None],
241
+ "fslgrad": typing.NotRequired[TckgenFslgradParameters | None],
242
+ "info": bool,
243
+ "quiet": bool,
244
+ "debug": bool,
245
+ "force": bool,
246
+ "nthreads": typing.NotRequired[int | None],
247
+ "config": typing.NotRequired[list[TckgenConfigParameters] | None],
248
+ "help": bool,
249
+ "version": bool,
250
+ "source": InputPathType,
251
+ "tracks": str,
252
+ })
253
+ TckgenParametersTagged = typing.TypedDict('TckgenParametersTagged', {
254
+ "@type": typing.Literal["mrtrix/tckgen"],
130
255
  "algorithm": typing.NotRequired[str | None],
131
256
  "select": typing.NotRequired[int | None],
132
257
  "step": typing.NotRequired[float | None],
@@ -176,7 +301,7 @@ TckgenParameters = typing.TypedDict('TckgenParameters', {
176
301
  })
177
302
 
178
303
 
179
- def dyn_cargs(
304
+ def tckgen_spec_cargs_dyn_fn(
180
305
  t: str,
181
306
  ) -> typing.Any:
182
307
  """
@@ -188,29 +313,76 @@ def dyn_cargs(
188
313
  Build cargs function.
189
314
  """
190
315
  return {
191
- "tckgen": tckgen_cargs,
192
- "seed_image": tckgen_seed_image_cargs,
193
- "seed_sphere": tckgen_seed_sphere_cargs,
194
- "seed_random_per_voxel": tckgen_seed_random_per_voxel_cargs,
195
- "seed_grid_per_voxel": tckgen_seed_grid_per_voxel_cargs,
196
- "seed_rejection": tckgen_seed_rejection_cargs,
197
- "seed_gmwmi": tckgen_seed_gmwmi_cargs,
198
- "include": tckgen_include_cargs,
199
316
  "VariousString": tckgen_various_string_cargs,
200
317
  "VariousFile": tckgen_various_file_cargs,
201
- "include_ordered": tckgen_include_ordered_cargs,
202
- "exclude": tckgen_exclude_cargs,
318
+ }.get(t)
319
+
320
+
321
+ def tckgen_spec_outputs_dyn_fn(
322
+ t: str,
323
+ ) -> typing.Any:
324
+ """
325
+ Get build outputs function by command type.
326
+
327
+ Args:
328
+ t: Command type.
329
+ Returns:
330
+ Build outputs function.
331
+ """
332
+ return {
333
+ }.get(t)
334
+
335
+
336
+ def tckgen_spec_cargs_dyn_fn_(
337
+ t: str,
338
+ ) -> typing.Any:
339
+ """
340
+ Get build cargs function by command type.
341
+
342
+ Args:
343
+ t: Command type.
344
+ Returns:
345
+ Build cargs function.
346
+ """
347
+ return {
203
348
  "VariousString_1": tckgen_various_string_1_cargs,
204
349
  "VariousFile_1": tckgen_various_file_1_cargs,
205
- "mask": tckgen_mask_cargs,
350
+ }.get(t)
351
+
352
+
353
+ def tckgen_spec_outputs_dyn_fn_(
354
+ t: str,
355
+ ) -> typing.Any:
356
+ """
357
+ Get build outputs function by command type.
358
+
359
+ Args:
360
+ t: Command type.
361
+ Returns:
362
+ Build outputs function.
363
+ """
364
+ return {
365
+ }.get(t)
366
+
367
+
368
+ def tckgen_spec_cargs_dyn_fn_2(
369
+ t: str,
370
+ ) -> typing.Any:
371
+ """
372
+ Get build cargs function by command type.
373
+
374
+ Args:
375
+ t: Command type.
376
+ Returns:
377
+ Build cargs function.
378
+ """
379
+ return {
206
380
  "VariousString_2": tckgen_various_string_2_cargs,
207
381
  "VariousFile_2": tckgen_various_file_2_cargs,
208
- "fslgrad": tckgen_fslgrad_cargs,
209
- "config": tckgen_config_cargs,
210
382
  }.get(t)
211
383
 
212
384
 
213
- def dyn_outputs(
385
+ def tckgen_spec_outputs_dyn_fn_2(
214
386
  t: str,
215
387
  ) -> typing.Any:
216
388
  """
@@ -222,13 +394,12 @@ def dyn_outputs(
222
394
  Build outputs function.
223
395
  """
224
396
  return {
225
- "tckgen": tckgen_outputs,
226
397
  }.get(t)
227
398
 
228
399
 
229
400
  def tckgen_seed_image_params(
230
401
  image: InputPathType,
231
- ) -> TckgenSeedImageParameters:
402
+ ) -> TckgenSeedImageParametersTagged:
232
403
  """
233
404
  Build parameters.
234
405
 
@@ -238,7 +409,7 @@ def tckgen_seed_image_params(
238
409
  Parameter dictionary
239
410
  """
240
411
  params = {
241
- "__STYXTYPE__": "seed_image",
412
+ "@type": "seed_image",
242
413
  "image": image,
243
414
  }
244
415
  return params
@@ -259,13 +430,13 @@ def tckgen_seed_image_cargs(
259
430
  """
260
431
  cargs = []
261
432
  cargs.append("-seed_image")
262
- cargs.append(execution.input_file(params.get("image")))
433
+ cargs.append(execution.input_file(params.get("image", None)))
263
434
  return cargs
264
435
 
265
436
 
266
437
  def tckgen_seed_sphere_params(
267
438
  spec: list[float],
268
- ) -> TckgenSeedSphereParameters:
439
+ ) -> TckgenSeedSphereParametersTagged:
269
440
  """
270
441
  Build parameters.
271
442
 
@@ -276,7 +447,7 @@ def tckgen_seed_sphere_params(
276
447
  Parameter dictionary
277
448
  """
278
449
  params = {
279
- "__STYXTYPE__": "seed_sphere",
450
+ "@type": "seed_sphere",
280
451
  "spec": spec,
281
452
  }
282
453
  return params
@@ -297,14 +468,14 @@ def tckgen_seed_sphere_cargs(
297
468
  """
298
469
  cargs = []
299
470
  cargs.append("-seed_sphere")
300
- cargs.append(",".join(map(str, params.get("spec"))))
471
+ cargs.append(",".join(map(str, params.get("spec", None))))
301
472
  return cargs
302
473
 
303
474
 
304
475
  def tckgen_seed_random_per_voxel_params(
305
476
  image: InputPathType,
306
477
  num_per_voxel: int,
307
- ) -> TckgenSeedRandomPerVoxelParameters:
478
+ ) -> TckgenSeedRandomPerVoxelParametersTagged:
308
479
  """
309
480
  Build parameters.
310
481
 
@@ -317,7 +488,7 @@ def tckgen_seed_random_per_voxel_params(
317
488
  Parameter dictionary
318
489
  """
319
490
  params = {
320
- "__STYXTYPE__": "seed_random_per_voxel",
491
+ "@type": "seed_random_per_voxel",
321
492
  "image": image,
322
493
  "num_per_voxel": num_per_voxel,
323
494
  }
@@ -339,15 +510,15 @@ def tckgen_seed_random_per_voxel_cargs(
339
510
  """
340
511
  cargs = []
341
512
  cargs.append("-seed_random_per_voxel")
342
- cargs.append(execution.input_file(params.get("image")))
343
- cargs.append(str(params.get("num_per_voxel")))
513
+ cargs.append(execution.input_file(params.get("image", None)))
514
+ cargs.append(str(params.get("num_per_voxel", None)))
344
515
  return cargs
345
516
 
346
517
 
347
518
  def tckgen_seed_grid_per_voxel_params(
348
519
  image: InputPathType,
349
520
  grid_size: int,
350
- ) -> TckgenSeedGridPerVoxelParameters:
521
+ ) -> TckgenSeedGridPerVoxelParametersTagged:
351
522
  """
352
523
  Build parameters.
353
524
 
@@ -362,7 +533,7 @@ def tckgen_seed_grid_per_voxel_params(
362
533
  Parameter dictionary
363
534
  """
364
535
  params = {
365
- "__STYXTYPE__": "seed_grid_per_voxel",
536
+ "@type": "seed_grid_per_voxel",
366
537
  "image": image,
367
538
  "grid_size": grid_size,
368
539
  }
@@ -384,14 +555,14 @@ def tckgen_seed_grid_per_voxel_cargs(
384
555
  """
385
556
  cargs = []
386
557
  cargs.append("-seed_grid_per_voxel")
387
- cargs.append(execution.input_file(params.get("image")))
388
- cargs.append(str(params.get("grid_size")))
558
+ cargs.append(execution.input_file(params.get("image", None)))
559
+ cargs.append(str(params.get("grid_size", None)))
389
560
  return cargs
390
561
 
391
562
 
392
563
  def tckgen_seed_rejection_params(
393
564
  image: InputPathType,
394
- ) -> TckgenSeedRejectionParameters:
565
+ ) -> TckgenSeedRejectionParametersTagged:
395
566
  """
396
567
  Build parameters.
397
568
 
@@ -402,7 +573,7 @@ def tckgen_seed_rejection_params(
402
573
  Parameter dictionary
403
574
  """
404
575
  params = {
405
- "__STYXTYPE__": "seed_rejection",
576
+ "@type": "seed_rejection",
406
577
  "image": image,
407
578
  }
408
579
  return params
@@ -423,13 +594,13 @@ def tckgen_seed_rejection_cargs(
423
594
  """
424
595
  cargs = []
425
596
  cargs.append("-seed_rejection")
426
- cargs.append(execution.input_file(params.get("image")))
597
+ cargs.append(execution.input_file(params.get("image", None)))
427
598
  return cargs
428
599
 
429
600
 
430
601
  def tckgen_seed_gmwmi_params(
431
602
  image: InputPathType,
432
- ) -> TckgenSeedGmwmiParameters:
603
+ ) -> TckgenSeedGmwmiParametersTagged:
433
604
  """
434
605
  Build parameters.
435
606
 
@@ -442,7 +613,7 @@ def tckgen_seed_gmwmi_params(
442
613
  Parameter dictionary
443
614
  """
444
615
  params = {
445
- "__STYXTYPE__": "seed_gmwmi",
616
+ "@type": "seed_gmwmi",
446
617
  "image": image,
447
618
  }
448
619
  return params
@@ -463,13 +634,13 @@ def tckgen_seed_gmwmi_cargs(
463
634
  """
464
635
  cargs = []
465
636
  cargs.append("-seed_gmwmi")
466
- cargs.append(execution.input_file(params.get("image")))
637
+ cargs.append(execution.input_file(params.get("image", None)))
467
638
  return cargs
468
639
 
469
640
 
470
641
  def tckgen_various_string_params(
471
642
  obj: str,
472
- ) -> TckgenVariousStringParameters:
643
+ ) -> TckgenVariousStringParametersTagged:
473
644
  """
474
645
  Build parameters.
475
646
 
@@ -479,7 +650,7 @@ def tckgen_various_string_params(
479
650
  Parameter dictionary
480
651
  """
481
652
  params = {
482
- "__STYXTYPE__": "VariousString",
653
+ "@type": "VariousString",
483
654
  "obj": obj,
484
655
  }
485
656
  return params
@@ -499,13 +670,13 @@ def tckgen_various_string_cargs(
499
670
  Command-line arguments.
500
671
  """
501
672
  cargs = []
502
- cargs.append(params.get("obj"))
673
+ cargs.append(params.get("obj", None))
503
674
  return cargs
504
675
 
505
676
 
506
677
  def tckgen_various_file_params(
507
678
  obj: InputPathType,
508
- ) -> TckgenVariousFileParameters:
679
+ ) -> TckgenVariousFileParametersTagged:
509
680
  """
510
681
  Build parameters.
511
682
 
@@ -515,7 +686,7 @@ def tckgen_various_file_params(
515
686
  Parameter dictionary
516
687
  """
517
688
  params = {
518
- "__STYXTYPE__": "VariousFile",
689
+ "@type": "VariousFile",
519
690
  "obj": obj,
520
691
  }
521
692
  return params
@@ -535,13 +706,13 @@ def tckgen_various_file_cargs(
535
706
  Command-line arguments.
536
707
  """
537
708
  cargs = []
538
- cargs.append(execution.input_file(params.get("obj")))
709
+ cargs.append(execution.input_file(params.get("obj", None)))
539
710
  return cargs
540
711
 
541
712
 
542
713
  def tckgen_include_params(
543
- spec: typing.Union[TckgenVariousStringParameters, TckgenVariousFileParameters],
544
- ) -> TckgenIncludeParameters:
714
+ spec: typing.Union[TckgenVariousStringParametersTagged, TckgenVariousFileParametersTagged],
715
+ ) -> TckgenIncludeParametersTagged:
545
716
  """
546
717
  Build parameters.
547
718
 
@@ -553,7 +724,7 @@ def tckgen_include_params(
553
724
  Parameter dictionary
554
725
  """
555
726
  params = {
556
- "__STYXTYPE__": "include",
727
+ "@type": "include",
557
728
  "spec": spec,
558
729
  }
559
730
  return params
@@ -574,13 +745,13 @@ def tckgen_include_cargs(
574
745
  """
575
746
  cargs = []
576
747
  cargs.append("-include")
577
- cargs.extend(dyn_cargs(params.get("spec")["__STYXTYPE__"])(params.get("spec"), execution))
748
+ cargs.extend(tckgen_spec_cargs_dyn_fn(params.get("spec", None)["@type"])(params.get("spec", None), execution))
578
749
  return cargs
579
750
 
580
751
 
581
752
  def tckgen_include_ordered_params(
582
753
  image: str,
583
- ) -> TckgenIncludeOrderedParameters:
754
+ ) -> TckgenIncludeOrderedParametersTagged:
584
755
  """
585
756
  Build parameters.
586
757
 
@@ -593,7 +764,7 @@ def tckgen_include_ordered_params(
593
764
  Parameter dictionary
594
765
  """
595
766
  params = {
596
- "__STYXTYPE__": "include_ordered",
767
+ "@type": "include_ordered",
597
768
  "image": image,
598
769
  }
599
770
  return params
@@ -614,13 +785,13 @@ def tckgen_include_ordered_cargs(
614
785
  """
615
786
  cargs = []
616
787
  cargs.append("-include_ordered")
617
- cargs.append(params.get("image"))
788
+ cargs.append(params.get("image", None))
618
789
  return cargs
619
790
 
620
791
 
621
792
  def tckgen_various_string_1_params(
622
793
  obj: str,
623
- ) -> TckgenVariousString1Parameters:
794
+ ) -> TckgenVariousString1ParametersTagged:
624
795
  """
625
796
  Build parameters.
626
797
 
@@ -630,7 +801,7 @@ def tckgen_various_string_1_params(
630
801
  Parameter dictionary
631
802
  """
632
803
  params = {
633
- "__STYXTYPE__": "VariousString_1",
804
+ "@type": "VariousString_1",
634
805
  "obj": obj,
635
806
  }
636
807
  return params
@@ -650,13 +821,13 @@ def tckgen_various_string_1_cargs(
650
821
  Command-line arguments.
651
822
  """
652
823
  cargs = []
653
- cargs.append(params.get("obj"))
824
+ cargs.append(params.get("obj", None))
654
825
  return cargs
655
826
 
656
827
 
657
828
  def tckgen_various_file_1_params(
658
829
  obj: InputPathType,
659
- ) -> TckgenVariousFile1Parameters:
830
+ ) -> TckgenVariousFile1ParametersTagged:
660
831
  """
661
832
  Build parameters.
662
833
 
@@ -666,7 +837,7 @@ def tckgen_various_file_1_params(
666
837
  Parameter dictionary
667
838
  """
668
839
  params = {
669
- "__STYXTYPE__": "VariousFile_1",
840
+ "@type": "VariousFile_1",
670
841
  "obj": obj,
671
842
  }
672
843
  return params
@@ -686,13 +857,13 @@ def tckgen_various_file_1_cargs(
686
857
  Command-line arguments.
687
858
  """
688
859
  cargs = []
689
- cargs.append(execution.input_file(params.get("obj")))
860
+ cargs.append(execution.input_file(params.get("obj", None)))
690
861
  return cargs
691
862
 
692
863
 
693
864
  def tckgen_exclude_params(
694
- spec: typing.Union[TckgenVariousString1Parameters, TckgenVariousFile1Parameters],
695
- ) -> TckgenExcludeParameters:
865
+ spec: typing.Union[TckgenVariousString1ParametersTagged, TckgenVariousFile1ParametersTagged],
866
+ ) -> TckgenExcludeParametersTagged:
696
867
  """
697
868
  Build parameters.
698
869
 
@@ -704,7 +875,7 @@ def tckgen_exclude_params(
704
875
  Parameter dictionary
705
876
  """
706
877
  params = {
707
- "__STYXTYPE__": "exclude",
878
+ "@type": "exclude",
708
879
  "spec": spec,
709
880
  }
710
881
  return params
@@ -725,13 +896,13 @@ def tckgen_exclude_cargs(
725
896
  """
726
897
  cargs = []
727
898
  cargs.append("-exclude")
728
- cargs.extend(dyn_cargs(params.get("spec")["__STYXTYPE__"])(params.get("spec"), execution))
899
+ cargs.extend(tckgen_spec_cargs_dyn_fn_(params.get("spec", None)["@type"])(params.get("spec", None), execution))
729
900
  return cargs
730
901
 
731
902
 
732
903
  def tckgen_various_string_2_params(
733
904
  obj: str,
734
- ) -> TckgenVariousString2Parameters:
905
+ ) -> TckgenVariousString2ParametersTagged:
735
906
  """
736
907
  Build parameters.
737
908
 
@@ -741,7 +912,7 @@ def tckgen_various_string_2_params(
741
912
  Parameter dictionary
742
913
  """
743
914
  params = {
744
- "__STYXTYPE__": "VariousString_2",
915
+ "@type": "VariousString_2",
745
916
  "obj": obj,
746
917
  }
747
918
  return params
@@ -761,13 +932,13 @@ def tckgen_various_string_2_cargs(
761
932
  Command-line arguments.
762
933
  """
763
934
  cargs = []
764
- cargs.append(params.get("obj"))
935
+ cargs.append(params.get("obj", None))
765
936
  return cargs
766
937
 
767
938
 
768
939
  def tckgen_various_file_2_params(
769
940
  obj: InputPathType,
770
- ) -> TckgenVariousFile2Parameters:
941
+ ) -> TckgenVariousFile2ParametersTagged:
771
942
  """
772
943
  Build parameters.
773
944
 
@@ -777,7 +948,7 @@ def tckgen_various_file_2_params(
777
948
  Parameter dictionary
778
949
  """
779
950
  params = {
780
- "__STYXTYPE__": "VariousFile_2",
951
+ "@type": "VariousFile_2",
781
952
  "obj": obj,
782
953
  }
783
954
  return params
@@ -797,13 +968,13 @@ def tckgen_various_file_2_cargs(
797
968
  Command-line arguments.
798
969
  """
799
970
  cargs = []
800
- cargs.append(execution.input_file(params.get("obj")))
971
+ cargs.append(execution.input_file(params.get("obj", None)))
801
972
  return cargs
802
973
 
803
974
 
804
975
  def tckgen_mask_params(
805
- spec: typing.Union[TckgenVariousString2Parameters, TckgenVariousFile2Parameters],
806
- ) -> TckgenMaskParameters:
976
+ spec: typing.Union[TckgenVariousString2ParametersTagged, TckgenVariousFile2ParametersTagged],
977
+ ) -> TckgenMaskParametersTagged:
807
978
  """
808
979
  Build parameters.
809
980
 
@@ -815,7 +986,7 @@ def tckgen_mask_params(
815
986
  Parameter dictionary
816
987
  """
817
988
  params = {
818
- "__STYXTYPE__": "mask",
989
+ "@type": "mask",
819
990
  "spec": spec,
820
991
  }
821
992
  return params
@@ -836,14 +1007,14 @@ def tckgen_mask_cargs(
836
1007
  """
837
1008
  cargs = []
838
1009
  cargs.append("-mask")
839
- cargs.extend(dyn_cargs(params.get("spec")["__STYXTYPE__"])(params.get("spec"), execution))
1010
+ cargs.extend(tckgen_spec_cargs_dyn_fn_2(params.get("spec", None)["@type"])(params.get("spec", None), execution))
840
1011
  return cargs
841
1012
 
842
1013
 
843
1014
  def tckgen_fslgrad_params(
844
1015
  bvecs: InputPathType,
845
1016
  bvals: InputPathType,
846
- ) -> TckgenFslgradParameters:
1017
+ ) -> TckgenFslgradParametersTagged:
847
1018
  """
848
1019
  Build parameters.
849
1020
 
@@ -860,7 +1031,7 @@ def tckgen_fslgrad_params(
860
1031
  Parameter dictionary
861
1032
  """
862
1033
  params = {
863
- "__STYXTYPE__": "fslgrad",
1034
+ "@type": "fslgrad",
864
1035
  "bvecs": bvecs,
865
1036
  "bvals": bvals,
866
1037
  }
@@ -882,15 +1053,15 @@ def tckgen_fslgrad_cargs(
882
1053
  """
883
1054
  cargs = []
884
1055
  cargs.append("-fslgrad")
885
- cargs.append(execution.input_file(params.get("bvecs")))
886
- cargs.append(execution.input_file(params.get("bvals")))
1056
+ cargs.append(execution.input_file(params.get("bvecs", None)))
1057
+ cargs.append(execution.input_file(params.get("bvals", None)))
887
1058
  return cargs
888
1059
 
889
1060
 
890
1061
  def tckgen_config_params(
891
1062
  key: str,
892
1063
  value: str,
893
- ) -> TckgenConfigParameters:
1064
+ ) -> TckgenConfigParametersTagged:
894
1065
  """
895
1066
  Build parameters.
896
1067
 
@@ -901,7 +1072,7 @@ def tckgen_config_params(
901
1072
  Parameter dictionary
902
1073
  """
903
1074
  params = {
904
- "__STYXTYPE__": "config",
1075
+ "@type": "config",
905
1076
  "key": key,
906
1077
  "value": value,
907
1078
  }
@@ -923,14 +1094,14 @@ def tckgen_config_cargs(
923
1094
  """
924
1095
  cargs = []
925
1096
  cargs.append("-config")
926
- cargs.append(params.get("key"))
927
- cargs.append(params.get("value"))
1097
+ cargs.append(params.get("key", None))
1098
+ cargs.append(params.get("value", None))
928
1099
  return cargs
929
1100
 
930
1101
 
931
1102
  class TckgenOutputs(typing.NamedTuple):
932
1103
  """
933
- Output object returned when calling `tckgen(...)`.
1104
+ Output object returned when calling `TckgenParameters(...)`.
934
1105
  """
935
1106
  root: OutputPathType
936
1107
  """Output root folder. This is the root folder for all outputs."""
@@ -987,7 +1158,7 @@ def tckgen_params(
987
1158
  config: list[TckgenConfigParameters] | None = None,
988
1159
  help_: bool = False,
989
1160
  version: bool = False,
990
- ) -> TckgenParameters:
1161
+ ) -> TckgenParametersTagged:
991
1162
  """
992
1163
  Build parameters.
993
1164
 
@@ -1128,7 +1299,7 @@ def tckgen_params(
1128
1299
  Parameter dictionary
1129
1300
  """
1130
1301
  params = {
1131
- "__STYXTYPE__": "tckgen",
1302
+ "@type": "mrtrix/tckgen",
1132
1303
  "noprecomputed": noprecomputed,
1133
1304
  "rk4": rk4,
1134
1305
  "stop": stop,
@@ -1226,156 +1397,156 @@ def tckgen_cargs(
1226
1397
  """
1227
1398
  cargs = []
1228
1399
  cargs.append("tckgen")
1229
- if params.get("algorithm") is not None:
1400
+ if params.get("algorithm", None) is not None:
1230
1401
  cargs.extend([
1231
1402
  "-algorithm",
1232
- params.get("algorithm")
1403
+ params.get("algorithm", None)
1233
1404
  ])
1234
- if params.get("select") is not None:
1405
+ if params.get("select", None) is not None:
1235
1406
  cargs.extend([
1236
1407
  "-select",
1237
- str(params.get("select"))
1408
+ str(params.get("select", None))
1238
1409
  ])
1239
- if params.get("step") is not None:
1410
+ if params.get("step", None) is not None:
1240
1411
  cargs.extend([
1241
1412
  "-step",
1242
- str(params.get("step"))
1413
+ str(params.get("step", None))
1243
1414
  ])
1244
- if params.get("angle") is not None:
1415
+ if params.get("angle", None) is not None:
1245
1416
  cargs.extend([
1246
1417
  "-angle",
1247
- str(params.get("angle"))
1418
+ str(params.get("angle", None))
1248
1419
  ])
1249
- if params.get("minlength") is not None:
1420
+ if params.get("minlength", None) is not None:
1250
1421
  cargs.extend([
1251
1422
  "-minlength",
1252
- str(params.get("minlength"))
1423
+ str(params.get("minlength", None))
1253
1424
  ])
1254
- if params.get("maxlength") is not None:
1425
+ if params.get("maxlength", None) is not None:
1255
1426
  cargs.extend([
1256
1427
  "-maxlength",
1257
- str(params.get("maxlength"))
1428
+ str(params.get("maxlength", None))
1258
1429
  ])
1259
- if params.get("cutoff") is not None:
1430
+ if params.get("cutoff", None) is not None:
1260
1431
  cargs.extend([
1261
1432
  "-cutoff",
1262
- str(params.get("cutoff"))
1433
+ str(params.get("cutoff", None))
1263
1434
  ])
1264
- if params.get("trials") is not None:
1435
+ if params.get("trials", None) is not None:
1265
1436
  cargs.extend([
1266
1437
  "-trials",
1267
- str(params.get("trials"))
1438
+ str(params.get("trials", None))
1268
1439
  ])
1269
- if params.get("noprecomputed"):
1440
+ if params.get("noprecomputed", False):
1270
1441
  cargs.append("-noprecomputed")
1271
- if params.get("rk4"):
1442
+ if params.get("rk4", False):
1272
1443
  cargs.append("-rk4")
1273
- if params.get("stop"):
1444
+ if params.get("stop", False):
1274
1445
  cargs.append("-stop")
1275
- if params.get("downsample") is not None:
1446
+ if params.get("downsample", None) is not None:
1276
1447
  cargs.extend([
1277
1448
  "-downsample",
1278
- str(params.get("downsample"))
1449
+ str(params.get("downsample", None))
1279
1450
  ])
1280
- if params.get("seed_image") is not None:
1281
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("seed_image")] for a in c])
1282
- if params.get("seed_sphere") is not None:
1283
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("seed_sphere")] for a in c])
1284
- if params.get("seed_random_per_voxel") is not None:
1285
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("seed_random_per_voxel")] for a in c])
1286
- if params.get("seed_grid_per_voxel") is not None:
1287
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("seed_grid_per_voxel")] for a in c])
1288
- if params.get("seed_rejection") is not None:
1289
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("seed_rejection")] for a in c])
1290
- if params.get("seed_gmwmi") is not None:
1291
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("seed_gmwmi")] for a in c])
1292
- if params.get("seed_dynamic") is not None:
1451
+ if params.get("seed_image", None) is not None:
1452
+ cargs.extend([a for c in [tckgen_seed_image_cargs(s, execution) for s in params.get("seed_image", None)] for a in c])
1453
+ if params.get("seed_sphere", None) is not None:
1454
+ cargs.extend([a for c in [tckgen_seed_sphere_cargs(s, execution) for s in params.get("seed_sphere", None)] for a in c])
1455
+ if params.get("seed_random_per_voxel", None) is not None:
1456
+ cargs.extend([a for c in [tckgen_seed_random_per_voxel_cargs(s, execution) for s in params.get("seed_random_per_voxel", None)] for a in c])
1457
+ if params.get("seed_grid_per_voxel", None) is not None:
1458
+ cargs.extend([a for c in [tckgen_seed_grid_per_voxel_cargs(s, execution) for s in params.get("seed_grid_per_voxel", None)] for a in c])
1459
+ if params.get("seed_rejection", None) is not None:
1460
+ cargs.extend([a for c in [tckgen_seed_rejection_cargs(s, execution) for s in params.get("seed_rejection", None)] for a in c])
1461
+ if params.get("seed_gmwmi", None) is not None:
1462
+ cargs.extend([a for c in [tckgen_seed_gmwmi_cargs(s, execution) for s in params.get("seed_gmwmi", None)] for a in c])
1463
+ if params.get("seed_dynamic", None) is not None:
1293
1464
  cargs.extend([
1294
1465
  "-seed_dynamic",
1295
- execution.input_file(params.get("seed_dynamic"))
1466
+ execution.input_file(params.get("seed_dynamic", None))
1296
1467
  ])
1297
- if params.get("seeds") is not None:
1468
+ if params.get("seeds", None) is not None:
1298
1469
  cargs.extend([
1299
1470
  "-seeds",
1300
- str(params.get("seeds"))
1471
+ str(params.get("seeds", None))
1301
1472
  ])
1302
- if params.get("max_attempts_per_seed") is not None:
1473
+ if params.get("max_attempts_per_seed", None) is not None:
1303
1474
  cargs.extend([
1304
1475
  "-max_attempts_per_seed",
1305
- str(params.get("max_attempts_per_seed"))
1476
+ str(params.get("max_attempts_per_seed", None))
1306
1477
  ])
1307
- if params.get("seed_cutoff") is not None:
1478
+ if params.get("seed_cutoff", None) is not None:
1308
1479
  cargs.extend([
1309
1480
  "-seed_cutoff",
1310
- str(params.get("seed_cutoff"))
1481
+ str(params.get("seed_cutoff", None))
1311
1482
  ])
1312
- if params.get("seed_unidirectional"):
1483
+ if params.get("seed_unidirectional", False):
1313
1484
  cargs.append("-seed_unidirectional")
1314
- if params.get("seed_direction") is not None:
1485
+ if params.get("seed_direction", None) is not None:
1315
1486
  cargs.extend([
1316
1487
  "-seed_direction",
1317
- ",".join(map(str, params.get("seed_direction")))
1488
+ ",".join(map(str, params.get("seed_direction", None)))
1318
1489
  ])
1319
- if params.get("output_seeds") is not None:
1490
+ if params.get("output_seeds", None) is not None:
1320
1491
  cargs.extend([
1321
1492
  "-output_seeds",
1322
- params.get("output_seeds")
1493
+ params.get("output_seeds", None)
1323
1494
  ])
1324
- if params.get("include") is not None:
1325
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("include")] for a in c])
1326
- if params.get("include_ordered") is not None:
1327
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("include_ordered")] for a in c])
1328
- if params.get("exclude") is not None:
1329
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("exclude")] for a in c])
1330
- if params.get("mask") is not None:
1331
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("mask")] for a in c])
1332
- if params.get("act") is not None:
1495
+ if params.get("include", None) is not None:
1496
+ cargs.extend([a for c in [tckgen_include_cargs(s, execution) for s in params.get("include", None)] for a in c])
1497
+ if params.get("include_ordered", None) is not None:
1498
+ cargs.extend([a for c in [tckgen_include_ordered_cargs(s, execution) for s in params.get("include_ordered", None)] for a in c])
1499
+ if params.get("exclude", None) is not None:
1500
+ cargs.extend([a for c in [tckgen_exclude_cargs(s, execution) for s in params.get("exclude", None)] for a in c])
1501
+ if params.get("mask", None) is not None:
1502
+ cargs.extend([a for c in [tckgen_mask_cargs(s, execution) for s in params.get("mask", None)] for a in c])
1503
+ if params.get("act", None) is not None:
1333
1504
  cargs.extend([
1334
1505
  "-act",
1335
- execution.input_file(params.get("act"))
1506
+ execution.input_file(params.get("act", None))
1336
1507
  ])
1337
- if params.get("backtrack"):
1508
+ if params.get("backtrack", False):
1338
1509
  cargs.append("-backtrack")
1339
- if params.get("crop_at_gmwmi"):
1510
+ if params.get("crop_at_gmwmi", False):
1340
1511
  cargs.append("-crop_at_gmwmi")
1341
- if params.get("power") is not None:
1512
+ if params.get("power", None) is not None:
1342
1513
  cargs.extend([
1343
1514
  "-power",
1344
- str(params.get("power"))
1515
+ str(params.get("power", None))
1345
1516
  ])
1346
- if params.get("samples") is not None:
1517
+ if params.get("samples", None) is not None:
1347
1518
  cargs.extend([
1348
1519
  "-samples",
1349
- str(params.get("samples"))
1520
+ str(params.get("samples", None))
1350
1521
  ])
1351
- if params.get("grad") is not None:
1522
+ if params.get("grad", None) is not None:
1352
1523
  cargs.extend([
1353
1524
  "-grad",
1354
- execution.input_file(params.get("grad"))
1525
+ execution.input_file(params.get("grad", None))
1355
1526
  ])
1356
- if params.get("fslgrad") is not None:
1357
- cargs.extend(dyn_cargs(params.get("fslgrad")["__STYXTYPE__"])(params.get("fslgrad"), execution))
1358
- if params.get("info"):
1527
+ if params.get("fslgrad", None) is not None:
1528
+ cargs.extend(tckgen_fslgrad_cargs(params.get("fslgrad", None), execution))
1529
+ if params.get("info", False):
1359
1530
  cargs.append("-info")
1360
- if params.get("quiet"):
1531
+ if params.get("quiet", False):
1361
1532
  cargs.append("-quiet")
1362
- if params.get("debug"):
1533
+ if params.get("debug", False):
1363
1534
  cargs.append("-debug")
1364
- if params.get("force"):
1535
+ if params.get("force", False):
1365
1536
  cargs.append("-force")
1366
- if params.get("nthreads") is not None:
1537
+ if params.get("nthreads", None) is not None:
1367
1538
  cargs.extend([
1368
1539
  "-nthreads",
1369
- str(params.get("nthreads"))
1540
+ str(params.get("nthreads", None))
1370
1541
  ])
1371
- if params.get("config") is not None:
1372
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
1373
- if params.get("help"):
1542
+ if params.get("config", None) is not None:
1543
+ cargs.extend([a for c in [tckgen_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
1544
+ if params.get("help", False):
1374
1545
  cargs.append("-help")
1375
- if params.get("version"):
1546
+ if params.get("version", False):
1376
1547
  cargs.append("-version")
1377
- cargs.append(execution.input_file(params.get("source")))
1378
- cargs.append(params.get("tracks"))
1548
+ cargs.append(execution.input_file(params.get("source", None)))
1549
+ cargs.append(params.get("tracks", None))
1379
1550
  return cargs
1380
1551
 
1381
1552
 
@@ -1394,17 +1565,19 @@ def tckgen_outputs(
1394
1565
  """
1395
1566
  ret = TckgenOutputs(
1396
1567
  root=execution.output_file("."),
1397
- tracks=execution.output_file(params.get("tracks")),
1398
- output_seeds=execution.output_file(params.get("output_seeds")) if (params.get("output_seeds") is not None) else None,
1568
+ tracks=execution.output_file(params.get("tracks", None)),
1569
+ output_seeds=execution.output_file(params.get("output_seeds", None)) if (params.get("output_seeds") is not None) else None,
1399
1570
  )
1400
1571
  return ret
1401
1572
 
1402
1573
 
1403
1574
  def tckgen_execute(
1404
1575
  params: TckgenParameters,
1405
- execution: Execution,
1576
+ runner: Runner | None = None,
1406
1577
  ) -> TckgenOutputs:
1407
1578
  """
1579
+ tckgen
1580
+
1408
1581
  Perform streamlines tractography.
1409
1582
 
1410
1583
  By default, tckgen produces a fixed number of streamlines, by attempting to
@@ -1547,10 +1720,12 @@ def tckgen_execute(
1547
1720
 
1548
1721
  Args:
1549
1722
  params: The parameters.
1550
- execution: The execution object.
1723
+ runner: Command runner.
1551
1724
  Returns:
1552
1725
  NamedTuple of outputs (described in `TckgenOutputs`).
1553
1726
  """
1727
+ runner = runner or get_global_runner()
1728
+ execution = runner.start_execution(TCKGEN_METADATA)
1554
1729
  params = execution.params(params)
1555
1730
  cargs = tckgen_cargs(params, execution)
1556
1731
  ret = tckgen_outputs(params, execution)
@@ -1608,6 +1783,8 @@ def tckgen(
1608
1783
  runner: Runner | None = None,
1609
1784
  ) -> TckgenOutputs:
1610
1785
  """
1786
+ tckgen
1787
+
1611
1788
  Perform streamlines tractography.
1612
1789
 
1613
1790
  By default, tckgen produces a fixed number of streamlines, by attempting to
@@ -1885,8 +2062,6 @@ def tckgen(
1885
2062
  Returns:
1886
2063
  NamedTuple of outputs (described in `TckgenOutputs`).
1887
2064
  """
1888
- runner = runner or get_global_runner()
1889
- execution = runner.start_execution(TCKGEN_METADATA)
1890
2065
  params = tckgen_params(
1891
2066
  algorithm=algorithm,
1892
2067
  select_=select_,
@@ -1935,34 +2110,16 @@ def tckgen(
1935
2110
  source=source,
1936
2111
  tracks=tracks,
1937
2112
  )
1938
- return tckgen_execute(params, execution)
2113
+ return tckgen_execute(params, runner)
1939
2114
 
1940
2115
 
1941
2116
  __all__ = [
1942
2117
  "TCKGEN_METADATA",
1943
- "TckgenConfigParameters",
1944
- "TckgenExcludeParameters",
1945
- "TckgenFslgradParameters",
1946
- "TckgenIncludeOrderedParameters",
1947
- "TckgenIncludeParameters",
1948
- "TckgenMaskParameters",
1949
2118
  "TckgenOutputs",
1950
- "TckgenParameters",
1951
- "TckgenSeedGmwmiParameters",
1952
- "TckgenSeedGridPerVoxelParameters",
1953
- "TckgenSeedImageParameters",
1954
- "TckgenSeedRandomPerVoxelParameters",
1955
- "TckgenSeedRejectionParameters",
1956
- "TckgenSeedSphereParameters",
1957
- "TckgenVariousFile1Parameters",
1958
- "TckgenVariousFile2Parameters",
1959
- "TckgenVariousFileParameters",
1960
- "TckgenVariousString1Parameters",
1961
- "TckgenVariousString2Parameters",
1962
- "TckgenVariousStringParameters",
1963
2119
  "tckgen",
1964
2120
  "tckgen_config_params",
1965
2121
  "tckgen_exclude_params",
2122
+ "tckgen_execute",
1966
2123
  "tckgen_fslgrad_params",
1967
2124
  "tckgen_include_ordered_params",
1968
2125
  "tckgen_include_params",