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
  MRDEGIBBS_METADATA = Metadata(
9
- id="1e8895a9bf3df6beb54e386b789aaa61dbdf2143.boutiques",
9
+ id="832d935b5fa8fdff97b78ecd355cb0d26be8033a.boutiques",
10
10
  name="mrdegibbs",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,37 @@ MRDEGIBBS_METADATA = Metadata(
14
14
 
15
15
 
16
16
  MrdegibbsConfigParameters = typing.TypedDict('MrdegibbsConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ MrdegibbsConfigParametersTagged = typing.TypedDict('MrdegibbsConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  MrdegibbsParameters = typing.TypedDict('MrdegibbsParameters', {
24
- "__STYXTYPE__": typing.Literal["mrdegibbs"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/mrdegibbs"]],
30
+ "axes": typing.NotRequired[list[int] | None],
31
+ "nshifts": typing.NotRequired[int | None],
32
+ "minW": typing.NotRequired[int | None],
33
+ "maxW": typing.NotRequired[int | None],
34
+ "datatype": typing.NotRequired[str | None],
35
+ "info": bool,
36
+ "quiet": bool,
37
+ "debug": bool,
38
+ "force": bool,
39
+ "nthreads": typing.NotRequired[int | None],
40
+ "config": typing.NotRequired[list[MrdegibbsConfigParameters] | None],
41
+ "help": bool,
42
+ "version": bool,
43
+ "in": InputPathType,
44
+ "out": str,
45
+ })
46
+ MrdegibbsParametersTagged = typing.TypedDict('MrdegibbsParametersTagged', {
47
+ "@type": typing.Literal["mrtrix/mrdegibbs"],
25
48
  "axes": typing.NotRequired[list[int] | None],
26
49
  "nshifts": typing.NotRequired[int | None],
27
50
  "minW": typing.NotRequired[int | None],
@@ -38,45 +61,12 @@ MrdegibbsParameters = typing.TypedDict('MrdegibbsParameters', {
38
61
  "in": InputPathType,
39
62
  "out": str,
40
63
  })
41
-
42
-
43
- def dyn_cargs(
44
- t: str,
45
- ) -> typing.Any:
46
- """
47
- Get build cargs function by command type.
48
-
49
- Args:
50
- t: Command type.
51
- Returns:
52
- Build cargs function.
53
- """
54
- return {
55
- "mrdegibbs": mrdegibbs_cargs,
56
- "config": mrdegibbs_config_cargs,
57
- }.get(t)
58
-
59
-
60
- def dyn_outputs(
61
- t: str,
62
- ) -> typing.Any:
63
- """
64
- Get build outputs function by command type.
65
-
66
- Args:
67
- t: Command type.
68
- Returns:
69
- Build outputs function.
70
- """
71
- return {
72
- "mrdegibbs": mrdegibbs_outputs,
73
- }.get(t)
74
64
 
75
65
 
76
66
  def mrdegibbs_config_params(
77
67
  key: str,
78
68
  value: str,
79
- ) -> MrdegibbsConfigParameters:
69
+ ) -> MrdegibbsConfigParametersTagged:
80
70
  """
81
71
  Build parameters.
82
72
 
@@ -87,7 +77,7 @@ def mrdegibbs_config_params(
87
77
  Parameter dictionary
88
78
  """
89
79
  params = {
90
- "__STYXTYPE__": "config",
80
+ "@type": "config",
91
81
  "key": key,
92
82
  "value": value,
93
83
  }
@@ -109,14 +99,14 @@ def mrdegibbs_config_cargs(
109
99
  """
110
100
  cargs = []
111
101
  cargs.append("-config")
112
- cargs.append(params.get("key"))
113
- cargs.append(params.get("value"))
102
+ cargs.append(params.get("key", None))
103
+ cargs.append(params.get("value", None))
114
104
  return cargs
115
105
 
116
106
 
117
107
  class MrdegibbsOutputs(typing.NamedTuple):
118
108
  """
119
- Output object returned when calling `mrdegibbs(...)`.
109
+ Output object returned when calling `MrdegibbsParameters(...)`.
120
110
  """
121
111
  root: OutputPathType
122
112
  """Output root folder. This is the root folder for all outputs."""
@@ -140,7 +130,7 @@ def mrdegibbs_params(
140
130
  config: list[MrdegibbsConfigParameters] | None = None,
141
131
  help_: bool = False,
142
132
  version: bool = False,
143
- ) -> MrdegibbsParameters:
133
+ ) -> MrdegibbsParametersTagged:
144
134
  """
145
135
  Build parameters.
146
136
 
@@ -173,7 +163,7 @@ def mrdegibbs_params(
173
163
  Parameter dictionary
174
164
  """
175
165
  params = {
176
- "__STYXTYPE__": "mrdegibbs",
166
+ "@type": "mrtrix/mrdegibbs",
177
167
  "info": info,
178
168
  "quiet": quiet,
179
169
  "debug": debug,
@@ -215,52 +205,52 @@ def mrdegibbs_cargs(
215
205
  """
216
206
  cargs = []
217
207
  cargs.append("mrdegibbs")
218
- if params.get("axes") is not None:
208
+ if params.get("axes", None) is not None:
219
209
  cargs.extend([
220
210
  "-axes",
221
- *map(str, params.get("axes"))
211
+ *map(str, params.get("axes", None))
222
212
  ])
223
- if params.get("nshifts") is not None:
213
+ if params.get("nshifts", None) is not None:
224
214
  cargs.extend([
225
215
  "-nshifts",
226
- str(params.get("nshifts"))
216
+ str(params.get("nshifts", None))
227
217
  ])
228
- if params.get("minW") is not None:
218
+ if params.get("minW", None) is not None:
229
219
  cargs.extend([
230
220
  "-minW",
231
- str(params.get("minW"))
221
+ str(params.get("minW", None))
232
222
  ])
233
- if params.get("maxW") is not None:
223
+ if params.get("maxW", None) is not None:
234
224
  cargs.extend([
235
225
  "-maxW",
236
- str(params.get("maxW"))
226
+ str(params.get("maxW", None))
237
227
  ])
238
- if params.get("datatype") is not None:
228
+ if params.get("datatype", None) is not None:
239
229
  cargs.extend([
240
230
  "-datatype",
241
- params.get("datatype")
231
+ params.get("datatype", None)
242
232
  ])
243
- if params.get("info"):
233
+ if params.get("info", False):
244
234
  cargs.append("-info")
245
- if params.get("quiet"):
235
+ if params.get("quiet", False):
246
236
  cargs.append("-quiet")
247
- if params.get("debug"):
237
+ if params.get("debug", False):
248
238
  cargs.append("-debug")
249
- if params.get("force"):
239
+ if params.get("force", False):
250
240
  cargs.append("-force")
251
- if params.get("nthreads") is not None:
241
+ if params.get("nthreads", None) is not None:
252
242
  cargs.extend([
253
243
  "-nthreads",
254
- str(params.get("nthreads"))
244
+ str(params.get("nthreads", None))
255
245
  ])
256
- if params.get("config") is not None:
257
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
258
- if params.get("help"):
246
+ if params.get("config", None) is not None:
247
+ cargs.extend([a for c in [mrdegibbs_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
248
+ if params.get("help", False):
259
249
  cargs.append("-help")
260
- if params.get("version"):
250
+ if params.get("version", False):
261
251
  cargs.append("-version")
262
- cargs.append(execution.input_file(params.get("in")))
263
- cargs.append(params.get("out"))
252
+ cargs.append(execution.input_file(params.get("in", None)))
253
+ cargs.append(params.get("out", None))
264
254
  return cargs
265
255
 
266
256
 
@@ -279,16 +269,18 @@ def mrdegibbs_outputs(
279
269
  """
280
270
  ret = MrdegibbsOutputs(
281
271
  root=execution.output_file("."),
282
- out=execution.output_file(params.get("out")),
272
+ out=execution.output_file(params.get("out", None)),
283
273
  )
284
274
  return ret
285
275
 
286
276
 
287
277
  def mrdegibbs_execute(
288
278
  params: MrdegibbsParameters,
289
- execution: Execution,
279
+ runner: Runner | None = None,
290
280
  ) -> MrdegibbsOutputs:
291
281
  """
282
+ mrdegibbs
283
+
292
284
  Remove Gibbs Ringing Artifacts.
293
285
 
294
286
  This application attempts to remove Gibbs ringing artefacts from MRI images
@@ -321,10 +313,12 @@ def mrdegibbs_execute(
321
313
 
322
314
  Args:
323
315
  params: The parameters.
324
- execution: The execution object.
316
+ runner: Command runner.
325
317
  Returns:
326
318
  NamedTuple of outputs (described in `MrdegibbsOutputs`).
327
319
  """
320
+ runner = runner or get_global_runner()
321
+ execution = runner.start_execution(MRDEGIBBS_METADATA)
328
322
  params = execution.params(params)
329
323
  cargs = mrdegibbs_cargs(params, execution)
330
324
  ret = mrdegibbs_outputs(params, execution)
@@ -351,6 +345,8 @@ def mrdegibbs(
351
345
  runner: Runner | None = None,
352
346
  ) -> MrdegibbsOutputs:
353
347
  """
348
+ mrdegibbs
349
+
354
350
  Remove Gibbs Ringing Artifacts.
355
351
 
356
352
  This application attempts to remove Gibbs ringing artefacts from MRI images
@@ -410,8 +406,6 @@ def mrdegibbs(
410
406
  Returns:
411
407
  NamedTuple of outputs (described in `MrdegibbsOutputs`).
412
408
  """
413
- runner = runner or get_global_runner()
414
- execution = runner.start_execution(MRDEGIBBS_METADATA)
415
409
  params = mrdegibbs_params(
416
410
  axes=axes,
417
411
  nshifts=nshifts,
@@ -429,15 +423,14 @@ def mrdegibbs(
429
423
  in_=in_,
430
424
  out=out,
431
425
  )
432
- return mrdegibbs_execute(params, execution)
426
+ return mrdegibbs_execute(params, runner)
433
427
 
434
428
 
435
429
  __all__ = [
436
430
  "MRDEGIBBS_METADATA",
437
- "MrdegibbsConfigParameters",
438
431
  "MrdegibbsOutputs",
439
- "MrdegibbsParameters",
440
432
  "mrdegibbs",
441
433
  "mrdegibbs_config_params",
434
+ "mrdegibbs_execute",
442
435
  "mrdegibbs_params",
443
436
  ]
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MRDUMP_METADATA = Metadata(
9
- id="4245b09acbe36314b090cb352200374f5d140a3c.boutiques",
9
+ id="606c9d0900d68319d10a0372597796b0e18d5074.boutiques",
10
10
  name="mrdump",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,33 @@ MRDUMP_METADATA = Metadata(
14
14
 
15
15
 
16
16
  MrdumpConfigParameters = typing.TypedDict('MrdumpConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ MrdumpConfigParametersTagged = typing.TypedDict('MrdumpConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  MrdumpParameters = typing.TypedDict('MrdumpParameters', {
24
- "__STYXTYPE__": typing.Literal["mrdump"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/mrdump"]],
30
+ "mask": typing.NotRequired[InputPathType | None],
31
+ "info": bool,
32
+ "quiet": bool,
33
+ "debug": bool,
34
+ "force": bool,
35
+ "nthreads": typing.NotRequired[int | None],
36
+ "config": typing.NotRequired[list[MrdumpConfigParameters] | None],
37
+ "help": bool,
38
+ "version": bool,
39
+ "input": InputPathType,
40
+ "output": typing.NotRequired[str | None],
41
+ })
42
+ MrdumpParametersTagged = typing.TypedDict('MrdumpParametersTagged', {
43
+ "@type": typing.Literal["mrtrix/mrdump"],
25
44
  "mask": typing.NotRequired[InputPathType | None],
26
45
  "info": bool,
27
46
  "quiet": bool,
@@ -34,45 +53,12 @@ MrdumpParameters = typing.TypedDict('MrdumpParameters', {
34
53
  "input": InputPathType,
35
54
  "output": typing.NotRequired[str | None],
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
- "mrdump": mrdump_cargs,
52
- "config": mrdump_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
- "mrdump": mrdump_outputs,
69
- }.get(t)
70
56
 
71
57
 
72
58
  def mrdump_config_params(
73
59
  key: str,
74
60
  value: str,
75
- ) -> MrdumpConfigParameters:
61
+ ) -> MrdumpConfigParametersTagged:
76
62
  """
77
63
  Build parameters.
78
64
 
@@ -83,7 +69,7 @@ def mrdump_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 mrdump_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 MrdumpOutputs(typing.NamedTuple):
114
100
  """
115
- Output object returned when calling `mrdump(...)`.
101
+ Output object returned when calling `MrdumpParameters(...)`.
116
102
  """
117
103
  root: OutputPathType
118
104
  """Output root folder. This is the root folder for all outputs."""
@@ -132,7 +118,7 @@ def mrdump_params(
132
118
  help_: bool = False,
133
119
  version: bool = False,
134
120
  output: str | None = None,
135
- ) -> MrdumpParameters:
121
+ ) -> MrdumpParametersTagged:
136
122
  """
137
123
  Build parameters.
138
124
 
@@ -157,7 +143,7 @@ def mrdump_params(
157
143
  Parameter dictionary
158
144
  """
159
145
  params = {
160
- "__STYXTYPE__": "mrdump",
146
+ "@type": "mrtrix/mrdump",
161
147
  "info": info,
162
148
  "quiet": quiet,
163
149
  "debug": debug,
@@ -192,33 +178,33 @@ def mrdump_cargs(
192
178
  """
193
179
  cargs = []
194
180
  cargs.append("mrdump")
195
- if params.get("mask") is not None:
181
+ if params.get("mask", None) is not None:
196
182
  cargs.extend([
197
183
  "-mask",
198
- execution.input_file(params.get("mask"))
184
+ execution.input_file(params.get("mask", None))
199
185
  ])
200
- if params.get("info"):
186
+ if params.get("info", False):
201
187
  cargs.append("-info")
202
- if params.get("quiet"):
188
+ if params.get("quiet", False):
203
189
  cargs.append("-quiet")
204
- if params.get("debug"):
190
+ if params.get("debug", False):
205
191
  cargs.append("-debug")
206
- if params.get("force"):
192
+ if params.get("force", False):
207
193
  cargs.append("-force")
208
- if params.get("nthreads") is not None:
194
+ if params.get("nthreads", None) is not None:
209
195
  cargs.extend([
210
196
  "-nthreads",
211
- str(params.get("nthreads"))
197
+ str(params.get("nthreads", None))
212
198
  ])
213
- if params.get("config") is not None:
214
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
215
- if params.get("help"):
199
+ if params.get("config", None) is not None:
200
+ cargs.extend([a for c in [mrdump_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
201
+ if params.get("help", False):
216
202
  cargs.append("-help")
217
- if params.get("version"):
203
+ if params.get("version", False):
218
204
  cargs.append("-version")
219
- cargs.append(execution.input_file(params.get("input")))
220
- if params.get("output") is not None:
221
- cargs.append(params.get("output"))
205
+ cargs.append(execution.input_file(params.get("input", None)))
206
+ if params.get("output", None) is not None:
207
+ cargs.append(params.get("output", None))
222
208
  return cargs
223
209
 
224
210
 
@@ -237,16 +223,18 @@ def mrdump_outputs(
237
223
  """
238
224
  ret = MrdumpOutputs(
239
225
  root=execution.output_file("."),
240
- output=execution.output_file(params.get("output")) if (params.get("output") is not None) else None,
226
+ output=execution.output_file(params.get("output", None)) if (params.get("output") is not None) else None,
241
227
  )
242
228
  return ret
243
229
 
244
230
 
245
231
  def mrdump_execute(
246
232
  params: MrdumpParameters,
247
- execution: Execution,
233
+ runner: Runner | None = None,
248
234
  ) -> MrdumpOutputs:
249
235
  """
236
+ mrdump
237
+
250
238
  Print out the values within an image.
251
239
 
252
240
  If no destination file is specified, the voxel locations will be printed to
@@ -262,10 +250,12 @@ def mrdump_execute(
262
250
 
263
251
  Args:
264
252
  params: The parameters.
265
- execution: The execution object.
253
+ runner: Command runner.
266
254
  Returns:
267
255
  NamedTuple of outputs (described in `MrdumpOutputs`).
268
256
  """
257
+ runner = runner or get_global_runner()
258
+ execution = runner.start_execution(MRDUMP_METADATA)
269
259
  params = execution.params(params)
270
260
  cargs = mrdump_cargs(params, execution)
271
261
  ret = mrdump_outputs(params, execution)
@@ -288,6 +278,8 @@ def mrdump(
288
278
  runner: Runner | None = None,
289
279
  ) -> MrdumpOutputs:
290
280
  """
281
+ mrdump
282
+
291
283
  Print out the values within an image.
292
284
 
293
285
  If no destination file is specified, the voxel locations will be printed to
@@ -322,8 +314,6 @@ def mrdump(
322
314
  Returns:
323
315
  NamedTuple of outputs (described in `MrdumpOutputs`).
324
316
  """
325
- runner = runner or get_global_runner()
326
- execution = runner.start_execution(MRDUMP_METADATA)
327
317
  params = mrdump_params(
328
318
  mask=mask,
329
319
  info=info,
@@ -337,15 +327,14 @@ def mrdump(
337
327
  input_=input_,
338
328
  output=output,
339
329
  )
340
- return mrdump_execute(params, execution)
330
+ return mrdump_execute(params, runner)
341
331
 
342
332
 
343
333
  __all__ = [
344
334
  "MRDUMP_METADATA",
345
- "MrdumpConfigParameters",
346
335
  "MrdumpOutputs",
347
- "MrdumpParameters",
348
336
  "mrdump",
349
337
  "mrdump_config_params",
338
+ "mrdump_execute",
350
339
  "mrdump_params",
351
340
  ]