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
  MASKFILTER_METADATA = Metadata(
9
- id="d840afad55e7b22d2468db1a39492bd06fd9a30d.boutiques",
9
+ id="b76a6dd73084b9b3914644ade090d2c6bf379b1d.boutiques",
10
10
  name="maskfilter",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,33 +14,67 @@ MASKFILTER_METADATA = Metadata(
14
14
 
15
15
 
16
16
  MaskfilterVariousStringParameters = typing.TypedDict('MaskfilterVariousStringParameters', {
17
- "__STYXTYPE__": typing.Literal["VariousString"],
17
+ "@type": typing.NotRequired[typing.Literal["VariousString"]],
18
+ "obj": str,
19
+ })
20
+ MaskfilterVariousStringParametersTagged = typing.TypedDict('MaskfilterVariousStringParametersTagged', {
21
+ "@type": typing.Literal["VariousString"],
18
22
  "obj": str,
19
23
  })
20
24
 
21
25
 
22
26
  MaskfilterVariousFileParameters = typing.TypedDict('MaskfilterVariousFileParameters', {
23
- "__STYXTYPE__": typing.Literal["VariousFile"],
27
+ "@type": typing.NotRequired[typing.Literal["VariousFile"]],
28
+ "obj": InputPathType,
29
+ })
30
+ MaskfilterVariousFileParametersTagged = typing.TypedDict('MaskfilterVariousFileParametersTagged', {
31
+ "@type": typing.Literal["VariousFile"],
24
32
  "obj": InputPathType,
25
33
  })
26
34
 
27
35
 
28
36
  MaskfilterConfigParameters = typing.TypedDict('MaskfilterConfigParameters', {
29
- "__STYXTYPE__": typing.Literal["config"],
37
+ "@type": typing.NotRequired[typing.Literal["config"]],
38
+ "key": str,
39
+ "value": str,
40
+ })
41
+ MaskfilterConfigParametersTagged = typing.TypedDict('MaskfilterConfigParametersTagged', {
42
+ "@type": typing.Literal["config"],
30
43
  "key": str,
31
44
  "value": str,
32
45
  })
33
46
 
34
47
 
35
48
  MaskfilterParameters = typing.TypedDict('MaskfilterParameters', {
36
- "__STYXTYPE__": typing.Literal["maskfilter"],
49
+ "@type": typing.NotRequired[typing.Literal["mrtrix/maskfilter"]],
50
+ "scale": typing.NotRequired[int | None],
51
+ "axes": typing.NotRequired[list[int] | None],
52
+ "largest": bool,
53
+ "connectivity": bool,
54
+ "npass": typing.NotRequired[int | None],
55
+ "extent": typing.NotRequired[list[int] | None],
56
+ "strides": typing.NotRequired[typing.Union[MaskfilterVariousStringParametersTagged, MaskfilterVariousFileParametersTagged] | None],
57
+ "info": bool,
58
+ "quiet": bool,
59
+ "debug": bool,
60
+ "force": bool,
61
+ "nthreads": typing.NotRequired[int | None],
62
+ "config": typing.NotRequired[list[MaskfilterConfigParameters] | None],
63
+ "help": bool,
64
+ "version": bool,
65
+ "input": InputPathType,
66
+ "filter": str,
67
+ "output": str,
68
+ })
69
+ MaskfilterParametersTagged = typing.TypedDict('MaskfilterParametersTagged', {
70
+ "@type": typing.Literal["mrtrix/maskfilter"],
37
71
  "scale": typing.NotRequired[int | None],
38
72
  "axes": typing.NotRequired[list[int] | None],
39
73
  "largest": bool,
40
74
  "connectivity": bool,
41
75
  "npass": typing.NotRequired[int | None],
42
76
  "extent": typing.NotRequired[list[int] | None],
43
- "strides": typing.NotRequired[typing.Union[MaskfilterVariousStringParameters, MaskfilterVariousFileParameters] | None],
77
+ "strides": typing.NotRequired[typing.Union[MaskfilterVariousStringParametersTagged, MaskfilterVariousFileParametersTagged] | None],
44
78
  "info": bool,
45
79
  "quiet": bool,
46
80
  "debug": bool,
@@ -55,7 +89,7 @@ MaskfilterParameters = typing.TypedDict('MaskfilterParameters', {
55
89
  })
56
90
 
57
91
 
58
- def dyn_cargs(
92
+ def maskfilter_strides_cargs_dyn_fn(
59
93
  t: str,
60
94
  ) -> typing.Any:
61
95
  """
@@ -67,14 +101,12 @@ def dyn_cargs(
67
101
  Build cargs function.
68
102
  """
69
103
  return {
70
- "maskfilter": maskfilter_cargs,
71
104
  "VariousString": maskfilter_various_string_cargs,
72
105
  "VariousFile": maskfilter_various_file_cargs,
73
- "config": maskfilter_config_cargs,
74
106
  }.get(t)
75
107
 
76
108
 
77
- def dyn_outputs(
109
+ def maskfilter_strides_outputs_dyn_fn(
78
110
  t: str,
79
111
  ) -> typing.Any:
80
112
  """
@@ -86,13 +118,12 @@ def dyn_outputs(
86
118
  Build outputs function.
87
119
  """
88
120
  return {
89
- "maskfilter": maskfilter_outputs,
90
121
  }.get(t)
91
122
 
92
123
 
93
124
  def maskfilter_various_string_params(
94
125
  obj: str,
95
- ) -> MaskfilterVariousStringParameters:
126
+ ) -> MaskfilterVariousStringParametersTagged:
96
127
  """
97
128
  Build parameters.
98
129
 
@@ -102,7 +133,7 @@ def maskfilter_various_string_params(
102
133
  Parameter dictionary
103
134
  """
104
135
  params = {
105
- "__STYXTYPE__": "VariousString",
136
+ "@type": "VariousString",
106
137
  "obj": obj,
107
138
  }
108
139
  return params
@@ -122,13 +153,13 @@ def maskfilter_various_string_cargs(
122
153
  Command-line arguments.
123
154
  """
124
155
  cargs = []
125
- cargs.append(params.get("obj"))
156
+ cargs.append(params.get("obj", None))
126
157
  return cargs
127
158
 
128
159
 
129
160
  def maskfilter_various_file_params(
130
161
  obj: InputPathType,
131
- ) -> MaskfilterVariousFileParameters:
162
+ ) -> MaskfilterVariousFileParametersTagged:
132
163
  """
133
164
  Build parameters.
134
165
 
@@ -138,7 +169,7 @@ def maskfilter_various_file_params(
138
169
  Parameter dictionary
139
170
  """
140
171
  params = {
141
- "__STYXTYPE__": "VariousFile",
172
+ "@type": "VariousFile",
142
173
  "obj": obj,
143
174
  }
144
175
  return params
@@ -158,14 +189,14 @@ def maskfilter_various_file_cargs(
158
189
  Command-line arguments.
159
190
  """
160
191
  cargs = []
161
- cargs.append(execution.input_file(params.get("obj")))
192
+ cargs.append(execution.input_file(params.get("obj", None)))
162
193
  return cargs
163
194
 
164
195
 
165
196
  def maskfilter_config_params(
166
197
  key: str,
167
198
  value: str,
168
- ) -> MaskfilterConfigParameters:
199
+ ) -> MaskfilterConfigParametersTagged:
169
200
  """
170
201
  Build parameters.
171
202
 
@@ -176,7 +207,7 @@ def maskfilter_config_params(
176
207
  Parameter dictionary
177
208
  """
178
209
  params = {
179
- "__STYXTYPE__": "config",
210
+ "@type": "config",
180
211
  "key": key,
181
212
  "value": value,
182
213
  }
@@ -198,14 +229,14 @@ def maskfilter_config_cargs(
198
229
  """
199
230
  cargs = []
200
231
  cargs.append("-config")
201
- cargs.append(params.get("key"))
202
- cargs.append(params.get("value"))
232
+ cargs.append(params.get("key", None))
233
+ cargs.append(params.get("value", None))
203
234
  return cargs
204
235
 
205
236
 
206
237
  class MaskfilterOutputs(typing.NamedTuple):
207
238
  """
208
- Output object returned when calling `maskfilter(...)`.
239
+ Output object returned when calling `MaskfilterParameters(...)`.
209
240
  """
210
241
  root: OutputPathType
211
242
  """Output root folder. This is the root folder for all outputs."""
@@ -223,7 +254,7 @@ def maskfilter_params(
223
254
  connectivity: bool = False,
224
255
  npass: int | None = None,
225
256
  extent: list[int] | None = None,
226
- strides: typing.Union[MaskfilterVariousStringParameters, MaskfilterVariousFileParameters] | None = None,
257
+ strides: typing.Union[MaskfilterVariousStringParametersTagged, MaskfilterVariousFileParametersTagged] | None = None,
227
258
  info: bool = False,
228
259
  quiet: bool = False,
229
260
  debug: bool = False,
@@ -232,7 +263,7 @@ def maskfilter_params(
232
263
  config: list[MaskfilterConfigParameters] | None = None,
233
264
  help_: bool = False,
234
265
  version: bool = False,
235
- ) -> MaskfilterParameters:
266
+ ) -> MaskfilterParametersTagged:
236
267
  """
237
268
  Build parameters.
238
269
 
@@ -273,7 +304,7 @@ def maskfilter_params(
273
304
  Parameter dictionary
274
305
  """
275
306
  params = {
276
- "__STYXTYPE__": "maskfilter",
307
+ "@type": "mrtrix/maskfilter",
277
308
  "largest": largest,
278
309
  "connectivity": connectivity,
279
310
  "info": info,
@@ -318,57 +349,57 @@ def maskfilter_cargs(
318
349
  """
319
350
  cargs = []
320
351
  cargs.append("maskfilter")
321
- if params.get("scale") is not None:
352
+ if params.get("scale", None) is not None:
322
353
  cargs.extend([
323
354
  "-scale",
324
- str(params.get("scale"))
355
+ str(params.get("scale", None))
325
356
  ])
326
- if params.get("axes") is not None:
357
+ if params.get("axes", None) is not None:
327
358
  cargs.extend([
328
359
  "-axes",
329
- ",".join(map(str, params.get("axes")))
360
+ ",".join(map(str, params.get("axes", None)))
330
361
  ])
331
- if params.get("largest"):
362
+ if params.get("largest", False):
332
363
  cargs.append("-largest")
333
- if params.get("connectivity"):
364
+ if params.get("connectivity", False):
334
365
  cargs.append("-connectivity")
335
- if params.get("npass") is not None:
366
+ if params.get("npass", None) is not None:
336
367
  cargs.extend([
337
368
  "-npass",
338
- str(params.get("npass"))
369
+ str(params.get("npass", None))
339
370
  ])
340
- if params.get("extent") is not None:
371
+ if params.get("extent", None) is not None:
341
372
  cargs.extend([
342
373
  "-extent",
343
- ",".join(map(str, params.get("extent")))
374
+ ",".join(map(str, params.get("extent", None)))
344
375
  ])
345
- if params.get("strides") is not None:
376
+ if params.get("strides", None) is not None:
346
377
  cargs.extend([
347
378
  "-strides",
348
- *dyn_cargs(params.get("strides")["__STYXTYPE__"])(params.get("strides"), execution)
379
+ *maskfilter_strides_cargs_dyn_fn(params.get("strides", None)["@type"])(params.get("strides", None), execution)
349
380
  ])
350
- if params.get("info"):
381
+ if params.get("info", False):
351
382
  cargs.append("-info")
352
- if params.get("quiet"):
383
+ if params.get("quiet", False):
353
384
  cargs.append("-quiet")
354
- if params.get("debug"):
385
+ if params.get("debug", False):
355
386
  cargs.append("-debug")
356
- if params.get("force"):
387
+ if params.get("force", False):
357
388
  cargs.append("-force")
358
- if params.get("nthreads") is not None:
389
+ if params.get("nthreads", None) is not None:
359
390
  cargs.extend([
360
391
  "-nthreads",
361
- str(params.get("nthreads"))
392
+ str(params.get("nthreads", None))
362
393
  ])
363
- if params.get("config") is not None:
364
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
365
- if params.get("help"):
394
+ if params.get("config", None) is not None:
395
+ cargs.extend([a for c in [maskfilter_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
396
+ if params.get("help", False):
366
397
  cargs.append("-help")
367
- if params.get("version"):
398
+ if params.get("version", False):
368
399
  cargs.append("-version")
369
- cargs.append(execution.input_file(params.get("input")))
370
- cargs.append(params.get("filter"))
371
- cargs.append(params.get("output"))
400
+ cargs.append(execution.input_file(params.get("input", None)))
401
+ cargs.append(params.get("filter", None))
402
+ cargs.append(params.get("output", None))
372
403
  return cargs
373
404
 
374
405
 
@@ -387,16 +418,18 @@ def maskfilter_outputs(
387
418
  """
388
419
  ret = MaskfilterOutputs(
389
420
  root=execution.output_file("."),
390
- output=execution.output_file(params.get("output")),
421
+ output=execution.output_file(params.get("output", None)),
391
422
  )
392
423
  return ret
393
424
 
394
425
 
395
426
  def maskfilter_execute(
396
427
  params: MaskfilterParameters,
397
- execution: Execution,
428
+ runner: Runner | None = None,
398
429
  ) -> MaskfilterOutputs:
399
430
  """
431
+ maskfilter
432
+
400
433
  Perform filtering operations on 3D / 4D mask images.
401
434
 
402
435
  The available filters are: clean, connect, dilate, erode, median.
@@ -413,10 +446,12 @@ def maskfilter_execute(
413
446
 
414
447
  Args:
415
448
  params: The parameters.
416
- execution: The execution object.
449
+ runner: Command runner.
417
450
  Returns:
418
451
  NamedTuple of outputs (described in `MaskfilterOutputs`).
419
452
  """
453
+ runner = runner or get_global_runner()
454
+ execution = runner.start_execution(MASKFILTER_METADATA)
420
455
  params = execution.params(params)
421
456
  cargs = maskfilter_cargs(params, execution)
422
457
  ret = maskfilter_outputs(params, execution)
@@ -434,7 +469,7 @@ def maskfilter(
434
469
  connectivity: bool = False,
435
470
  npass: int | None = None,
436
471
  extent: list[int] | None = None,
437
- strides: typing.Union[MaskfilterVariousStringParameters, MaskfilterVariousFileParameters] | None = None,
472
+ strides: typing.Union[MaskfilterVariousStringParametersTagged, MaskfilterVariousFileParametersTagged] | None = None,
438
473
  info: bool = False,
439
474
  quiet: bool = False,
440
475
  debug: bool = False,
@@ -446,6 +481,8 @@ def maskfilter(
446
481
  runner: Runner | None = None,
447
482
  ) -> MaskfilterOutputs:
448
483
  """
484
+ maskfilter
485
+
449
486
  Perform filtering operations on 3D / 4D mask images.
450
487
 
451
488
  The available filters are: clean, connect, dilate, erode, median.
@@ -497,8 +534,6 @@ def maskfilter(
497
534
  Returns:
498
535
  NamedTuple of outputs (described in `MaskfilterOutputs`).
499
536
  """
500
- runner = runner or get_global_runner()
501
- execution = runner.start_execution(MASKFILTER_METADATA)
502
537
  params = maskfilter_params(
503
538
  scale=scale,
504
539
  axes=axes,
@@ -519,18 +554,15 @@ def maskfilter(
519
554
  filter_=filter_,
520
555
  output=output,
521
556
  )
522
- return maskfilter_execute(params, execution)
557
+ return maskfilter_execute(params, runner)
523
558
 
524
559
 
525
560
  __all__ = [
526
561
  "MASKFILTER_METADATA",
527
- "MaskfilterConfigParameters",
528
562
  "MaskfilterOutputs",
529
- "MaskfilterParameters",
530
- "MaskfilterVariousFileParameters",
531
- "MaskfilterVariousStringParameters",
532
563
  "maskfilter",
533
564
  "maskfilter_config_params",
565
+ "maskfilter_execute",
534
566
  "maskfilter_params",
535
567
  "maskfilter_various_file_params",
536
568
  "maskfilter_various_string_params",
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MESH2VOXEL_METADATA = Metadata(
9
- id="121d27a04e5be0003ec7fd7a1de2dfc3d8768d28.boutiques",
9
+ id="75e8f4f5578fd6f6ca18cc54925c6087e0adc3bc.boutiques",
10
10
  name="mesh2voxel",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,33 @@ MESH2VOXEL_METADATA = Metadata(
14
14
 
15
15
 
16
16
  Mesh2voxelConfigParameters = typing.TypedDict('Mesh2voxelConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ Mesh2voxelConfigParametersTagged = typing.TypedDict('Mesh2voxelConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  Mesh2voxelParameters = typing.TypedDict('Mesh2voxelParameters', {
24
- "__STYXTYPE__": typing.Literal["mesh2voxel"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/mesh2voxel"]],
30
+ "info": bool,
31
+ "quiet": bool,
32
+ "debug": bool,
33
+ "force": bool,
34
+ "nthreads": typing.NotRequired[int | None],
35
+ "config": typing.NotRequired[list[Mesh2voxelConfigParameters] | None],
36
+ "help": bool,
37
+ "version": bool,
38
+ "source": InputPathType,
39
+ "template": InputPathType,
40
+ "output": str,
41
+ })
42
+ Mesh2voxelParametersTagged = typing.TypedDict('Mesh2voxelParametersTagged', {
43
+ "@type": typing.Literal["mrtrix/mesh2voxel"],
25
44
  "info": bool,
26
45
  "quiet": bool,
27
46
  "debug": bool,
@@ -34,45 +53,12 @@ Mesh2voxelParameters = typing.TypedDict('Mesh2voxelParameters', {
34
53
  "template": InputPathType,
35
54
  "output": str,
36
55
  })
37
-
38
-
39
- def dyn_cargs(
40
- t: str,
41
- ) -> typing.Any:
42
- """
43
- Get build cargs function by command type.
44
-
45
- Args:
46
- t: Command type.
47
- Returns:
48
- Build cargs function.
49
- """
50
- return {
51
- "mesh2voxel": mesh2voxel_cargs,
52
- "config": mesh2voxel_config_cargs,
53
- }.get(t)
54
-
55
-
56
- def dyn_outputs(
57
- t: str,
58
- ) -> typing.Any:
59
- """
60
- Get build outputs function by command type.
61
-
62
- Args:
63
- t: Command type.
64
- Returns:
65
- Build outputs function.
66
- """
67
- return {
68
- "mesh2voxel": mesh2voxel_outputs,
69
- }.get(t)
70
56
 
71
57
 
72
58
  def mesh2voxel_config_params(
73
59
  key: str,
74
60
  value: str,
75
- ) -> Mesh2voxelConfigParameters:
61
+ ) -> Mesh2voxelConfigParametersTagged:
76
62
  """
77
63
  Build parameters.
78
64
 
@@ -83,7 +69,7 @@ def mesh2voxel_config_params(
83
69
  Parameter dictionary
84
70
  """
85
71
  params = {
86
- "__STYXTYPE__": "config",
72
+ "@type": "config",
87
73
  "key": key,
88
74
  "value": value,
89
75
  }
@@ -105,14 +91,14 @@ def mesh2voxel_config_cargs(
105
91
  """
106
92
  cargs = []
107
93
  cargs.append("-config")
108
- cargs.append(params.get("key"))
109
- cargs.append(params.get("value"))
94
+ cargs.append(params.get("key", None))
95
+ cargs.append(params.get("value", None))
110
96
  return cargs
111
97
 
112
98
 
113
99
  class Mesh2voxelOutputs(typing.NamedTuple):
114
100
  """
115
- Output object returned when calling `mesh2voxel(...)`.
101
+ Output object returned when calling `Mesh2voxelParameters(...)`.
116
102
  """
117
103
  root: OutputPathType
118
104
  """Output root folder. This is the root folder for all outputs."""
@@ -132,7 +118,7 @@ def mesh2voxel_params(
132
118
  config: list[Mesh2voxelConfigParameters] | None = None,
133
119
  help_: bool = False,
134
120
  version: bool = False,
135
- ) -> Mesh2voxelParameters:
121
+ ) -> Mesh2voxelParametersTagged:
136
122
  """
137
123
  Build parameters.
138
124
 
@@ -157,7 +143,7 @@ def mesh2voxel_params(
157
143
  Parameter dictionary
158
144
  """
159
145
  params = {
160
- "__STYXTYPE__": "mesh2voxel",
146
+ "@type": "mrtrix/mesh2voxel",
161
147
  "info": info,
162
148
  "quiet": quiet,
163
149
  "debug": debug,
@@ -190,28 +176,28 @@ def mesh2voxel_cargs(
190
176
  """
191
177
  cargs = []
192
178
  cargs.append("mesh2voxel")
193
- if params.get("info"):
179
+ if params.get("info", False):
194
180
  cargs.append("-info")
195
- if params.get("quiet"):
181
+ if params.get("quiet", False):
196
182
  cargs.append("-quiet")
197
- if params.get("debug"):
183
+ if params.get("debug", False):
198
184
  cargs.append("-debug")
199
- if params.get("force"):
185
+ if params.get("force", False):
200
186
  cargs.append("-force")
201
- if params.get("nthreads") is not None:
187
+ if params.get("nthreads", None) is not None:
202
188
  cargs.extend([
203
189
  "-nthreads",
204
- str(params.get("nthreads"))
190
+ str(params.get("nthreads", None))
205
191
  ])
206
- if params.get("config") is not None:
207
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
208
- if params.get("help"):
192
+ if params.get("config", None) is not None:
193
+ cargs.extend([a for c in [mesh2voxel_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
194
+ if params.get("help", False):
209
195
  cargs.append("-help")
210
- if params.get("version"):
196
+ if params.get("version", False):
211
197
  cargs.append("-version")
212
- cargs.append(execution.input_file(params.get("source")))
213
- cargs.append(execution.input_file(params.get("template")))
214
- cargs.append(params.get("output"))
198
+ cargs.append(execution.input_file(params.get("source", None)))
199
+ cargs.append(execution.input_file(params.get("template", None)))
200
+ cargs.append(params.get("output", None))
215
201
  return cargs
216
202
 
217
203
 
@@ -230,16 +216,18 @@ def mesh2voxel_outputs(
230
216
  """
231
217
  ret = Mesh2voxelOutputs(
232
218
  root=execution.output_file("."),
233
- output=execution.output_file(params.get("output")),
219
+ output=execution.output_file(params.get("output", None)),
234
220
  )
235
221
  return ret
236
222
 
237
223
 
238
224
  def mesh2voxel_execute(
239
225
  params: Mesh2voxelParameters,
240
- execution: Execution,
226
+ runner: Runner | None = None,
241
227
  ) -> Mesh2voxelOutputs:
242
228
  """
229
+ mesh2voxel
230
+
243
231
  Convert a mesh surface to a partial volume estimation image.
244
232
 
245
233
 
@@ -257,10 +245,12 @@ def mesh2voxel_execute(
257
245
 
258
246
  Args:
259
247
  params: The parameters.
260
- execution: The execution object.
248
+ runner: Command runner.
261
249
  Returns:
262
250
  NamedTuple of outputs (described in `Mesh2voxelOutputs`).
263
251
  """
252
+ runner = runner or get_global_runner()
253
+ execution = runner.start_execution(MESH2VOXEL_METADATA)
264
254
  params = execution.params(params)
265
255
  cargs = mesh2voxel_cargs(params, execution)
266
256
  ret = mesh2voxel_outputs(params, execution)
@@ -283,6 +273,8 @@ def mesh2voxel(
283
273
  runner: Runner | None = None,
284
274
  ) -> Mesh2voxelOutputs:
285
275
  """
276
+ mesh2voxel
277
+
286
278
  Convert a mesh surface to a partial volume estimation image.
287
279
 
288
280
 
@@ -319,8 +311,6 @@ def mesh2voxel(
319
311
  Returns:
320
312
  NamedTuple of outputs (described in `Mesh2voxelOutputs`).
321
313
  """
322
- runner = runner or get_global_runner()
323
- execution = runner.start_execution(MESH2VOXEL_METADATA)
324
314
  params = mesh2voxel_params(
325
315
  info=info,
326
316
  quiet=quiet,
@@ -334,15 +324,14 @@ def mesh2voxel(
334
324
  template=template,
335
325
  output=output,
336
326
  )
337
- return mesh2voxel_execute(params, execution)
327
+ return mesh2voxel_execute(params, runner)
338
328
 
339
329
 
340
330
  __all__ = [
341
331
  "MESH2VOXEL_METADATA",
342
- "Mesh2voxelConfigParameters",
343
332
  "Mesh2voxelOutputs",
344
- "Mesh2voxelParameters",
345
333
  "mesh2voxel",
346
334
  "mesh2voxel_config_params",
335
+ "mesh2voxel_execute",
347
336
  "mesh2voxel_params",
348
337
  ]