niwrap-mrtrix 0.6.3__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.3.dist-info/METADATA +0 -8
  121. niwrap_mrtrix-0.6.3.dist-info/RECORD +0 -119
  122. niwrap_mrtrix-0.6.3.dist-info/WHEEL +0 -4
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  TCKEDIT_METADATA = Metadata(
9
- id="4801e80a5f4cd98d36e936529b299d462d8c2b8d.boutiques",
9
+ id="8969d0b343f6f6903fb3ca1d150899aafd2fdca5.boutiques",
10
10
  name="tckedit",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,74 +14,146 @@ TCKEDIT_METADATA = Metadata(
14
14
 
15
15
 
16
16
  TckeditVariousStringParameters = typing.TypedDict('TckeditVariousStringParameters', {
17
- "__STYXTYPE__": typing.Literal["VariousString"],
17
+ "@type": typing.NotRequired[typing.Literal["VariousString"]],
18
+ "obj": str,
19
+ })
20
+ TckeditVariousStringParametersTagged = typing.TypedDict('TckeditVariousStringParametersTagged', {
21
+ "@type": typing.Literal["VariousString"],
18
22
  "obj": str,
19
23
  })
20
24
 
21
25
 
22
26
  TckeditVariousFileParameters = typing.TypedDict('TckeditVariousFileParameters', {
23
- "__STYXTYPE__": typing.Literal["VariousFile"],
27
+ "@type": typing.NotRequired[typing.Literal["VariousFile"]],
28
+ "obj": InputPathType,
29
+ })
30
+ TckeditVariousFileParametersTagged = typing.TypedDict('TckeditVariousFileParametersTagged', {
31
+ "@type": typing.Literal["VariousFile"],
24
32
  "obj": InputPathType,
25
33
  })
26
34
 
27
35
 
28
36
  TckeditIncludeParameters = typing.TypedDict('TckeditIncludeParameters', {
29
- "__STYXTYPE__": typing.Literal["include"],
30
- "spec": typing.Union[TckeditVariousStringParameters, TckeditVariousFileParameters],
37
+ "@type": typing.NotRequired[typing.Literal["include"]],
38
+ "spec": typing.Union[TckeditVariousStringParametersTagged, TckeditVariousFileParametersTagged],
39
+ })
40
+ TckeditIncludeParametersTagged = typing.TypedDict('TckeditIncludeParametersTagged', {
41
+ "@type": typing.Literal["include"],
42
+ "spec": typing.Union[TckeditVariousStringParametersTagged, TckeditVariousFileParametersTagged],
31
43
  })
32
44
 
33
45
 
34
46
  TckeditIncludeOrderedParameters = typing.TypedDict('TckeditIncludeOrderedParameters', {
35
- "__STYXTYPE__": typing.Literal["include_ordered"],
47
+ "@type": typing.NotRequired[typing.Literal["include_ordered"]],
48
+ "image": str,
49
+ })
50
+ TckeditIncludeOrderedParametersTagged = typing.TypedDict('TckeditIncludeOrderedParametersTagged', {
51
+ "@type": typing.Literal["include_ordered"],
36
52
  "image": str,
37
53
  })
38
54
 
39
55
 
40
56
  TckeditVariousString1Parameters = typing.TypedDict('TckeditVariousString1Parameters', {
41
- "__STYXTYPE__": typing.Literal["VariousString_1"],
57
+ "@type": typing.NotRequired[typing.Literal["VariousString_1"]],
58
+ "obj": str,
59
+ })
60
+ TckeditVariousString1ParametersTagged = typing.TypedDict('TckeditVariousString1ParametersTagged', {
61
+ "@type": typing.Literal["VariousString_1"],
42
62
  "obj": str,
43
63
  })
44
64
 
45
65
 
46
66
  TckeditVariousFile1Parameters = typing.TypedDict('TckeditVariousFile1Parameters', {
47
- "__STYXTYPE__": typing.Literal["VariousFile_1"],
67
+ "@type": typing.NotRequired[typing.Literal["VariousFile_1"]],
68
+ "obj": InputPathType,
69
+ })
70
+ TckeditVariousFile1ParametersTagged = typing.TypedDict('TckeditVariousFile1ParametersTagged', {
71
+ "@type": typing.Literal["VariousFile_1"],
48
72
  "obj": InputPathType,
49
73
  })
50
74
 
51
75
 
52
76
  TckeditExcludeParameters = typing.TypedDict('TckeditExcludeParameters', {
53
- "__STYXTYPE__": typing.Literal["exclude"],
54
- "spec": typing.Union[TckeditVariousString1Parameters, TckeditVariousFile1Parameters],
77
+ "@type": typing.NotRequired[typing.Literal["exclude"]],
78
+ "spec": typing.Union[TckeditVariousString1ParametersTagged, TckeditVariousFile1ParametersTagged],
79
+ })
80
+ TckeditExcludeParametersTagged = typing.TypedDict('TckeditExcludeParametersTagged', {
81
+ "@type": typing.Literal["exclude"],
82
+ "spec": typing.Union[TckeditVariousString1ParametersTagged, TckeditVariousFile1ParametersTagged],
55
83
  })
56
84
 
57
85
 
58
86
  TckeditVariousString2Parameters = typing.TypedDict('TckeditVariousString2Parameters', {
59
- "__STYXTYPE__": typing.Literal["VariousString_2"],
87
+ "@type": typing.NotRequired[typing.Literal["VariousString_2"]],
88
+ "obj": str,
89
+ })
90
+ TckeditVariousString2ParametersTagged = typing.TypedDict('TckeditVariousString2ParametersTagged', {
91
+ "@type": typing.Literal["VariousString_2"],
60
92
  "obj": str,
61
93
  })
62
94
 
63
95
 
64
96
  TckeditVariousFile2Parameters = typing.TypedDict('TckeditVariousFile2Parameters', {
65
- "__STYXTYPE__": typing.Literal["VariousFile_2"],
97
+ "@type": typing.NotRequired[typing.Literal["VariousFile_2"]],
98
+ "obj": InputPathType,
99
+ })
100
+ TckeditVariousFile2ParametersTagged = typing.TypedDict('TckeditVariousFile2ParametersTagged', {
101
+ "@type": typing.Literal["VariousFile_2"],
66
102
  "obj": InputPathType,
67
103
  })
68
104
 
69
105
 
70
106
  TckeditMaskParameters = typing.TypedDict('TckeditMaskParameters', {
71
- "__STYXTYPE__": typing.Literal["mask"],
72
- "spec": typing.Union[TckeditVariousString2Parameters, TckeditVariousFile2Parameters],
107
+ "@type": typing.NotRequired[typing.Literal["mask"]],
108
+ "spec": typing.Union[TckeditVariousString2ParametersTagged, TckeditVariousFile2ParametersTagged],
109
+ })
110
+ TckeditMaskParametersTagged = typing.TypedDict('TckeditMaskParametersTagged', {
111
+ "@type": typing.Literal["mask"],
112
+ "spec": typing.Union[TckeditVariousString2ParametersTagged, TckeditVariousFile2ParametersTagged],
73
113
  })
74
114
 
75
115
 
76
116
  TckeditConfigParameters = typing.TypedDict('TckeditConfigParameters', {
77
- "__STYXTYPE__": typing.Literal["config"],
117
+ "@type": typing.NotRequired[typing.Literal["config"]],
118
+ "key": str,
119
+ "value": str,
120
+ })
121
+ TckeditConfigParametersTagged = typing.TypedDict('TckeditConfigParametersTagged', {
122
+ "@type": typing.Literal["config"],
78
123
  "key": str,
79
124
  "value": str,
80
125
  })
81
126
 
82
127
 
83
128
  TckeditParameters = typing.TypedDict('TckeditParameters', {
84
- "__STYXTYPE__": typing.Literal["tckedit"],
129
+ "@type": typing.NotRequired[typing.Literal["mrtrix/tckedit"]],
130
+ "include": typing.NotRequired[list[TckeditIncludeParameters] | None],
131
+ "include_ordered": typing.NotRequired[list[TckeditIncludeOrderedParameters] | None],
132
+ "exclude": typing.NotRequired[list[TckeditExcludeParameters] | None],
133
+ "mask": typing.NotRequired[list[TckeditMaskParameters] | None],
134
+ "maxlength": typing.NotRequired[float | None],
135
+ "minlength": typing.NotRequired[float | None],
136
+ "number": typing.NotRequired[int | None],
137
+ "skip": typing.NotRequired[int | None],
138
+ "maxweight": typing.NotRequired[float | None],
139
+ "minweight": typing.NotRequired[float | None],
140
+ "inverse": bool,
141
+ "ends_only": bool,
142
+ "tck_weights_in": typing.NotRequired[InputPathType | None],
143
+ "tck_weights_out": typing.NotRequired[str | None],
144
+ "info": bool,
145
+ "quiet": bool,
146
+ "debug": bool,
147
+ "force": bool,
148
+ "nthreads": typing.NotRequired[int | None],
149
+ "config": typing.NotRequired[list[TckeditConfigParameters] | None],
150
+ "help": bool,
151
+ "version": bool,
152
+ "tracks_in": list[InputPathType],
153
+ "tracks_out": str,
154
+ })
155
+ TckeditParametersTagged = typing.TypedDict('TckeditParametersTagged', {
156
+ "@type": typing.Literal["mrtrix/tckedit"],
85
157
  "include": typing.NotRequired[list[TckeditIncludeParameters] | None],
86
158
  "include_ordered": typing.NotRequired[list[TckeditIncludeOrderedParameters] | None],
87
159
  "exclude": typing.NotRequired[list[TckeditExcludeParameters] | None],
@@ -109,7 +181,7 @@ TckeditParameters = typing.TypedDict('TckeditParameters', {
109
181
  })
110
182
 
111
183
 
112
- def dyn_cargs(
184
+ def tckedit_spec_cargs_dyn_fn(
113
185
  t: str,
114
186
  ) -> typing.Any:
115
187
  """
@@ -121,22 +193,76 @@ def dyn_cargs(
121
193
  Build cargs function.
122
194
  """
123
195
  return {
124
- "tckedit": tckedit_cargs,
125
- "include": tckedit_include_cargs,
126
196
  "VariousString": tckedit_various_string_cargs,
127
197
  "VariousFile": tckedit_various_file_cargs,
128
- "include_ordered": tckedit_include_ordered_cargs,
129
- "exclude": tckedit_exclude_cargs,
198
+ }.get(t)
199
+
200
+
201
+ def tckedit_spec_outputs_dyn_fn(
202
+ t: str,
203
+ ) -> typing.Any:
204
+ """
205
+ Get build outputs function by command type.
206
+
207
+ Args:
208
+ t: Command type.
209
+ Returns:
210
+ Build outputs function.
211
+ """
212
+ return {
213
+ }.get(t)
214
+
215
+
216
+ def tckedit_spec_cargs_dyn_fn_(
217
+ t: str,
218
+ ) -> typing.Any:
219
+ """
220
+ Get build cargs function by command type.
221
+
222
+ Args:
223
+ t: Command type.
224
+ Returns:
225
+ Build cargs function.
226
+ """
227
+ return {
130
228
  "VariousString_1": tckedit_various_string_1_cargs,
131
229
  "VariousFile_1": tckedit_various_file_1_cargs,
132
- "mask": tckedit_mask_cargs,
230
+ }.get(t)
231
+
232
+
233
+ def tckedit_spec_outputs_dyn_fn_(
234
+ t: str,
235
+ ) -> typing.Any:
236
+ """
237
+ Get build outputs function by command type.
238
+
239
+ Args:
240
+ t: Command type.
241
+ Returns:
242
+ Build outputs function.
243
+ """
244
+ return {
245
+ }.get(t)
246
+
247
+
248
+ def tckedit_spec_cargs_dyn_fn_2(
249
+ t: str,
250
+ ) -> typing.Any:
251
+ """
252
+ Get build cargs function by command type.
253
+
254
+ Args:
255
+ t: Command type.
256
+ Returns:
257
+ Build cargs function.
258
+ """
259
+ return {
133
260
  "VariousString_2": tckedit_various_string_2_cargs,
134
261
  "VariousFile_2": tckedit_various_file_2_cargs,
135
- "config": tckedit_config_cargs,
136
262
  }.get(t)
137
263
 
138
264
 
139
- def dyn_outputs(
265
+ def tckedit_spec_outputs_dyn_fn_2(
140
266
  t: str,
141
267
  ) -> typing.Any:
142
268
  """
@@ -148,13 +274,12 @@ def dyn_outputs(
148
274
  Build outputs function.
149
275
  """
150
276
  return {
151
- "tckedit": tckedit_outputs,
152
277
  }.get(t)
153
278
 
154
279
 
155
280
  def tckedit_various_string_params(
156
281
  obj: str,
157
- ) -> TckeditVariousStringParameters:
282
+ ) -> TckeditVariousStringParametersTagged:
158
283
  """
159
284
  Build parameters.
160
285
 
@@ -164,7 +289,7 @@ def tckedit_various_string_params(
164
289
  Parameter dictionary
165
290
  """
166
291
  params = {
167
- "__STYXTYPE__": "VariousString",
292
+ "@type": "VariousString",
168
293
  "obj": obj,
169
294
  }
170
295
  return params
@@ -184,13 +309,13 @@ def tckedit_various_string_cargs(
184
309
  Command-line arguments.
185
310
  """
186
311
  cargs = []
187
- cargs.append(params.get("obj"))
312
+ cargs.append(params.get("obj", None))
188
313
  return cargs
189
314
 
190
315
 
191
316
  def tckedit_various_file_params(
192
317
  obj: InputPathType,
193
- ) -> TckeditVariousFileParameters:
318
+ ) -> TckeditVariousFileParametersTagged:
194
319
  """
195
320
  Build parameters.
196
321
 
@@ -200,7 +325,7 @@ def tckedit_various_file_params(
200
325
  Parameter dictionary
201
326
  """
202
327
  params = {
203
- "__STYXTYPE__": "VariousFile",
328
+ "@type": "VariousFile",
204
329
  "obj": obj,
205
330
  }
206
331
  return params
@@ -220,13 +345,13 @@ def tckedit_various_file_cargs(
220
345
  Command-line arguments.
221
346
  """
222
347
  cargs = []
223
- cargs.append(execution.input_file(params.get("obj")))
348
+ cargs.append(execution.input_file(params.get("obj", None)))
224
349
  return cargs
225
350
 
226
351
 
227
352
  def tckedit_include_params(
228
- spec: typing.Union[TckeditVariousStringParameters, TckeditVariousFileParameters],
229
- ) -> TckeditIncludeParameters:
353
+ spec: typing.Union[TckeditVariousStringParametersTagged, TckeditVariousFileParametersTagged],
354
+ ) -> TckeditIncludeParametersTagged:
230
355
  """
231
356
  Build parameters.
232
357
 
@@ -238,7 +363,7 @@ def tckedit_include_params(
238
363
  Parameter dictionary
239
364
  """
240
365
  params = {
241
- "__STYXTYPE__": "include",
366
+ "@type": "include",
242
367
  "spec": spec,
243
368
  }
244
369
  return params
@@ -259,13 +384,13 @@ def tckedit_include_cargs(
259
384
  """
260
385
  cargs = []
261
386
  cargs.append("-include")
262
- cargs.extend(dyn_cargs(params.get("spec")["__STYXTYPE__"])(params.get("spec"), execution))
387
+ cargs.extend(tckedit_spec_cargs_dyn_fn(params.get("spec", None)["@type"])(params.get("spec", None), execution))
263
388
  return cargs
264
389
 
265
390
 
266
391
  def tckedit_include_ordered_params(
267
392
  image: str,
268
- ) -> TckeditIncludeOrderedParameters:
393
+ ) -> TckeditIncludeOrderedParametersTagged:
269
394
  """
270
395
  Build parameters.
271
396
 
@@ -278,7 +403,7 @@ def tckedit_include_ordered_params(
278
403
  Parameter dictionary
279
404
  """
280
405
  params = {
281
- "__STYXTYPE__": "include_ordered",
406
+ "@type": "include_ordered",
282
407
  "image": image,
283
408
  }
284
409
  return params
@@ -299,13 +424,13 @@ def tckedit_include_ordered_cargs(
299
424
  """
300
425
  cargs = []
301
426
  cargs.append("-include_ordered")
302
- cargs.append(params.get("image"))
427
+ cargs.append(params.get("image", None))
303
428
  return cargs
304
429
 
305
430
 
306
431
  def tckedit_various_string_1_params(
307
432
  obj: str,
308
- ) -> TckeditVariousString1Parameters:
433
+ ) -> TckeditVariousString1ParametersTagged:
309
434
  """
310
435
  Build parameters.
311
436
 
@@ -315,7 +440,7 @@ def tckedit_various_string_1_params(
315
440
  Parameter dictionary
316
441
  """
317
442
  params = {
318
- "__STYXTYPE__": "VariousString_1",
443
+ "@type": "VariousString_1",
319
444
  "obj": obj,
320
445
  }
321
446
  return params
@@ -335,13 +460,13 @@ def tckedit_various_string_1_cargs(
335
460
  Command-line arguments.
336
461
  """
337
462
  cargs = []
338
- cargs.append(params.get("obj"))
463
+ cargs.append(params.get("obj", None))
339
464
  return cargs
340
465
 
341
466
 
342
467
  def tckedit_various_file_1_params(
343
468
  obj: InputPathType,
344
- ) -> TckeditVariousFile1Parameters:
469
+ ) -> TckeditVariousFile1ParametersTagged:
345
470
  """
346
471
  Build parameters.
347
472
 
@@ -351,7 +476,7 @@ def tckedit_various_file_1_params(
351
476
  Parameter dictionary
352
477
  """
353
478
  params = {
354
- "__STYXTYPE__": "VariousFile_1",
479
+ "@type": "VariousFile_1",
355
480
  "obj": obj,
356
481
  }
357
482
  return params
@@ -371,13 +496,13 @@ def tckedit_various_file_1_cargs(
371
496
  Command-line arguments.
372
497
  """
373
498
  cargs = []
374
- cargs.append(execution.input_file(params.get("obj")))
499
+ cargs.append(execution.input_file(params.get("obj", None)))
375
500
  return cargs
376
501
 
377
502
 
378
503
  def tckedit_exclude_params(
379
- spec: typing.Union[TckeditVariousString1Parameters, TckeditVariousFile1Parameters],
380
- ) -> TckeditExcludeParameters:
504
+ spec: typing.Union[TckeditVariousString1ParametersTagged, TckeditVariousFile1ParametersTagged],
505
+ ) -> TckeditExcludeParametersTagged:
381
506
  """
382
507
  Build parameters.
383
508
 
@@ -389,7 +514,7 @@ def tckedit_exclude_params(
389
514
  Parameter dictionary
390
515
  """
391
516
  params = {
392
- "__STYXTYPE__": "exclude",
517
+ "@type": "exclude",
393
518
  "spec": spec,
394
519
  }
395
520
  return params
@@ -410,13 +535,13 @@ def tckedit_exclude_cargs(
410
535
  """
411
536
  cargs = []
412
537
  cargs.append("-exclude")
413
- cargs.extend(dyn_cargs(params.get("spec")["__STYXTYPE__"])(params.get("spec"), execution))
538
+ cargs.extend(tckedit_spec_cargs_dyn_fn_(params.get("spec", None)["@type"])(params.get("spec", None), execution))
414
539
  return cargs
415
540
 
416
541
 
417
542
  def tckedit_various_string_2_params(
418
543
  obj: str,
419
- ) -> TckeditVariousString2Parameters:
544
+ ) -> TckeditVariousString2ParametersTagged:
420
545
  """
421
546
  Build parameters.
422
547
 
@@ -426,7 +551,7 @@ def tckedit_various_string_2_params(
426
551
  Parameter dictionary
427
552
  """
428
553
  params = {
429
- "__STYXTYPE__": "VariousString_2",
554
+ "@type": "VariousString_2",
430
555
  "obj": obj,
431
556
  }
432
557
  return params
@@ -446,13 +571,13 @@ def tckedit_various_string_2_cargs(
446
571
  Command-line arguments.
447
572
  """
448
573
  cargs = []
449
- cargs.append(params.get("obj"))
574
+ cargs.append(params.get("obj", None))
450
575
  return cargs
451
576
 
452
577
 
453
578
  def tckedit_various_file_2_params(
454
579
  obj: InputPathType,
455
- ) -> TckeditVariousFile2Parameters:
580
+ ) -> TckeditVariousFile2ParametersTagged:
456
581
  """
457
582
  Build parameters.
458
583
 
@@ -462,7 +587,7 @@ def tckedit_various_file_2_params(
462
587
  Parameter dictionary
463
588
  """
464
589
  params = {
465
- "__STYXTYPE__": "VariousFile_2",
590
+ "@type": "VariousFile_2",
466
591
  "obj": obj,
467
592
  }
468
593
  return params
@@ -482,13 +607,13 @@ def tckedit_various_file_2_cargs(
482
607
  Command-line arguments.
483
608
  """
484
609
  cargs = []
485
- cargs.append(execution.input_file(params.get("obj")))
610
+ cargs.append(execution.input_file(params.get("obj", None)))
486
611
  return cargs
487
612
 
488
613
 
489
614
  def tckedit_mask_params(
490
- spec: typing.Union[TckeditVariousString2Parameters, TckeditVariousFile2Parameters],
491
- ) -> TckeditMaskParameters:
615
+ spec: typing.Union[TckeditVariousString2ParametersTagged, TckeditVariousFile2ParametersTagged],
616
+ ) -> TckeditMaskParametersTagged:
492
617
  """
493
618
  Build parameters.
494
619
 
@@ -500,7 +625,7 @@ def tckedit_mask_params(
500
625
  Parameter dictionary
501
626
  """
502
627
  params = {
503
- "__STYXTYPE__": "mask",
628
+ "@type": "mask",
504
629
  "spec": spec,
505
630
  }
506
631
  return params
@@ -521,14 +646,14 @@ def tckedit_mask_cargs(
521
646
  """
522
647
  cargs = []
523
648
  cargs.append("-mask")
524
- cargs.extend(dyn_cargs(params.get("spec")["__STYXTYPE__"])(params.get("spec"), execution))
649
+ cargs.extend(tckedit_spec_cargs_dyn_fn_2(params.get("spec", None)["@type"])(params.get("spec", None), execution))
525
650
  return cargs
526
651
 
527
652
 
528
653
  def tckedit_config_params(
529
654
  key: str,
530
655
  value: str,
531
- ) -> TckeditConfigParameters:
656
+ ) -> TckeditConfigParametersTagged:
532
657
  """
533
658
  Build parameters.
534
659
 
@@ -539,7 +664,7 @@ def tckedit_config_params(
539
664
  Parameter dictionary
540
665
  """
541
666
  params = {
542
- "__STYXTYPE__": "config",
667
+ "@type": "config",
543
668
  "key": key,
544
669
  "value": value,
545
670
  }
@@ -561,14 +686,14 @@ def tckedit_config_cargs(
561
686
  """
562
687
  cargs = []
563
688
  cargs.append("-config")
564
- cargs.append(params.get("key"))
565
- cargs.append(params.get("value"))
689
+ cargs.append(params.get("key", None))
690
+ cargs.append(params.get("value", None))
566
691
  return cargs
567
692
 
568
693
 
569
694
  class TckeditOutputs(typing.NamedTuple):
570
695
  """
571
- Output object returned when calling `tckedit(...)`.
696
+ Output object returned when calling `TckeditParameters(...)`.
572
697
  """
573
698
  root: OutputPathType
574
699
  """Output root folder. This is the root folder for all outputs."""
@@ -604,7 +729,7 @@ def tckedit_params(
604
729
  config: list[TckeditConfigParameters] | None = None,
605
730
  help_: bool = False,
606
731
  version: bool = False,
607
- ) -> TckeditParameters:
732
+ ) -> TckeditParametersTagged:
608
733
  """
609
734
  Build parameters.
610
735
 
@@ -660,7 +785,7 @@ def tckedit_params(
660
785
  Parameter dictionary
661
786
  """
662
787
  params = {
663
- "__STYXTYPE__": "tckedit",
788
+ "@type": "mrtrix/tckedit",
664
789
  "inverse": inverse,
665
790
  "ends_only": ends_only,
666
791
  "info": info,
@@ -718,79 +843,79 @@ def tckedit_cargs(
718
843
  """
719
844
  cargs = []
720
845
  cargs.append("tckedit")
721
- if params.get("include") is not None:
722
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("include")] for a in c])
723
- if params.get("include_ordered") is not None:
724
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("include_ordered")] for a in c])
725
- if params.get("exclude") is not None:
726
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("exclude")] for a in c])
727
- if params.get("mask") is not None:
728
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("mask")] for a in c])
729
- if params.get("maxlength") is not None:
846
+ if params.get("include", None) is not None:
847
+ cargs.extend([a for c in [tckedit_include_cargs(s, execution) for s in params.get("include", None)] for a in c])
848
+ if params.get("include_ordered", None) is not None:
849
+ cargs.extend([a for c in [tckedit_include_ordered_cargs(s, execution) for s in params.get("include_ordered", None)] for a in c])
850
+ if params.get("exclude", None) is not None:
851
+ cargs.extend([a for c in [tckedit_exclude_cargs(s, execution) for s in params.get("exclude", None)] for a in c])
852
+ if params.get("mask", None) is not None:
853
+ cargs.extend([a for c in [tckedit_mask_cargs(s, execution) for s in params.get("mask", None)] for a in c])
854
+ if params.get("maxlength", None) is not None:
730
855
  cargs.extend([
731
856
  "-maxlength",
732
- str(params.get("maxlength"))
857
+ str(params.get("maxlength", None))
733
858
  ])
734
- if params.get("minlength") is not None:
859
+ if params.get("minlength", None) is not None:
735
860
  cargs.extend([
736
861
  "-minlength",
737
- str(params.get("minlength"))
862
+ str(params.get("minlength", None))
738
863
  ])
739
- if params.get("number") is not None:
864
+ if params.get("number", None) is not None:
740
865
  cargs.extend([
741
866
  "-number",
742
- str(params.get("number"))
867
+ str(params.get("number", None))
743
868
  ])
744
- if params.get("skip") is not None:
869
+ if params.get("skip", None) is not None:
745
870
  cargs.extend([
746
871
  "-skip",
747
- str(params.get("skip"))
872
+ str(params.get("skip", None))
748
873
  ])
749
- if params.get("maxweight") is not None:
874
+ if params.get("maxweight", None) is not None:
750
875
  cargs.extend([
751
876
  "-maxweight",
752
- str(params.get("maxweight"))
877
+ str(params.get("maxweight", None))
753
878
  ])
754
- if params.get("minweight") is not None:
879
+ if params.get("minweight", None) is not None:
755
880
  cargs.extend([
756
881
  "-minweight",
757
- str(params.get("minweight"))
882
+ str(params.get("minweight", None))
758
883
  ])
759
- if params.get("inverse"):
884
+ if params.get("inverse", False):
760
885
  cargs.append("-inverse")
761
- if params.get("ends_only"):
886
+ if params.get("ends_only", False):
762
887
  cargs.append("-ends_only")
763
- if params.get("tck_weights_in") is not None:
888
+ if params.get("tck_weights_in", None) is not None:
764
889
  cargs.extend([
765
890
  "-tck_weights_in",
766
- execution.input_file(params.get("tck_weights_in"))
891
+ execution.input_file(params.get("tck_weights_in", None))
767
892
  ])
768
- if params.get("tck_weights_out") is not None:
893
+ if params.get("tck_weights_out", None) is not None:
769
894
  cargs.extend([
770
895
  "-tck_weights_out",
771
- params.get("tck_weights_out")
896
+ params.get("tck_weights_out", None)
772
897
  ])
773
- if params.get("info"):
898
+ if params.get("info", False):
774
899
  cargs.append("-info")
775
- if params.get("quiet"):
900
+ if params.get("quiet", False):
776
901
  cargs.append("-quiet")
777
- if params.get("debug"):
902
+ if params.get("debug", False):
778
903
  cargs.append("-debug")
779
- if params.get("force"):
904
+ if params.get("force", False):
780
905
  cargs.append("-force")
781
- if params.get("nthreads") is not None:
906
+ if params.get("nthreads", None) is not None:
782
907
  cargs.extend([
783
908
  "-nthreads",
784
- str(params.get("nthreads"))
909
+ str(params.get("nthreads", None))
785
910
  ])
786
- if params.get("config") is not None:
787
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
788
- if params.get("help"):
911
+ if params.get("config", None) is not None:
912
+ cargs.extend([a for c in [tckedit_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
913
+ if params.get("help", False):
789
914
  cargs.append("-help")
790
- if params.get("version"):
915
+ if params.get("version", False):
791
916
  cargs.append("-version")
792
- cargs.extend([execution.input_file(f) for f in params.get("tracks_in")])
793
- cargs.append(params.get("tracks_out"))
917
+ cargs.extend([execution.input_file(f) for f in params.get("tracks_in", None)])
918
+ cargs.append(params.get("tracks_out", None))
794
919
  return cargs
795
920
 
796
921
 
@@ -809,17 +934,19 @@ def tckedit_outputs(
809
934
  """
810
935
  ret = TckeditOutputs(
811
936
  root=execution.output_file("."),
812
- tracks_out=execution.output_file(params.get("tracks_out")),
813
- tck_weights_out=execution.output_file(params.get("tck_weights_out")) if (params.get("tck_weights_out") is not None) else None,
937
+ tracks_out=execution.output_file(params.get("tracks_out", None)),
938
+ tck_weights_out=execution.output_file(params.get("tck_weights_out", None)) if (params.get("tck_weights_out") is not None) else None,
814
939
  )
815
940
  return ret
816
941
 
817
942
 
818
943
  def tckedit_execute(
819
944
  params: TckeditParameters,
820
- execution: Execution,
945
+ runner: Runner | None = None,
821
946
  ) -> TckeditOutputs:
822
947
  """
948
+ tckedit
949
+
823
950
  Perform various editing operations on track files.
824
951
 
825
952
  This command can be used to perform various types of manipulations on track
@@ -836,10 +963,12 @@ def tckedit_execute(
836
963
 
837
964
  Args:
838
965
  params: The parameters.
839
- execution: The execution object.
966
+ runner: Command runner.
840
967
  Returns:
841
968
  NamedTuple of outputs (described in `TckeditOutputs`).
842
969
  """
970
+ runner = runner or get_global_runner()
971
+ execution = runner.start_execution(TCKEDIT_METADATA)
843
972
  params = execution.params(params)
844
973
  cargs = tckedit_cargs(params, execution)
845
974
  ret = tckedit_outputs(params, execution)
@@ -875,6 +1004,8 @@ def tckedit(
875
1004
  runner: Runner | None = None,
876
1005
  ) -> TckeditOutputs:
877
1006
  """
1007
+ tckedit
1008
+
878
1009
  Perform various editing operations on track files.
879
1010
 
880
1011
  This command can be used to perform various types of manipulations on track
@@ -941,8 +1072,6 @@ def tckedit(
941
1072
  Returns:
942
1073
  NamedTuple of outputs (described in `TckeditOutputs`).
943
1074
  """
944
- runner = runner or get_global_runner()
945
- execution = runner.start_execution(TCKEDIT_METADATA)
946
1075
  params = tckedit_params(
947
1076
  include=include,
948
1077
  include_ordered=include_ordered,
@@ -969,27 +1098,16 @@ def tckedit(
969
1098
  tracks_in=tracks_in,
970
1099
  tracks_out=tracks_out,
971
1100
  )
972
- return tckedit_execute(params, execution)
1101
+ return tckedit_execute(params, runner)
973
1102
 
974
1103
 
975
1104
  __all__ = [
976
1105
  "TCKEDIT_METADATA",
977
- "TckeditConfigParameters",
978
- "TckeditExcludeParameters",
979
- "TckeditIncludeOrderedParameters",
980
- "TckeditIncludeParameters",
981
- "TckeditMaskParameters",
982
1106
  "TckeditOutputs",
983
- "TckeditParameters",
984
- "TckeditVariousFile1Parameters",
985
- "TckeditVariousFile2Parameters",
986
- "TckeditVariousFileParameters",
987
- "TckeditVariousString1Parameters",
988
- "TckeditVariousString2Parameters",
989
- "TckeditVariousStringParameters",
990
1107
  "tckedit",
991
1108
  "tckedit_config_params",
992
1109
  "tckedit_exclude_params",
1110
+ "tckedit_execute",
993
1111
  "tckedit_include_ordered_params",
994
1112
  "tckedit_include_params",
995
1113
  "tckedit_mask_params",