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
  TRANSFORMCOMPOSE_METADATA = Metadata(
9
- id="6d7295675afed0c75d67eae13a94d73c7b970c74.boutiques",
9
+ id="00dff5d1cb74f969e2ad40f5dbeaedf75a029491.boutiques",
10
10
  name="transformcompose",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,26 +14,39 @@ TRANSFORMCOMPOSE_METADATA = Metadata(
14
14
 
15
15
 
16
16
  TransformcomposeConfigParameters = typing.TypedDict('TransformcomposeConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ TransformcomposeConfigParametersTagged = typing.TypedDict('TransformcomposeConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  TransformcomposeVariousStringParameters = typing.TypedDict('TransformcomposeVariousStringParameters', {
24
- "__STYXTYPE__": typing.Literal["VariousString"],
29
+ "@type": typing.NotRequired[typing.Literal["VariousString"]],
30
+ "obj": str,
31
+ })
32
+ TransformcomposeVariousStringParametersTagged = typing.TypedDict('TransformcomposeVariousStringParametersTagged', {
33
+ "@type": typing.Literal["VariousString"],
25
34
  "obj": str,
26
35
  })
27
36
 
28
37
 
29
38
  TransformcomposeVariousFileParameters = typing.TypedDict('TransformcomposeVariousFileParameters', {
30
- "__STYXTYPE__": typing.Literal["VariousFile"],
39
+ "@type": typing.NotRequired[typing.Literal["VariousFile"]],
40
+ "obj": InputPathType,
41
+ })
42
+ TransformcomposeVariousFileParametersTagged = typing.TypedDict('TransformcomposeVariousFileParametersTagged', {
43
+ "@type": typing.Literal["VariousFile"],
31
44
  "obj": InputPathType,
32
45
  })
33
46
 
34
47
 
35
48
  TransformcomposeParameters = typing.TypedDict('TransformcomposeParameters', {
36
- "__STYXTYPE__": typing.Literal["transformcompose"],
49
+ "@type": typing.NotRequired[typing.Literal["mrtrix/transformcompose"]],
37
50
  "template": typing.NotRequired[InputPathType | None],
38
51
  "info": bool,
39
52
  "quiet": bool,
@@ -44,11 +57,25 @@ TransformcomposeParameters = typing.TypedDict('TransformcomposeParameters', {
44
57
  "help": bool,
45
58
  "version": bool,
46
59
  "input": list[InputPathType],
47
- "output": typing.Union[TransformcomposeVariousStringParameters, TransformcomposeVariousFileParameters],
60
+ "output": typing.Union[TransformcomposeVariousStringParametersTagged, TransformcomposeVariousFileParametersTagged],
61
+ })
62
+ TransformcomposeParametersTagged = typing.TypedDict('TransformcomposeParametersTagged', {
63
+ "@type": typing.Literal["mrtrix/transformcompose"],
64
+ "template": typing.NotRequired[InputPathType | None],
65
+ "info": bool,
66
+ "quiet": bool,
67
+ "debug": bool,
68
+ "force": bool,
69
+ "nthreads": typing.NotRequired[int | None],
70
+ "config": typing.NotRequired[list[TransformcomposeConfigParameters] | None],
71
+ "help": bool,
72
+ "version": bool,
73
+ "input": list[InputPathType],
74
+ "output": typing.Union[TransformcomposeVariousStringParametersTagged, TransformcomposeVariousFileParametersTagged],
48
75
  })
49
76
 
50
77
 
51
- def dyn_cargs(
78
+ def transformcompose_output_cargs_dyn_fn(
52
79
  t: str,
53
80
  ) -> typing.Any:
54
81
  """
@@ -60,14 +87,12 @@ def dyn_cargs(
60
87
  Build cargs function.
61
88
  """
62
89
  return {
63
- "transformcompose": transformcompose_cargs,
64
- "config": transformcompose_config_cargs,
65
90
  "VariousString": transformcompose_various_string_cargs,
66
91
  "VariousFile": transformcompose_various_file_cargs,
67
92
  }.get(t)
68
93
 
69
94
 
70
- def dyn_outputs(
95
+ def transformcompose_output_outputs_dyn_fn(
71
96
  t: str,
72
97
  ) -> typing.Any:
73
98
  """
@@ -85,7 +110,7 @@ def dyn_outputs(
85
110
  def transformcompose_config_params(
86
111
  key: str,
87
112
  value: str,
88
- ) -> TransformcomposeConfigParameters:
113
+ ) -> TransformcomposeConfigParametersTagged:
89
114
  """
90
115
  Build parameters.
91
116
 
@@ -96,7 +121,7 @@ def transformcompose_config_params(
96
121
  Parameter dictionary
97
122
  """
98
123
  params = {
99
- "__STYXTYPE__": "config",
124
+ "@type": "config",
100
125
  "key": key,
101
126
  "value": value,
102
127
  }
@@ -118,14 +143,14 @@ def transformcompose_config_cargs(
118
143
  """
119
144
  cargs = []
120
145
  cargs.append("-config")
121
- cargs.append(params.get("key"))
122
- cargs.append(params.get("value"))
146
+ cargs.append(params.get("key", None))
147
+ cargs.append(params.get("value", None))
123
148
  return cargs
124
149
 
125
150
 
126
151
  def transformcompose_various_string_params(
127
152
  obj: str,
128
- ) -> TransformcomposeVariousStringParameters:
153
+ ) -> TransformcomposeVariousStringParametersTagged:
129
154
  """
130
155
  Build parameters.
131
156
 
@@ -135,7 +160,7 @@ def transformcompose_various_string_params(
135
160
  Parameter dictionary
136
161
  """
137
162
  params = {
138
- "__STYXTYPE__": "VariousString",
163
+ "@type": "VariousString",
139
164
  "obj": obj,
140
165
  }
141
166
  return params
@@ -155,13 +180,13 @@ def transformcompose_various_string_cargs(
155
180
  Command-line arguments.
156
181
  """
157
182
  cargs = []
158
- cargs.append(params.get("obj"))
183
+ cargs.append(params.get("obj", None))
159
184
  return cargs
160
185
 
161
186
 
162
187
  def transformcompose_various_file_params(
163
188
  obj: InputPathType,
164
- ) -> TransformcomposeVariousFileParameters:
189
+ ) -> TransformcomposeVariousFileParametersTagged:
165
190
  """
166
191
  Build parameters.
167
192
 
@@ -171,7 +196,7 @@ def transformcompose_various_file_params(
171
196
  Parameter dictionary
172
197
  """
173
198
  params = {
174
- "__STYXTYPE__": "VariousFile",
199
+ "@type": "VariousFile",
175
200
  "obj": obj,
176
201
  }
177
202
  return params
@@ -191,13 +216,13 @@ def transformcompose_various_file_cargs(
191
216
  Command-line arguments.
192
217
  """
193
218
  cargs = []
194
- cargs.append(execution.input_file(params.get("obj")))
219
+ cargs.append(execution.input_file(params.get("obj", None)))
195
220
  return cargs
196
221
 
197
222
 
198
223
  class TransformcomposeOutputs(typing.NamedTuple):
199
224
  """
200
- Output object returned when calling `transformcompose(...)`.
225
+ Output object returned when calling `TransformcomposeParameters(...)`.
201
226
  """
202
227
  root: OutputPathType
203
228
  """Output root folder. This is the root folder for all outputs."""
@@ -205,7 +230,7 @@ class TransformcomposeOutputs(typing.NamedTuple):
205
230
 
206
231
  def transformcompose_params(
207
232
  input_: list[InputPathType],
208
- output: typing.Union[TransformcomposeVariousStringParameters, TransformcomposeVariousFileParameters],
233
+ output: typing.Union[TransformcomposeVariousStringParametersTagged, TransformcomposeVariousFileParametersTagged],
209
234
  template: InputPathType | None = None,
210
235
  info: bool = False,
211
236
  quiet: bool = False,
@@ -215,7 +240,7 @@ def transformcompose_params(
215
240
  config: list[TransformcomposeConfigParameters] | None = None,
216
241
  help_: bool = False,
217
242
  version: bool = False,
218
- ) -> TransformcomposeParameters:
243
+ ) -> TransformcomposeParametersTagged:
219
244
  """
220
245
  Build parameters.
221
246
 
@@ -240,7 +265,7 @@ def transformcompose_params(
240
265
  Parameter dictionary
241
266
  """
242
267
  params = {
243
- "__STYXTYPE__": "transformcompose",
268
+ "@type": "mrtrix/transformcompose",
244
269
  "info": info,
245
270
  "quiet": quiet,
246
271
  "debug": debug,
@@ -274,32 +299,32 @@ def transformcompose_cargs(
274
299
  """
275
300
  cargs = []
276
301
  cargs.append("transformcompose")
277
- if params.get("template") is not None:
302
+ if params.get("template", None) is not None:
278
303
  cargs.extend([
279
304
  "-template",
280
- execution.input_file(params.get("template"))
305
+ execution.input_file(params.get("template", None))
281
306
  ])
282
- if params.get("info"):
307
+ if params.get("info", False):
283
308
  cargs.append("-info")
284
- if params.get("quiet"):
309
+ if params.get("quiet", False):
285
310
  cargs.append("-quiet")
286
- if params.get("debug"):
311
+ if params.get("debug", False):
287
312
  cargs.append("-debug")
288
- if params.get("force"):
313
+ if params.get("force", False):
289
314
  cargs.append("-force")
290
- if params.get("nthreads") is not None:
315
+ if params.get("nthreads", None) is not None:
291
316
  cargs.extend([
292
317
  "-nthreads",
293
- str(params.get("nthreads"))
318
+ str(params.get("nthreads", None))
294
319
  ])
295
- if params.get("config") is not None:
296
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
297
- if params.get("help"):
320
+ if params.get("config", None) is not None:
321
+ cargs.extend([a for c in [transformcompose_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
322
+ if params.get("help", False):
298
323
  cargs.append("-help")
299
- if params.get("version"):
324
+ if params.get("version", False):
300
325
  cargs.append("-version")
301
- cargs.extend([execution.input_file(f) for f in params.get("input")])
302
- cargs.extend(dyn_cargs(params.get("output")["__STYXTYPE__"])(params.get("output"), execution))
326
+ cargs.extend([execution.input_file(f) for f in params.get("input", None)])
327
+ cargs.extend(transformcompose_output_cargs_dyn_fn(params.get("output", None)["@type"])(params.get("output", None), execution))
303
328
  return cargs
304
329
 
305
330
 
@@ -324,9 +349,11 @@ def transformcompose_outputs(
324
349
 
325
350
  def transformcompose_execute(
326
351
  params: TransformcomposeParameters,
327
- execution: Execution,
352
+ runner: Runner | None = None,
328
353
  ) -> TransformcomposeOutputs:
329
354
  """
355
+ transformcompose
356
+
330
357
  Compose any number of linear transformations and/or warps into a single
331
358
  transformation.
332
359
 
@@ -357,10 +384,12 @@ def transformcompose_execute(
357
384
 
358
385
  Args:
359
386
  params: The parameters.
360
- execution: The execution object.
387
+ runner: Command runner.
361
388
  Returns:
362
389
  NamedTuple of outputs (described in `TransformcomposeOutputs`).
363
390
  """
391
+ runner = runner or get_global_runner()
392
+ execution = runner.start_execution(TRANSFORMCOMPOSE_METADATA)
364
393
  params = execution.params(params)
365
394
  cargs = transformcompose_cargs(params, execution)
366
395
  ret = transformcompose_outputs(params, execution)
@@ -370,7 +399,7 @@ def transformcompose_execute(
370
399
 
371
400
  def transformcompose(
372
401
  input_: list[InputPathType],
373
- output: typing.Union[TransformcomposeVariousStringParameters, TransformcomposeVariousFileParameters],
402
+ output: typing.Union[TransformcomposeVariousStringParametersTagged, TransformcomposeVariousFileParametersTagged],
374
403
  template: InputPathType | None = None,
375
404
  info: bool = False,
376
405
  quiet: bool = False,
@@ -383,6 +412,8 @@ def transformcompose(
383
412
  runner: Runner | None = None,
384
413
  ) -> TransformcomposeOutputs:
385
414
  """
415
+ transformcompose
416
+
386
417
  Compose any number of linear transformations and/or warps into a single
387
418
  transformation.
388
419
 
@@ -432,8 +463,6 @@ def transformcompose(
432
463
  Returns:
433
464
  NamedTuple of outputs (described in `TransformcomposeOutputs`).
434
465
  """
435
- runner = runner or get_global_runner()
436
- execution = runner.start_execution(TRANSFORMCOMPOSE_METADATA)
437
466
  params = transformcompose_params(
438
467
  template=template,
439
468
  info=info,
@@ -447,18 +476,15 @@ def transformcompose(
447
476
  input_=input_,
448
477
  output=output,
449
478
  )
450
- return transformcompose_execute(params, execution)
479
+ return transformcompose_execute(params, runner)
451
480
 
452
481
 
453
482
  __all__ = [
454
483
  "TRANSFORMCOMPOSE_METADATA",
455
- "TransformcomposeConfigParameters",
456
484
  "TransformcomposeOutputs",
457
- "TransformcomposeParameters",
458
- "TransformcomposeVariousFileParameters",
459
- "TransformcomposeVariousStringParameters",
460
485
  "transformcompose",
461
486
  "transformcompose_config_params",
487
+ "transformcompose_execute",
462
488
  "transformcompose_params",
463
489
  "transformcompose_various_file_params",
464
490
  "transformcompose_various_string_params",
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  TRANSFORMCONVERT_METADATA = Metadata(
9
- id="2e1de53beaf30dd05624a9e68d7f1150ea1e689a.boutiques",
9
+ id="d989e00db8a3092cc8404a7694ecd7d449c9f298.boutiques",
10
10
  name="transformconvert",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,33 @@ TRANSFORMCONVERT_METADATA = Metadata(
14
14
 
15
15
 
16
16
  TransformconvertConfigParameters = typing.TypedDict('TransformconvertConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ TransformconvertConfigParametersTagged = typing.TypedDict('TransformconvertConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  TransformconvertParameters = typing.TypedDict('TransformconvertParameters', {
24
- "__STYXTYPE__": typing.Literal["transformconvert"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/transformconvert"]],
30
+ "info": bool,
31
+ "quiet": bool,
32
+ "debug": bool,
33
+ "force": bool,
34
+ "nthreads": typing.NotRequired[int | None],
35
+ "config": typing.NotRequired[list[TransformconvertConfigParameters] | None],
36
+ "help": bool,
37
+ "version": bool,
38
+ "input": list[str],
39
+ "operation": str,
40
+ "output": str,
41
+ })
42
+ TransformconvertParametersTagged = typing.TypedDict('TransformconvertParametersTagged', {
43
+ "@type": typing.Literal["mrtrix/transformconvert"],
25
44
  "info": bool,
26
45
  "quiet": bool,
27
46
  "debug": bool,
@@ -34,45 +53,12 @@ TransformconvertParameters = typing.TypedDict('TransformconvertParameters', {
34
53
  "operation": str,
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
- "transformconvert": transformconvert_cargs,
52
- "config": transformconvert_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
- "transformconvert": transformconvert_outputs,
69
- }.get(t)
70
56
 
71
57
 
72
58
  def transformconvert_config_params(
73
59
  key: str,
74
60
  value: str,
75
- ) -> TransformconvertConfigParameters:
61
+ ) -> TransformconvertConfigParametersTagged:
76
62
  """
77
63
  Build parameters.
78
64
 
@@ -83,7 +69,7 @@ def transformconvert_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 transformconvert_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 TransformconvertOutputs(typing.NamedTuple):
114
100
  """
115
- Output object returned when calling `transformconvert(...)`.
101
+ Output object returned when calling `TransformconvertParameters(...)`.
116
102
  """
117
103
  root: OutputPathType
118
104
  """Output root folder. This is the root folder for all outputs."""
@@ -132,7 +118,7 @@ def transformconvert_params(
132
118
  config: list[TransformconvertConfigParameters] | None = None,
133
119
  help_: bool = False,
134
120
  version: bool = False,
135
- ) -> TransformconvertParameters:
121
+ ) -> TransformconvertParametersTagged:
136
122
  """
137
123
  Build parameters.
138
124
 
@@ -157,7 +143,7 @@ def transformconvert_params(
157
143
  Parameter dictionary
158
144
  """
159
145
  params = {
160
- "__STYXTYPE__": "transformconvert",
146
+ "@type": "mrtrix/transformconvert",
161
147
  "info": info,
162
148
  "quiet": quiet,
163
149
  "debug": debug,
@@ -190,28 +176,28 @@ def transformconvert_cargs(
190
176
  """
191
177
  cargs = []
192
178
  cargs.append("transformconvert")
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 [transformconvert_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.extend(params.get("input"))
213
- cargs.append(params.get("operation"))
214
- cargs.append(params.get("output"))
198
+ cargs.extend(params.get("input", None))
199
+ cargs.append(params.get("operation", None))
200
+ cargs.append(params.get("output", None))
215
201
  return cargs
216
202
 
217
203
 
@@ -230,16 +216,18 @@ def transformconvert_outputs(
230
216
  """
231
217
  ret = TransformconvertOutputs(
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 transformconvert_execute(
239
225
  params: TransformconvertParameters,
240
- execution: Execution,
226
+ runner: Runner | None = None,
241
227
  ) -> TransformconvertOutputs:
242
228
  """
229
+ transformconvert
230
+
243
231
  Convert linear transformation matrices.
244
232
 
245
233
  This command allows to convert transformation matrices provided by other
@@ -256,10 +244,12 @@ def transformconvert_execute(
256
244
 
257
245
  Args:
258
246
  params: The parameters.
259
- execution: The execution object.
247
+ runner: Command runner.
260
248
  Returns:
261
249
  NamedTuple of outputs (described in `TransformconvertOutputs`).
262
250
  """
251
+ runner = runner or get_global_runner()
252
+ execution = runner.start_execution(TRANSFORMCONVERT_METADATA)
263
253
  params = execution.params(params)
264
254
  cargs = transformconvert_cargs(params, execution)
265
255
  ret = transformconvert_outputs(params, execution)
@@ -282,6 +272,8 @@ def transformconvert(
282
272
  runner: Runner | None = None,
283
273
  ) -> TransformconvertOutputs:
284
274
  """
275
+ transformconvert
276
+
285
277
  Convert linear transformation matrices.
286
278
 
287
279
  This command allows to convert transformation matrices provided by other
@@ -317,8 +309,6 @@ def transformconvert(
317
309
  Returns:
318
310
  NamedTuple of outputs (described in `TransformconvertOutputs`).
319
311
  """
320
- runner = runner or get_global_runner()
321
- execution = runner.start_execution(TRANSFORMCONVERT_METADATA)
322
312
  params = transformconvert_params(
323
313
  info=info,
324
314
  quiet=quiet,
@@ -332,15 +322,14 @@ def transformconvert(
332
322
  operation=operation,
333
323
  output=output,
334
324
  )
335
- return transformconvert_execute(params, execution)
325
+ return transformconvert_execute(params, runner)
336
326
 
337
327
 
338
328
  __all__ = [
339
329
  "TRANSFORMCONVERT_METADATA",
340
- "TransformconvertConfigParameters",
341
330
  "TransformconvertOutputs",
342
- "TransformconvertParameters",
343
331
  "transformconvert",
344
332
  "transformconvert_config_params",
333
+ "transformconvert_execute",
345
334
  "transformconvert_params",
346
335
  ]