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
  V_5TT2GMWMI_METADATA = Metadata(
9
- id="a49652340948d08ac441b652a0e867f85d70f9ef.boutiques",
9
+ id="9364810c76c939f13c428191716ed63148337a9a.boutiques",
10
10
  name="5tt2gmwmi",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,33 @@ V_5TT2GMWMI_METADATA = Metadata(
14
14
 
15
15
 
16
16
  V5tt2gmwmiConfigParameters = typing.TypedDict('V5tt2gmwmiConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ V5tt2gmwmiConfigParametersTagged = typing.TypedDict('V5tt2gmwmiConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  V5tt2gmwmiParameters = typing.TypedDict('V5tt2gmwmiParameters', {
24
- "__STYXTYPE__": typing.Literal["5tt2gmwmi"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/5tt2gmwmi"]],
30
+ "mask_in": 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[V5tt2gmwmiConfigParameters] | None],
37
+ "help": bool,
38
+ "version": bool,
39
+ "5tt_in": InputPathType,
40
+ "mask_out": str,
41
+ })
42
+ V5tt2gmwmiParametersTagged = typing.TypedDict('V5tt2gmwmiParametersTagged', {
43
+ "@type": typing.Literal["mrtrix/5tt2gmwmi"],
25
44
  "mask_in": typing.NotRequired[InputPathType | None],
26
45
  "info": bool,
27
46
  "quiet": bool,
@@ -34,45 +53,12 @@ V5tt2gmwmiParameters = typing.TypedDict('V5tt2gmwmiParameters', {
34
53
  "5tt_in": InputPathType,
35
54
  "mask_out": 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
- "5tt2gmwmi": v_5tt2gmwmi_cargs,
52
- "config": v_5tt2gmwmi_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
- "5tt2gmwmi": v_5tt2gmwmi_outputs,
69
- }.get(t)
70
56
 
71
57
 
72
58
  def v_5tt2gmwmi_config_params(
73
59
  key: str,
74
60
  value: str,
75
- ) -> V5tt2gmwmiConfigParameters:
61
+ ) -> V5tt2gmwmiConfigParametersTagged:
76
62
  """
77
63
  Build parameters.
78
64
 
@@ -83,7 +69,7 @@ def v_5tt2gmwmi_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 v_5tt2gmwmi_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 V5tt2gmwmiOutputs(typing.NamedTuple):
114
100
  """
115
- Output object returned when calling `v_5tt2gmwmi(...)`.
101
+ Output object returned when calling `V5tt2gmwmiParameters(...)`.
116
102
  """
117
103
  root: OutputPathType
118
104
  """Output root folder. This is the root folder for all outputs."""
@@ -132,7 +118,7 @@ def v_5tt2gmwmi_params(
132
118
  config: list[V5tt2gmwmiConfigParameters] | None = None,
133
119
  help_: bool = False,
134
120
  version: bool = False,
135
- ) -> V5tt2gmwmiParameters:
121
+ ) -> V5tt2gmwmiParametersTagged:
136
122
  """
137
123
  Build parameters.
138
124
 
@@ -159,7 +145,7 @@ def v_5tt2gmwmi_params(
159
145
  Parameter dictionary
160
146
  """
161
147
  params = {
162
- "__STYXTYPE__": "5tt2gmwmi",
148
+ "@type": "mrtrix/5tt2gmwmi",
163
149
  "info": info,
164
150
  "quiet": quiet,
165
151
  "debug": debug,
@@ -193,32 +179,32 @@ def v_5tt2gmwmi_cargs(
193
179
  """
194
180
  cargs = []
195
181
  cargs.append("5tt2gmwmi")
196
- if params.get("mask_in") is not None:
182
+ if params.get("mask_in", None) is not None:
197
183
  cargs.extend([
198
184
  "-mask_in",
199
- execution.input_file(params.get("mask_in"))
185
+ execution.input_file(params.get("mask_in", None))
200
186
  ])
201
- if params.get("info"):
187
+ if params.get("info", False):
202
188
  cargs.append("-info")
203
- if params.get("quiet"):
189
+ if params.get("quiet", False):
204
190
  cargs.append("-quiet")
205
- if params.get("debug"):
191
+ if params.get("debug", False):
206
192
  cargs.append("-debug")
207
- if params.get("force"):
193
+ if params.get("force", False):
208
194
  cargs.append("-force")
209
- if params.get("nthreads") is not None:
195
+ if params.get("nthreads", None) is not None:
210
196
  cargs.extend([
211
197
  "-nthreads",
212
- str(params.get("nthreads"))
198
+ str(params.get("nthreads", None))
213
199
  ])
214
- if params.get("config") is not None:
215
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
216
- if params.get("help"):
200
+ if params.get("config", None) is not None:
201
+ cargs.extend([a for c in [v_5tt2gmwmi_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
202
+ if params.get("help", False):
217
203
  cargs.append("-help")
218
- if params.get("version"):
204
+ if params.get("version", False):
219
205
  cargs.append("-version")
220
- cargs.append(execution.input_file(params.get("5tt_in")))
221
- cargs.append(params.get("mask_out"))
206
+ cargs.append(execution.input_file(params.get("5tt_in", None)))
207
+ cargs.append(params.get("mask_out", None))
222
208
  return cargs
223
209
 
224
210
 
@@ -237,16 +223,18 @@ def v_5tt2gmwmi_outputs(
237
223
  """
238
224
  ret = V5tt2gmwmiOutputs(
239
225
  root=execution.output_file("."),
240
- mask_out=execution.output_file(params.get("mask_out")),
226
+ mask_out=execution.output_file(params.get("mask_out", None)),
241
227
  )
242
228
  return ret
243
229
 
244
230
 
245
231
  def v_5tt2gmwmi_execute(
246
232
  params: V5tt2gmwmiParameters,
247
- execution: Execution,
233
+ runner: Runner | None = None,
248
234
  ) -> V5tt2gmwmiOutputs:
249
235
  """
236
+ 5tt2gmwmi
237
+
250
238
  Generate a mask image appropriate for seeding streamlines on the grey
251
239
  matter-white matter interface.
252
240
 
@@ -265,10 +253,12 @@ def v_5tt2gmwmi_execute(
265
253
 
266
254
  Args:
267
255
  params: The parameters.
268
- execution: The execution object.
256
+ runner: Command runner.
269
257
  Returns:
270
258
  NamedTuple of outputs (described in `V5tt2gmwmiOutputs`).
271
259
  """
260
+ runner = runner or get_global_runner()
261
+ execution = runner.start_execution(V_5TT2GMWMI_METADATA)
272
262
  params = execution.params(params)
273
263
  cargs = v_5tt2gmwmi_cargs(params, execution)
274
264
  ret = v_5tt2gmwmi_outputs(params, execution)
@@ -291,6 +281,8 @@ def v_5tt2gmwmi(
291
281
  runner: Runner | None = None,
292
282
  ) -> V5tt2gmwmiOutputs:
293
283
  """
284
+ 5tt2gmwmi
285
+
294
286
  Generate a mask image appropriate for seeding streamlines on the grey
295
287
  matter-white matter interface.
296
288
 
@@ -330,8 +322,6 @@ def v_5tt2gmwmi(
330
322
  Returns:
331
323
  NamedTuple of outputs (described in `V5tt2gmwmiOutputs`).
332
324
  """
333
- runner = runner or get_global_runner()
334
- execution = runner.start_execution(V_5TT2GMWMI_METADATA)
335
325
  params = v_5tt2gmwmi_params(
336
326
  mask_in=mask_in,
337
327
  info=info,
@@ -345,15 +335,14 @@ def v_5tt2gmwmi(
345
335
  v_5tt_in=v_5tt_in,
346
336
  mask_out=mask_out,
347
337
  )
348
- return v_5tt2gmwmi_execute(params, execution)
338
+ return v_5tt2gmwmi_execute(params, runner)
349
339
 
350
340
 
351
341
  __all__ = [
352
- "V5tt2gmwmiConfigParameters",
353
342
  "V5tt2gmwmiOutputs",
354
- "V5tt2gmwmiParameters",
355
343
  "V_5TT2GMWMI_METADATA",
356
344
  "v_5tt2gmwmi",
357
345
  "v_5tt2gmwmi_config_params",
346
+ "v_5tt2gmwmi_execute",
358
347
  "v_5tt2gmwmi_params",
359
348
  ]
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  V_5TT2VIS_METADATA = Metadata(
9
- id="03a1929197756fe6117ff3c120f0bf3a5d278522.boutiques",
9
+ id="79cdcbb89fc6e8b73401cd1c0d4a4e933656160a.boutiques",
10
10
  name="5tt2vis",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,38 @@ V_5TT2VIS_METADATA = Metadata(
14
14
 
15
15
 
16
16
  V5tt2visConfigParameters = typing.TypedDict('V5tt2visConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ V5tt2visConfigParametersTagged = typing.TypedDict('V5tt2visConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  V5tt2visParameters = typing.TypedDict('V5tt2visParameters', {
24
- "__STYXTYPE__": typing.Literal["5tt2vis"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/5tt2vis"]],
30
+ "bg": typing.NotRequired[float | None],
31
+ "cgm": typing.NotRequired[float | None],
32
+ "sgm": typing.NotRequired[float | None],
33
+ "wm": typing.NotRequired[float | None],
34
+ "csf": typing.NotRequired[float | None],
35
+ "path": typing.NotRequired[float | None],
36
+ "info": bool,
37
+ "quiet": bool,
38
+ "debug": bool,
39
+ "force": bool,
40
+ "nthreads": typing.NotRequired[int | None],
41
+ "config": typing.NotRequired[list[V5tt2visConfigParameters] | None],
42
+ "help": bool,
43
+ "version": bool,
44
+ "input": InputPathType,
45
+ "output": str,
46
+ })
47
+ V5tt2visParametersTagged = typing.TypedDict('V5tt2visParametersTagged', {
48
+ "@type": typing.Literal["mrtrix/5tt2vis"],
25
49
  "bg": typing.NotRequired[float | None],
26
50
  "cgm": typing.NotRequired[float | None],
27
51
  "sgm": typing.NotRequired[float | None],
@@ -39,45 +63,12 @@ V5tt2visParameters = typing.TypedDict('V5tt2visParameters', {
39
63
  "input": InputPathType,
40
64
  "output": str,
41
65
  })
42
-
43
-
44
- def dyn_cargs(
45
- t: str,
46
- ) -> typing.Any:
47
- """
48
- Get build cargs function by command type.
49
-
50
- Args:
51
- t: Command type.
52
- Returns:
53
- Build cargs function.
54
- """
55
- return {
56
- "5tt2vis": v_5tt2vis_cargs,
57
- "config": v_5tt2vis_config_cargs,
58
- }.get(t)
59
-
60
-
61
- def dyn_outputs(
62
- t: str,
63
- ) -> typing.Any:
64
- """
65
- Get build outputs function by command type.
66
-
67
- Args:
68
- t: Command type.
69
- Returns:
70
- Build outputs function.
71
- """
72
- return {
73
- "5tt2vis": v_5tt2vis_outputs,
74
- }.get(t)
75
66
 
76
67
 
77
68
  def v_5tt2vis_config_params(
78
69
  key: str,
79
70
  value: str,
80
- ) -> V5tt2visConfigParameters:
71
+ ) -> V5tt2visConfigParametersTagged:
81
72
  """
82
73
  Build parameters.
83
74
 
@@ -88,7 +79,7 @@ def v_5tt2vis_config_params(
88
79
  Parameter dictionary
89
80
  """
90
81
  params = {
91
- "__STYXTYPE__": "config",
82
+ "@type": "config",
92
83
  "key": key,
93
84
  "value": value,
94
85
  }
@@ -110,14 +101,14 @@ def v_5tt2vis_config_cargs(
110
101
  """
111
102
  cargs = []
112
103
  cargs.append("-config")
113
- cargs.append(params.get("key"))
114
- cargs.append(params.get("value"))
104
+ cargs.append(params.get("key", None))
105
+ cargs.append(params.get("value", None))
115
106
  return cargs
116
107
 
117
108
 
118
109
  class V5tt2visOutputs(typing.NamedTuple):
119
110
  """
120
- Output object returned when calling `v_5tt2vis(...)`.
111
+ Output object returned when calling `V5tt2visParameters(...)`.
121
112
  """
122
113
  root: OutputPathType
123
114
  """Output root folder. This is the root folder for all outputs."""
@@ -142,7 +133,7 @@ def v_5tt2vis_params(
142
133
  config: list[V5tt2visConfigParameters] | None = None,
143
134
  help_: bool = False,
144
135
  version: bool = False,
145
- ) -> V5tt2visParameters:
136
+ ) -> V5tt2visParametersTagged:
146
137
  """
147
138
  Build parameters.
148
139
 
@@ -171,7 +162,7 @@ def v_5tt2vis_params(
171
162
  Parameter dictionary
172
163
  """
173
164
  params = {
174
- "__STYXTYPE__": "5tt2vis",
165
+ "@type": "mrtrix/5tt2vis",
175
166
  "info": info,
176
167
  "quiet": quiet,
177
168
  "debug": debug,
@@ -215,57 +206,57 @@ def v_5tt2vis_cargs(
215
206
  """
216
207
  cargs = []
217
208
  cargs.append("5tt2vis")
218
- if params.get("bg") is not None:
209
+ if params.get("bg", None) is not None:
219
210
  cargs.extend([
220
211
  "-bg",
221
- str(params.get("bg"))
212
+ str(params.get("bg", None))
222
213
  ])
223
- if params.get("cgm") is not None:
214
+ if params.get("cgm", None) is not None:
224
215
  cargs.extend([
225
216
  "-cgm",
226
- str(params.get("cgm"))
217
+ str(params.get("cgm", None))
227
218
  ])
228
- if params.get("sgm") is not None:
219
+ if params.get("sgm", None) is not None:
229
220
  cargs.extend([
230
221
  "-sgm",
231
- str(params.get("sgm"))
222
+ str(params.get("sgm", None))
232
223
  ])
233
- if params.get("wm") is not None:
224
+ if params.get("wm", None) is not None:
234
225
  cargs.extend([
235
226
  "-wm",
236
- str(params.get("wm"))
227
+ str(params.get("wm", None))
237
228
  ])
238
- if params.get("csf") is not None:
229
+ if params.get("csf", None) is not None:
239
230
  cargs.extend([
240
231
  "-csf",
241
- str(params.get("csf"))
232
+ str(params.get("csf", None))
242
233
  ])
243
- if params.get("path") is not None:
234
+ if params.get("path", None) is not None:
244
235
  cargs.extend([
245
236
  "-path",
246
- str(params.get("path"))
237
+ str(params.get("path", None))
247
238
  ])
248
- if params.get("info"):
239
+ if params.get("info", False):
249
240
  cargs.append("-info")
250
- if params.get("quiet"):
241
+ if params.get("quiet", False):
251
242
  cargs.append("-quiet")
252
- if params.get("debug"):
243
+ if params.get("debug", False):
253
244
  cargs.append("-debug")
254
- if params.get("force"):
245
+ if params.get("force", False):
255
246
  cargs.append("-force")
256
- if params.get("nthreads") is not None:
247
+ if params.get("nthreads", None) is not None:
257
248
  cargs.extend([
258
249
  "-nthreads",
259
- str(params.get("nthreads"))
250
+ str(params.get("nthreads", None))
260
251
  ])
261
- if params.get("config") is not None:
262
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
263
- if params.get("help"):
252
+ if params.get("config", None) is not None:
253
+ cargs.extend([a for c in [v_5tt2vis_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
254
+ if params.get("help", False):
264
255
  cargs.append("-help")
265
- if params.get("version"):
256
+ if params.get("version", False):
266
257
  cargs.append("-version")
267
- cargs.append(execution.input_file(params.get("input")))
268
- cargs.append(params.get("output"))
258
+ cargs.append(execution.input_file(params.get("input", None)))
259
+ cargs.append(params.get("output", None))
269
260
  return cargs
270
261
 
271
262
 
@@ -284,16 +275,18 @@ def v_5tt2vis_outputs(
284
275
  """
285
276
  ret = V5tt2visOutputs(
286
277
  root=execution.output_file("."),
287
- output=execution.output_file(params.get("output")),
278
+ output=execution.output_file(params.get("output", None)),
288
279
  )
289
280
  return ret
290
281
 
291
282
 
292
283
  def v_5tt2vis_execute(
293
284
  params: V5tt2visParameters,
294
- execution: Execution,
285
+ runner: Runner | None = None,
295
286
  ) -> V5tt2visOutputs:
296
287
  """
288
+ 5tt2vis
289
+
297
290
  Generate an image for visualisation purposes from an ACT 5TT segmented
298
291
  anatomical image.
299
292
 
@@ -309,10 +302,12 @@ def v_5tt2vis_execute(
309
302
 
310
303
  Args:
311
304
  params: The parameters.
312
- execution: The execution object.
305
+ runner: Command runner.
313
306
  Returns:
314
307
  NamedTuple of outputs (described in `V5tt2visOutputs`).
315
308
  """
309
+ runner = runner or get_global_runner()
310
+ execution = runner.start_execution(V_5TT2VIS_METADATA)
316
311
  params = execution.params(params)
317
312
  cargs = v_5tt2vis_cargs(params, execution)
318
313
  ret = v_5tt2vis_outputs(params, execution)
@@ -340,6 +335,8 @@ def v_5tt2vis(
340
335
  runner: Runner | None = None,
341
336
  ) -> V5tt2visOutputs:
342
337
  """
338
+ 5tt2vis
339
+
343
340
  Generate an image for visualisation purposes from an ACT 5TT segmented
344
341
  anatomical image.
345
342
 
@@ -378,8 +375,6 @@ def v_5tt2vis(
378
375
  Returns:
379
376
  NamedTuple of outputs (described in `V5tt2visOutputs`).
380
377
  """
381
- runner = runner or get_global_runner()
382
- execution = runner.start_execution(V_5TT2VIS_METADATA)
383
378
  params = v_5tt2vis_params(
384
379
  bg=bg,
385
380
  cgm=cgm,
@@ -398,15 +393,14 @@ def v_5tt2vis(
398
393
  input_=input_,
399
394
  output=output,
400
395
  )
401
- return v_5tt2vis_execute(params, execution)
396
+ return v_5tt2vis_execute(params, runner)
402
397
 
403
398
 
404
399
  __all__ = [
405
- "V5tt2visConfigParameters",
406
400
  "V5tt2visOutputs",
407
- "V5tt2visParameters",
408
401
  "V_5TT2VIS_METADATA",
409
402
  "v_5tt2vis",
410
403
  "v_5tt2vis_config_params",
404
+ "v_5tt2vis_execute",
411
405
  "v_5tt2vis_params",
412
406
  ]