niwrap-mrtrix 0.6.3__py3-none-any.whl → 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of niwrap-mrtrix might be problematic. Click here for more details.

Files changed (122) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +133 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +59 -68
  3. niwrap_mrtrix/mrtrix/amp2response.py +72 -77
  4. niwrap_mrtrix/mrtrix/amp2sh.py +109 -74
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +77 -79
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +52 -62
  7. niwrap_mrtrix/mrtrix/connectomestats.py +117 -104
  8. niwrap_mrtrix/mrtrix/dcmedit.py +68 -73
  9. niwrap_mrtrix/mrtrix/dcminfo.py +67 -72
  10. niwrap_mrtrix/mrtrix/dirflip.py +56 -66
  11. niwrap_mrtrix/mrtrix/dirgen.py +68 -75
  12. niwrap_mrtrix/mrtrix/dirmerge.py +56 -66
  13. niwrap_mrtrix/mrtrix/dirorder.py +53 -64
  14. niwrap_mrtrix/mrtrix/dirsplit.py +56 -66
  15. niwrap_mrtrix/mrtrix/dirstat.py +70 -75
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +67 -74
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +141 -96
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +70 -76
  19. niwrap_mrtrix/mrtrix/dwi2response.py +238 -157
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +87 -88
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +97 -95
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +67 -74
  23. niwrap_mrtrix/mrtrix/dwiextract.py +143 -99
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +89 -91
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +77 -51
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +54 -65
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +56 -66
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +62 -70
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +145 -93
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +62 -70
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +136 -69
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +61 -69
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +53 -64
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +139 -71
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +53 -64
  36. niwrap_mrtrix/mrtrix/fod2dec.py +70 -75
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +84 -85
  38. niwrap_mrtrix/mrtrix/label2colour.py +58 -67
  39. niwrap_mrtrix/mrtrix/label2mesh.py +53 -64
  40. niwrap_mrtrix/mrtrix/labelconvert.py +58 -67
  41. niwrap_mrtrix/mrtrix/labelstats.py +53 -63
  42. niwrap_mrtrix/mrtrix/maskdump.py +52 -64
  43. niwrap_mrtrix/mrtrix/maskfilter.py +93 -61
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +53 -64
  45. niwrap_mrtrix/mrtrix/meshconvert.py +66 -73
  46. niwrap_mrtrix/mrtrix/meshfilter.py +59 -68
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +62 -70
  48. niwrap_mrtrix/mrtrix/mrcalc.py +522 -397
  49. niwrap_mrtrix/mrtrix/mrcat.py +59 -68
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +53 -63
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +58 -67
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +119 -105
  53. niwrap_mrtrix/mrtrix/mrcolour.py +62 -70
  54. niwrap_mrtrix/mrtrix/mrconvert.py +275 -173
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +66 -73
  56. niwrap_mrtrix/mrtrix/mrdump.py +55 -66
  57. niwrap_mrtrix/mrtrix/mredit.py +97 -94
  58. niwrap_mrtrix/mrtrix/mrfilter.py +124 -81
  59. niwrap_mrtrix/mrtrix/mrgrid.py +131 -88
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +64 -71
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +64 -71
  62. niwrap_mrtrix/mrtrix/mrinfo.py +160 -137
  63. niwrap_mrtrix/mrtrix/mrmath.py +65 -73
  64. niwrap_mrtrix/mrtrix/mrmetric.py +69 -73
  65. niwrap_mrtrix/mrtrix/mrregister.py +263 -212
  66. niwrap_mrtrix/mrtrix/mrstats.py +66 -72
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +80 -81
  68. niwrap_mrtrix/mrtrix/mrtransform.py +162 -109
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +85 -88
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +51 -63
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +54 -65
  72. niwrap_mrtrix/mrtrix/responsemean.py +51 -62
  73. niwrap_mrtrix/mrtrix/sh2amp.py +98 -65
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +81 -83
  75. niwrap_mrtrix/mrtrix/sh2power.py +53 -64
  76. niwrap_mrtrix/mrtrix/sh2response.py +62 -70
  77. niwrap_mrtrix/mrtrix/shbasis.py +51 -62
  78. niwrap_mrtrix/mrtrix/shconv.py +78 -52
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +93 -88
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +57 -65
  81. niwrap_mrtrix/mrtrix/tckconvert.py +99 -65
  82. niwrap_mrtrix/mrtrix/tckdfc.py +82 -83
  83. niwrap_mrtrix/mrtrix/tckedit.py +240 -122
  84. niwrap_mrtrix/mrtrix/tckgen.py +364 -207
  85. niwrap_mrtrix/mrtrix/tckglobal.py +127 -115
  86. niwrap_mrtrix/mrtrix/tckinfo.py +50 -61
  87. niwrap_mrtrix/mrtrix/tckmap.py +121 -79
  88. niwrap_mrtrix/mrtrix/tckresample.py +97 -93
  89. niwrap_mrtrix/mrtrix/tcksample.py +62 -69
  90. niwrap_mrtrix/mrtrix/tcksift.py +102 -97
  91. niwrap_mrtrix/mrtrix/tcksift2.py +119 -107
  92. niwrap_mrtrix/mrtrix/tckstats.py +72 -78
  93. niwrap_mrtrix/mrtrix/tcktransform.py +53 -64
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +93 -94
  95. niwrap_mrtrix/mrtrix/transformcalc.py +53 -64
  96. niwrap_mrtrix/mrtrix/transformcompose.py +74 -48
  97. niwrap_mrtrix/mrtrix/transformconvert.py +53 -64
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +53 -64
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +53 -63
  100. niwrap_mrtrix/mrtrix/tsfmult.py +51 -63
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +54 -65
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +55 -65
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +50 -61
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +54 -65
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +69 -75
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +51 -62
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +73 -79
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +132 -86
  109. niwrap_mrtrix/mrtrix/vectorstats.py +92 -88
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +54 -63
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +56 -66
  112. niwrap_mrtrix/mrtrix/warp2metric.py +71 -77
  113. niwrap_mrtrix/mrtrix/warpconvert.py +61 -69
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +61 -71
  115. niwrap_mrtrix/mrtrix/warpinit.py +51 -63
  116. niwrap_mrtrix/mrtrix/warpinvert.py +56 -66
  117. niwrap_mrtrix-0.7.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.7.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.7.0.dist-info/WHEEL +4 -0
  120. niwrap_mrtrix-0.6.3.dist-info/METADATA +0 -8
  121. niwrap_mrtrix-0.6.3.dist-info/RECORD +0 -119
  122. niwrap_mrtrix-0.6.3.dist-info/WHEEL +0 -4
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MRINFO_METADATA = Metadata(
9
- id="5dc17d2a1d5fe47e79268addf324166471b53837.boutiques",
9
+ id="8282cf2096dd2c6c171488cc71738cd947e2697c.boutiques",
10
10
  name="mrinfo",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,41 +14,104 @@ MRINFO_METADATA = Metadata(
14
14
 
15
15
 
16
16
  MrinfoPropertyParameters = typing.TypedDict('MrinfoPropertyParameters', {
17
- "__STYXTYPE__": typing.Literal["property"],
17
+ "@type": typing.NotRequired[typing.Literal["property"]],
18
+ "key": str,
19
+ })
20
+ MrinfoPropertyParametersTagged = typing.TypedDict('MrinfoPropertyParametersTagged', {
21
+ "@type": typing.Literal["property"],
18
22
  "key": str,
19
23
  })
20
24
 
21
25
 
22
26
  MrinfoFslgradParameters = typing.TypedDict('MrinfoFslgradParameters', {
23
- "__STYXTYPE__": typing.Literal["fslgrad"],
27
+ "@type": typing.NotRequired[typing.Literal["fslgrad"]],
28
+ "bvecs": InputPathType,
29
+ "bvals": InputPathType,
30
+ })
31
+ MrinfoFslgradParametersTagged = typing.TypedDict('MrinfoFslgradParametersTagged', {
32
+ "@type": typing.Literal["fslgrad"],
24
33
  "bvecs": InputPathType,
25
34
  "bvals": InputPathType,
26
35
  })
27
36
 
28
37
 
29
38
  MrinfoExportGradFslParameters = typing.TypedDict('MrinfoExportGradFslParameters', {
30
- "__STYXTYPE__": typing.Literal["export_grad_fsl"],
39
+ "@type": typing.NotRequired[typing.Literal["export_grad_fsl"]],
40
+ "bvecs_path": str,
41
+ "bvals_path": str,
42
+ })
43
+ MrinfoExportGradFslParametersTagged = typing.TypedDict('MrinfoExportGradFslParametersTagged', {
44
+ "@type": typing.Literal["export_grad_fsl"],
31
45
  "bvecs_path": str,
32
46
  "bvals_path": str,
33
47
  })
34
48
 
35
49
 
36
50
  MrinfoExportPeEddyParameters = typing.TypedDict('MrinfoExportPeEddyParameters', {
37
- "__STYXTYPE__": typing.Literal["export_pe_eddy"],
51
+ "@type": typing.NotRequired[typing.Literal["export_pe_eddy"]],
52
+ "config": str,
53
+ "indices": str,
54
+ })
55
+ MrinfoExportPeEddyParametersTagged = typing.TypedDict('MrinfoExportPeEddyParametersTagged', {
56
+ "@type": typing.Literal["export_pe_eddy"],
38
57
  "config": str,
39
58
  "indices": str,
40
59
  })
41
60
 
42
61
 
43
62
  MrinfoConfigParameters = typing.TypedDict('MrinfoConfigParameters', {
44
- "__STYXTYPE__": typing.Literal["config"],
63
+ "@type": typing.NotRequired[typing.Literal["config"]],
64
+ "key": str,
65
+ "value": str,
66
+ })
67
+ MrinfoConfigParametersTagged = typing.TypedDict('MrinfoConfigParametersTagged', {
68
+ "@type": typing.Literal["config"],
45
69
  "key": str,
46
70
  "value": str,
47
71
  })
48
72
 
49
73
 
50
74
  MrinfoParameters = typing.TypedDict('MrinfoParameters', {
51
- "__STYXTYPE__": typing.Literal["mrinfo"],
75
+ "@type": typing.NotRequired[typing.Literal["mrtrix/mrinfo"]],
76
+ "all": bool,
77
+ "name": bool,
78
+ "format": bool,
79
+ "ndim": bool,
80
+ "size": bool,
81
+ "spacing": bool,
82
+ "datatype": bool,
83
+ "strides": bool,
84
+ "offset": bool,
85
+ "multiplier": bool,
86
+ "transform": bool,
87
+ "property": typing.NotRequired[list[MrinfoPropertyParameters] | None],
88
+ "json_keyval": typing.NotRequired[str | None],
89
+ "json_all": typing.NotRequired[str | None],
90
+ "grad": typing.NotRequired[InputPathType | None],
91
+ "fslgrad": typing.NotRequired[MrinfoFslgradParameters | None],
92
+ "bvalue_scaling": typing.NotRequired[str | None],
93
+ "export_grad_mrtrix": typing.NotRequired[str | None],
94
+ "export_grad_fsl": typing.NotRequired[MrinfoExportGradFslParameters | None],
95
+ "dwgrad": bool,
96
+ "shell_bvalues": bool,
97
+ "shell_sizes": bool,
98
+ "shell_indices": bool,
99
+ "export_pe_table": typing.NotRequired[str | None],
100
+ "export_pe_eddy": typing.NotRequired[MrinfoExportPeEddyParameters | None],
101
+ "petable": bool,
102
+ "nodelete": bool,
103
+ "info": bool,
104
+ "quiet": bool,
105
+ "debug": bool,
106
+ "force": bool,
107
+ "nthreads": typing.NotRequired[int | None],
108
+ "config": typing.NotRequired[list[MrinfoConfigParameters] | None],
109
+ "help": bool,
110
+ "version": bool,
111
+ "image": list[InputPathType],
112
+ })
113
+ MrinfoParametersTagged = typing.TypedDict('MrinfoParametersTagged', {
114
+ "@type": typing.Literal["mrtrix/mrinfo"],
52
115
  "all": bool,
53
116
  "name": bool,
54
117
  "format": bool,
@@ -86,50 +149,11 @@ MrinfoParameters = typing.TypedDict('MrinfoParameters', {
86
149
  "version": bool,
87
150
  "image": list[InputPathType],
88
151
  })
89
-
90
-
91
- def dyn_cargs(
92
- t: str,
93
- ) -> typing.Any:
94
- """
95
- Get build cargs function by command type.
96
-
97
- Args:
98
- t: Command type.
99
- Returns:
100
- Build cargs function.
101
- """
102
- return {
103
- "mrinfo": mrinfo_cargs,
104
- "property": mrinfo_property_cargs,
105
- "fslgrad": mrinfo_fslgrad_cargs,
106
- "export_grad_fsl": mrinfo_export_grad_fsl_cargs,
107
- "export_pe_eddy": mrinfo_export_pe_eddy_cargs,
108
- "config": mrinfo_config_cargs,
109
- }.get(t)
110
-
111
-
112
- def dyn_outputs(
113
- t: str,
114
- ) -> typing.Any:
115
- """
116
- Get build outputs function by command type.
117
-
118
- Args:
119
- t: Command type.
120
- Returns:
121
- Build outputs function.
122
- """
123
- return {
124
- "mrinfo": mrinfo_outputs,
125
- "export_grad_fsl": mrinfo_export_grad_fsl_outputs,
126
- "export_pe_eddy": mrinfo_export_pe_eddy_outputs,
127
- }.get(t)
128
152
 
129
153
 
130
154
  def mrinfo_property_params(
131
155
  key: str,
132
- ) -> MrinfoPropertyParameters:
156
+ ) -> MrinfoPropertyParametersTagged:
133
157
  """
134
158
  Build parameters.
135
159
 
@@ -140,7 +164,7 @@ def mrinfo_property_params(
140
164
  Parameter dictionary
141
165
  """
142
166
  params = {
143
- "__STYXTYPE__": "property",
167
+ "@type": "property",
144
168
  "key": key,
145
169
  }
146
170
  return params
@@ -161,14 +185,14 @@ def mrinfo_property_cargs(
161
185
  """
162
186
  cargs = []
163
187
  cargs.append("-property")
164
- cargs.append(params.get("key"))
188
+ cargs.append(params.get("key", None))
165
189
  return cargs
166
190
 
167
191
 
168
192
  def mrinfo_fslgrad_params(
169
193
  bvecs: InputPathType,
170
194
  bvals: InputPathType,
171
- ) -> MrinfoFslgradParameters:
195
+ ) -> MrinfoFslgradParametersTagged:
172
196
  """
173
197
  Build parameters.
174
198
 
@@ -185,7 +209,7 @@ def mrinfo_fslgrad_params(
185
209
  Parameter dictionary
186
210
  """
187
211
  params = {
188
- "__STYXTYPE__": "fslgrad",
212
+ "@type": "fslgrad",
189
213
  "bvecs": bvecs,
190
214
  "bvals": bvals,
191
215
  }
@@ -207,8 +231,8 @@ def mrinfo_fslgrad_cargs(
207
231
  """
208
232
  cargs = []
209
233
  cargs.append("-fslgrad")
210
- cargs.append(execution.input_file(params.get("bvecs")))
211
- cargs.append(execution.input_file(params.get("bvals")))
234
+ cargs.append(execution.input_file(params.get("bvecs", None)))
235
+ cargs.append(execution.input_file(params.get("bvals", None)))
212
236
  return cargs
213
237
 
214
238
 
@@ -229,7 +253,7 @@ class MrinfoExportGradFslOutputs(typing.NamedTuple):
229
253
  def mrinfo_export_grad_fsl_params(
230
254
  bvecs_path: str,
231
255
  bvals_path: str,
232
- ) -> MrinfoExportGradFslParameters:
256
+ ) -> MrinfoExportGradFslParametersTagged:
233
257
  """
234
258
  Build parameters.
235
259
 
@@ -242,7 +266,7 @@ def mrinfo_export_grad_fsl_params(
242
266
  Parameter dictionary
243
267
  """
244
268
  params = {
245
- "__STYXTYPE__": "export_grad_fsl",
269
+ "@type": "export_grad_fsl",
246
270
  "bvecs_path": bvecs_path,
247
271
  "bvals_path": bvals_path,
248
272
  }
@@ -264,8 +288,8 @@ def mrinfo_export_grad_fsl_cargs(
264
288
  """
265
289
  cargs = []
266
290
  cargs.append("-export_grad_fsl")
267
- cargs.append(params.get("bvecs_path"))
268
- cargs.append(params.get("bvals_path"))
291
+ cargs.append(params.get("bvecs_path", None))
292
+ cargs.append(params.get("bvals_path", None))
269
293
  return cargs
270
294
 
271
295
 
@@ -284,8 +308,8 @@ def mrinfo_export_grad_fsl_outputs(
284
308
  """
285
309
  ret = MrinfoExportGradFslOutputs(
286
310
  root=execution.output_file("."),
287
- bvecs_path=execution.output_file(params.get("bvecs_path")),
288
- bvals_path=execution.output_file(params.get("bvals_path")),
311
+ bvecs_path=execution.output_file(params.get("bvecs_path", None)),
312
+ bvals_path=execution.output_file(params.get("bvals_path", None)),
289
313
  )
290
314
  return ret
291
315
 
@@ -307,7 +331,7 @@ class MrinfoExportPeEddyOutputs(typing.NamedTuple):
307
331
  def mrinfo_export_pe_eddy_params(
308
332
  config: str,
309
333
  indices: str,
310
- ) -> MrinfoExportPeEddyParameters:
334
+ ) -> MrinfoExportPeEddyParametersTagged:
311
335
  """
312
336
  Build parameters.
313
337
 
@@ -320,7 +344,7 @@ def mrinfo_export_pe_eddy_params(
320
344
  Parameter dictionary
321
345
  """
322
346
  params = {
323
- "__STYXTYPE__": "export_pe_eddy",
347
+ "@type": "export_pe_eddy",
324
348
  "config": config,
325
349
  "indices": indices,
326
350
  }
@@ -342,8 +366,8 @@ def mrinfo_export_pe_eddy_cargs(
342
366
  """
343
367
  cargs = []
344
368
  cargs.append("-export_pe_eddy")
345
- cargs.append(params.get("config"))
346
- cargs.append(params.get("indices"))
369
+ cargs.append(params.get("config", None))
370
+ cargs.append(params.get("indices", None))
347
371
  return cargs
348
372
 
349
373
 
@@ -362,8 +386,8 @@ def mrinfo_export_pe_eddy_outputs(
362
386
  """
363
387
  ret = MrinfoExportPeEddyOutputs(
364
388
  root=execution.output_file("."),
365
- config=execution.output_file(params.get("config")),
366
- indices=execution.output_file(params.get("indices")),
389
+ config=execution.output_file(params.get("config", None)),
390
+ indices=execution.output_file(params.get("indices", None)),
367
391
  )
368
392
  return ret
369
393
 
@@ -371,7 +395,7 @@ def mrinfo_export_pe_eddy_outputs(
371
395
  def mrinfo_config_params(
372
396
  key: str,
373
397
  value: str,
374
- ) -> MrinfoConfigParameters:
398
+ ) -> MrinfoConfigParametersTagged:
375
399
  """
376
400
  Build parameters.
377
401
 
@@ -382,7 +406,7 @@ def mrinfo_config_params(
382
406
  Parameter dictionary
383
407
  """
384
408
  params = {
385
- "__STYXTYPE__": "config",
409
+ "@type": "config",
386
410
  "key": key,
387
411
  "value": value,
388
412
  }
@@ -404,14 +428,14 @@ def mrinfo_config_cargs(
404
428
  """
405
429
  cargs = []
406
430
  cargs.append("-config")
407
- cargs.append(params.get("key"))
408
- cargs.append(params.get("value"))
431
+ cargs.append(params.get("key", None))
432
+ cargs.append(params.get("value", None))
409
433
  return cargs
410
434
 
411
435
 
412
436
  class MrinfoOutputs(typing.NamedTuple):
413
437
  """
414
- Output object returned when calling `mrinfo(...)`.
438
+ Output object returned when calling `MrinfoParameters(...)`.
415
439
  """
416
440
  root: OutputPathType
417
441
  """Output root folder. This is the root folder for all outputs."""
@@ -466,7 +490,7 @@ def mrinfo_params(
466
490
  config: list[MrinfoConfigParameters] | None = None,
467
491
  help_: bool = False,
468
492
  version: bool = False,
469
- ) -> MrinfoParameters:
493
+ ) -> MrinfoParametersTagged:
470
494
  """
471
495
  Build parameters.
472
496
 
@@ -532,7 +556,7 @@ def mrinfo_params(
532
556
  Parameter dictionary
533
557
  """
534
558
  params = {
535
- "__STYXTYPE__": "mrinfo",
559
+ "@type": "mrtrix/mrinfo",
536
560
  "all": all_,
537
561
  "name": name,
538
562
  "format": format_,
@@ -600,98 +624,98 @@ def mrinfo_cargs(
600
624
  """
601
625
  cargs = []
602
626
  cargs.append("mrinfo")
603
- if params.get("all"):
627
+ if params.get("all", False):
604
628
  cargs.append("-all")
605
- if params.get("name"):
629
+ if params.get("name", False):
606
630
  cargs.append("-name")
607
- if params.get("format"):
631
+ if params.get("format", False):
608
632
  cargs.append("-format")
609
- if params.get("ndim"):
633
+ if params.get("ndim", False):
610
634
  cargs.append("-ndim")
611
- if params.get("size"):
635
+ if params.get("size", False):
612
636
  cargs.append("-size")
613
- if params.get("spacing"):
637
+ if params.get("spacing", False):
614
638
  cargs.append("-spacing")
615
- if params.get("datatype"):
639
+ if params.get("datatype", False):
616
640
  cargs.append("-datatype")
617
- if params.get("strides"):
641
+ if params.get("strides", False):
618
642
  cargs.append("-strides")
619
- if params.get("offset"):
643
+ if params.get("offset", False):
620
644
  cargs.append("-offset")
621
- if params.get("multiplier"):
645
+ if params.get("multiplier", False):
622
646
  cargs.append("-multiplier")
623
- if params.get("transform"):
647
+ if params.get("transform", False):
624
648
  cargs.append("-transform")
625
- if params.get("property") is not None:
626
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("property")] for a in c])
627
- if params.get("json_keyval") is not None:
649
+ if params.get("property", None) is not None:
650
+ cargs.extend([a for c in [mrinfo_property_cargs(s, execution) for s in params.get("property", None)] for a in c])
651
+ if params.get("json_keyval", None) is not None:
628
652
  cargs.extend([
629
653
  "-json_keyval",
630
- params.get("json_keyval")
654
+ params.get("json_keyval", None)
631
655
  ])
632
- if params.get("json_all") is not None:
656
+ if params.get("json_all", None) is not None:
633
657
  cargs.extend([
634
658
  "-json_all",
635
- params.get("json_all")
659
+ params.get("json_all", None)
636
660
  ])
637
- if params.get("grad") is not None:
661
+ if params.get("grad", None) is not None:
638
662
  cargs.extend([
639
663
  "-grad",
640
- execution.input_file(params.get("grad"))
664
+ execution.input_file(params.get("grad", None))
641
665
  ])
642
- if params.get("fslgrad") is not None:
643
- cargs.extend(dyn_cargs(params.get("fslgrad")["__STYXTYPE__"])(params.get("fslgrad"), execution))
644
- if params.get("bvalue_scaling") is not None:
666
+ if params.get("fslgrad", None) is not None:
667
+ cargs.extend(mrinfo_fslgrad_cargs(params.get("fslgrad", None), execution))
668
+ if params.get("bvalue_scaling", None) is not None:
645
669
  cargs.extend([
646
670
  "-bvalue_scaling",
647
- params.get("bvalue_scaling")
671
+ params.get("bvalue_scaling", None)
648
672
  ])
649
- if params.get("export_grad_mrtrix") is not None:
673
+ if params.get("export_grad_mrtrix", None) is not None:
650
674
  cargs.extend([
651
675
  "-export_grad_mrtrix",
652
- params.get("export_grad_mrtrix")
676
+ params.get("export_grad_mrtrix", None)
653
677
  ])
654
- if params.get("export_grad_fsl") is not None:
655
- cargs.extend(dyn_cargs(params.get("export_grad_fsl")["__STYXTYPE__"])(params.get("export_grad_fsl"), execution))
656
- if params.get("dwgrad"):
678
+ if params.get("export_grad_fsl", None) is not None:
679
+ cargs.extend(mrinfo_export_grad_fsl_cargs(params.get("export_grad_fsl", None), execution))
680
+ if params.get("dwgrad", False):
657
681
  cargs.append("-dwgrad")
658
- if params.get("shell_bvalues"):
682
+ if params.get("shell_bvalues", False):
659
683
  cargs.append("-shell_bvalues")
660
- if params.get("shell_sizes"):
684
+ if params.get("shell_sizes", False):
661
685
  cargs.append("-shell_sizes")
662
- if params.get("shell_indices"):
686
+ if params.get("shell_indices", False):
663
687
  cargs.append("-shell_indices")
664
- if params.get("export_pe_table") is not None:
688
+ if params.get("export_pe_table", None) is not None:
665
689
  cargs.extend([
666
690
  "-export_pe_table",
667
- params.get("export_pe_table")
691
+ params.get("export_pe_table", None)
668
692
  ])
669
- if params.get("export_pe_eddy") is not None:
670
- cargs.extend(dyn_cargs(params.get("export_pe_eddy")["__STYXTYPE__"])(params.get("export_pe_eddy"), execution))
671
- if params.get("petable"):
693
+ if params.get("export_pe_eddy", None) is not None:
694
+ cargs.extend(mrinfo_export_pe_eddy_cargs(params.get("export_pe_eddy", None), execution))
695
+ if params.get("petable", False):
672
696
  cargs.append("-petable")
673
- if params.get("nodelete"):
697
+ if params.get("nodelete", False):
674
698
  cargs.append("-nodelete")
675
- if params.get("info"):
699
+ if params.get("info", False):
676
700
  cargs.append("-info")
677
- if params.get("quiet"):
701
+ if params.get("quiet", False):
678
702
  cargs.append("-quiet")
679
- if params.get("debug"):
703
+ if params.get("debug", False):
680
704
  cargs.append("-debug")
681
- if params.get("force"):
705
+ if params.get("force", False):
682
706
  cargs.append("-force")
683
- if params.get("nthreads") is not None:
707
+ if params.get("nthreads", None) is not None:
684
708
  cargs.extend([
685
709
  "-nthreads",
686
- str(params.get("nthreads"))
710
+ str(params.get("nthreads", None))
687
711
  ])
688
- if params.get("config") is not None:
689
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
690
- if params.get("help"):
712
+ if params.get("config", None) is not None:
713
+ cargs.extend([a for c in [mrinfo_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
714
+ if params.get("help", False):
691
715
  cargs.append("-help")
692
- if params.get("version"):
716
+ if params.get("version", False):
693
717
  cargs.append("-version")
694
- cargs.extend([execution.input_file(f) for f in params.get("image")])
718
+ cargs.extend([execution.input_file(f) for f in params.get("image", None)])
695
719
  return cargs
696
720
 
697
721
 
@@ -710,21 +734,23 @@ def mrinfo_outputs(
710
734
  """
711
735
  ret = MrinfoOutputs(
712
736
  root=execution.output_file("."),
713
- json_keyval=execution.output_file(params.get("json_keyval")) if (params.get("json_keyval") is not None) else None,
714
- json_all=execution.output_file(params.get("json_all")) if (params.get("json_all") is not None) else None,
715
- export_grad_mrtrix=execution.output_file(params.get("export_grad_mrtrix")) if (params.get("export_grad_mrtrix") is not None) else None,
716
- export_pe_table=execution.output_file(params.get("export_pe_table")) if (params.get("export_pe_table") is not None) else None,
717
- export_grad_fsl=dyn_outputs(params.get("export_grad_fsl")["__STYXTYPE__"])(params.get("export_grad_fsl"), execution) if params.get("export_grad_fsl") else None,
718
- export_pe_eddy=dyn_outputs(params.get("export_pe_eddy")["__STYXTYPE__"])(params.get("export_pe_eddy"), execution) if params.get("export_pe_eddy") else None,
737
+ json_keyval=execution.output_file(params.get("json_keyval", None)) if (params.get("json_keyval") is not None) else None,
738
+ json_all=execution.output_file(params.get("json_all", None)) if (params.get("json_all") is not None) else None,
739
+ export_grad_mrtrix=execution.output_file(params.get("export_grad_mrtrix", None)) if (params.get("export_grad_mrtrix") is not None) else None,
740
+ export_pe_table=execution.output_file(params.get("export_pe_table", None)) if (params.get("export_pe_table") is not None) else None,
741
+ export_grad_fsl=mrinfo_export_grad_fsl_outputs(params.get("export_grad_fsl"), execution) if params.get("export_grad_fsl") else None,
742
+ export_pe_eddy=mrinfo_export_pe_eddy_outputs(params.get("export_pe_eddy"), execution) if params.get("export_pe_eddy") else None,
719
743
  )
720
744
  return ret
721
745
 
722
746
 
723
747
  def mrinfo_execute(
724
748
  params: MrinfoParameters,
725
- execution: Execution,
749
+ runner: Runner | None = None,
726
750
  ) -> MrinfoOutputs:
727
751
  """
752
+ mrinfo
753
+
728
754
  Display image header information, or extract specific information from the
729
755
  header.
730
756
 
@@ -770,10 +796,12 @@ def mrinfo_execute(
770
796
 
771
797
  Args:
772
798
  params: The parameters.
773
- execution: The execution object.
799
+ runner: Command runner.
774
800
  Returns:
775
801
  NamedTuple of outputs (described in `MrinfoOutputs`).
776
802
  """
803
+ runner = runner or get_global_runner()
804
+ execution = runner.start_execution(MRINFO_METADATA)
777
805
  params = execution.params(params)
778
806
  cargs = mrinfo_cargs(params, execution)
779
807
  ret = mrinfo_outputs(params, execution)
@@ -821,6 +849,8 @@ def mrinfo(
821
849
  runner: Runner | None = None,
822
850
  ) -> MrinfoOutputs:
823
851
  """
852
+ mrinfo
853
+
824
854
  Display image header information, or extract specific information from the
825
855
  header.
826
856
 
@@ -926,8 +956,6 @@ def mrinfo(
926
956
  Returns:
927
957
  NamedTuple of outputs (described in `MrinfoOutputs`).
928
958
  """
929
- runner = runner or get_global_runner()
930
- execution = runner.start_execution(MRINFO_METADATA)
931
959
  params = mrinfo_params(
932
960
  all_=all_,
933
961
  name=name,
@@ -966,22 +994,17 @@ def mrinfo(
966
994
  version=version,
967
995
  image=image,
968
996
  )
969
- return mrinfo_execute(params, execution)
997
+ return mrinfo_execute(params, runner)
970
998
 
971
999
 
972
1000
  __all__ = [
973
1001
  "MRINFO_METADATA",
974
- "MrinfoConfigParameters",
975
1002
  "MrinfoExportGradFslOutputs",
976
- "MrinfoExportGradFslParameters",
977
1003
  "MrinfoExportPeEddyOutputs",
978
- "MrinfoExportPeEddyParameters",
979
- "MrinfoFslgradParameters",
980
1004
  "MrinfoOutputs",
981
- "MrinfoParameters",
982
- "MrinfoPropertyParameters",
983
1005
  "mrinfo",
984
1006
  "mrinfo_config_params",
1007
+ "mrinfo_execute",
985
1008
  "mrinfo_export_grad_fsl_params",
986
1009
  "mrinfo_export_pe_eddy_params",
987
1010
  "mrinfo_fslgrad_params",