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
  DIRMERGE_METADATA = Metadata(
9
- id="b2c0d4c611fef0c99c4fd927498667a5d14a0534.boutiques",
9
+ id="40d07b2a5fb8d4016b42c7968c68cb8ea4d70a1a.boutiques",
10
10
  name="dirmerge",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,34 @@ DIRMERGE_METADATA = Metadata(
14
14
 
15
15
 
16
16
  DirmergeConfigParameters = typing.TypedDict('DirmergeConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ DirmergeConfigParametersTagged = typing.TypedDict('DirmergeConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  DirmergeParameters = typing.TypedDict('DirmergeParameters', {
24
- "__STYXTYPE__": typing.Literal["dirmerge"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/dirmerge"]],
30
+ "unipolar_weight": typing.NotRequired[float | None],
31
+ "info": bool,
32
+ "quiet": bool,
33
+ "debug": bool,
34
+ "force": bool,
35
+ "nthreads": typing.NotRequired[int | None],
36
+ "config": typing.NotRequired[list[DirmergeConfigParameters] | None],
37
+ "help": bool,
38
+ "version": bool,
39
+ "subsets": int,
40
+ "bvalue_files": list[str],
41
+ "out": str,
42
+ })
43
+ DirmergeParametersTagged = typing.TypedDict('DirmergeParametersTagged', {
44
+ "@type": typing.Literal["mrtrix/dirmerge"],
25
45
  "unipolar_weight": typing.NotRequired[float | None],
26
46
  "info": bool,
27
47
  "quiet": bool,
@@ -35,45 +55,12 @@ DirmergeParameters = typing.TypedDict('DirmergeParameters', {
35
55
  "bvalue_files": list[str],
36
56
  "out": str,
37
57
  })
38
-
39
-
40
- def dyn_cargs(
41
- t: str,
42
- ) -> typing.Any:
43
- """
44
- Get build cargs function by command type.
45
-
46
- Args:
47
- t: Command type.
48
- Returns:
49
- Build cargs function.
50
- """
51
- return {
52
- "dirmerge": dirmerge_cargs,
53
- "config": dirmerge_config_cargs,
54
- }.get(t)
55
-
56
-
57
- def dyn_outputs(
58
- t: str,
59
- ) -> typing.Any:
60
- """
61
- Get build outputs function by command type.
62
-
63
- Args:
64
- t: Command type.
65
- Returns:
66
- Build outputs function.
67
- """
68
- return {
69
- "dirmerge": dirmerge_outputs,
70
- }.get(t)
71
58
 
72
59
 
73
60
  def dirmerge_config_params(
74
61
  key: str,
75
62
  value: str,
76
- ) -> DirmergeConfigParameters:
63
+ ) -> DirmergeConfigParametersTagged:
77
64
  """
78
65
  Build parameters.
79
66
 
@@ -84,7 +71,7 @@ def dirmerge_config_params(
84
71
  Parameter dictionary
85
72
  """
86
73
  params = {
87
- "__STYXTYPE__": "config",
74
+ "@type": "config",
88
75
  "key": key,
89
76
  "value": value,
90
77
  }
@@ -106,14 +93,14 @@ def dirmerge_config_cargs(
106
93
  """
107
94
  cargs = []
108
95
  cargs.append("-config")
109
- cargs.append(params.get("key"))
110
- cargs.append(params.get("value"))
96
+ cargs.append(params.get("key", None))
97
+ cargs.append(params.get("value", None))
111
98
  return cargs
112
99
 
113
100
 
114
101
  class DirmergeOutputs(typing.NamedTuple):
115
102
  """
116
- Output object returned when calling `dirmerge(...)`.
103
+ Output object returned when calling `DirmergeParameters(...)`.
117
104
  """
118
105
  root: OutputPathType
119
106
  """Output root folder. This is the root folder for all outputs."""
@@ -136,7 +123,7 @@ def dirmerge_params(
136
123
  config: list[DirmergeConfigParameters] | None = None,
137
124
  help_: bool = False,
138
125
  version: bool = False,
139
- ) -> DirmergeParameters:
126
+ ) -> DirmergeParametersTagged:
140
127
  """
141
128
  Build parameters.
142
129
 
@@ -165,7 +152,7 @@ def dirmerge_params(
165
152
  Parameter dictionary
166
153
  """
167
154
  params = {
168
- "__STYXTYPE__": "dirmerge",
155
+ "@type": "mrtrix/dirmerge",
169
156
  "info": info,
170
157
  "quiet": quiet,
171
158
  "debug": debug,
@@ -200,33 +187,33 @@ def dirmerge_cargs(
200
187
  """
201
188
  cargs = []
202
189
  cargs.append("dirmerge")
203
- if params.get("unipolar_weight") is not None:
190
+ if params.get("unipolar_weight", None) is not None:
204
191
  cargs.extend([
205
192
  "-unipolar_weight",
206
- str(params.get("unipolar_weight"))
193
+ str(params.get("unipolar_weight", None))
207
194
  ])
208
- if params.get("info"):
195
+ if params.get("info", False):
209
196
  cargs.append("-info")
210
- if params.get("quiet"):
197
+ if params.get("quiet", False):
211
198
  cargs.append("-quiet")
212
- if params.get("debug"):
199
+ if params.get("debug", False):
213
200
  cargs.append("-debug")
214
- if params.get("force"):
201
+ if params.get("force", False):
215
202
  cargs.append("-force")
216
- if params.get("nthreads") is not None:
203
+ if params.get("nthreads", None) is not None:
217
204
  cargs.extend([
218
205
  "-nthreads",
219
- str(params.get("nthreads"))
206
+ str(params.get("nthreads", None))
220
207
  ])
221
- if params.get("config") is not None:
222
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
223
- if params.get("help"):
208
+ if params.get("config", None) is not None:
209
+ cargs.extend([a for c in [dirmerge_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
210
+ if params.get("help", False):
224
211
  cargs.append("-help")
225
- if params.get("version"):
212
+ if params.get("version", False):
226
213
  cargs.append("-version")
227
- cargs.append(str(params.get("subsets")))
228
- cargs.extend(params.get("bvalue_files"))
229
- cargs.append(params.get("out"))
214
+ cargs.append(str(params.get("subsets", None)))
215
+ cargs.extend(params.get("bvalue_files", None))
216
+ cargs.append(params.get("out", None))
230
217
  return cargs
231
218
 
232
219
 
@@ -245,16 +232,18 @@ def dirmerge_outputs(
245
232
  """
246
233
  ret = DirmergeOutputs(
247
234
  root=execution.output_file("."),
248
- out=execution.output_file(params.get("out")),
235
+ out=execution.output_file(params.get("out", None)),
249
236
  )
250
237
  return ret
251
238
 
252
239
 
253
240
  def dirmerge_execute(
254
241
  params: DirmergeParameters,
255
- execution: Execution,
242
+ runner: Runner | None = None,
256
243
  ) -> DirmergeOutputs:
257
244
  """
245
+ dirmerge
246
+
258
247
  Splice / merge multiple sets of directions in such a way as to maintain
259
248
  near-optimality upon truncation.
260
249
 
@@ -270,10 +259,12 @@ def dirmerge_execute(
270
259
 
271
260
  Args:
272
261
  params: The parameters.
273
- execution: The execution object.
262
+ runner: Command runner.
274
263
  Returns:
275
264
  NamedTuple of outputs (described in `DirmergeOutputs`).
276
265
  """
266
+ runner = runner or get_global_runner()
267
+ execution = runner.start_execution(DIRMERGE_METADATA)
277
268
  params = execution.params(params)
278
269
  cargs = dirmerge_cargs(params, execution)
279
270
  ret = dirmerge_outputs(params, execution)
@@ -297,6 +288,8 @@ def dirmerge(
297
288
  runner: Runner | None = None,
298
289
  ) -> DirmergeOutputs:
299
290
  """
291
+ dirmerge
292
+
300
293
  Splice / merge multiple sets of directions in such a way as to maintain
301
294
  near-optimality upon truncation.
302
295
 
@@ -335,8 +328,6 @@ def dirmerge(
335
328
  Returns:
336
329
  NamedTuple of outputs (described in `DirmergeOutputs`).
337
330
  """
338
- runner = runner or get_global_runner()
339
- execution = runner.start_execution(DIRMERGE_METADATA)
340
331
  params = dirmerge_params(
341
332
  unipolar_weight=unipolar_weight,
342
333
  info=info,
@@ -351,15 +342,14 @@ def dirmerge(
351
342
  bvalue_files=bvalue_files,
352
343
  out=out,
353
344
  )
354
- return dirmerge_execute(params, execution)
345
+ return dirmerge_execute(params, runner)
355
346
 
356
347
 
357
348
  __all__ = [
358
349
  "DIRMERGE_METADATA",
359
- "DirmergeConfigParameters",
360
350
  "DirmergeOutputs",
361
- "DirmergeParameters",
362
351
  "dirmerge",
363
352
  "dirmerge_config_params",
353
+ "dirmerge_execute",
364
354
  "dirmerge_params",
365
355
  ]
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  DIRORDER_METADATA = Metadata(
9
- id="81e71a9c447cf1cbb6b544733eb04768520936f0.boutiques",
9
+ id="86d673e95dbb0fe3b5812cf7b1b03f9ae588651e.boutiques",
10
10
  name="dirorder",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,33 @@ DIRORDER_METADATA = Metadata(
14
14
 
15
15
 
16
16
  DirorderConfigParameters = typing.TypedDict('DirorderConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ DirorderConfigParametersTagged = typing.TypedDict('DirorderConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  DirorderParameters = typing.TypedDict('DirorderParameters', {
24
- "__STYXTYPE__": typing.Literal["dirorder"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/dirorder"]],
30
+ "cartesian": bool,
31
+ "info": bool,
32
+ "quiet": bool,
33
+ "debug": bool,
34
+ "force": bool,
35
+ "nthreads": typing.NotRequired[int | None],
36
+ "config": typing.NotRequired[list[DirorderConfigParameters] | None],
37
+ "help": bool,
38
+ "version": bool,
39
+ "input": InputPathType,
40
+ "output": str,
41
+ })
42
+ DirorderParametersTagged = typing.TypedDict('DirorderParametersTagged', {
43
+ "@type": typing.Literal["mrtrix/dirorder"],
25
44
  "cartesian": bool,
26
45
  "info": bool,
27
46
  "quiet": bool,
@@ -34,45 +53,12 @@ DirorderParameters = typing.TypedDict('DirorderParameters', {
34
53
  "input": InputPathType,
35
54
  "output": str,
36
55
  })
37
-
38
-
39
- def dyn_cargs(
40
- t: str,
41
- ) -> typing.Any:
42
- """
43
- Get build cargs function by command type.
44
-
45
- Args:
46
- t: Command type.
47
- Returns:
48
- Build cargs function.
49
- """
50
- return {
51
- "dirorder": dirorder_cargs,
52
- "config": dirorder_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
- "dirorder": dirorder_outputs,
69
- }.get(t)
70
56
 
71
57
 
72
58
  def dirorder_config_params(
73
59
  key: str,
74
60
  value: str,
75
- ) -> DirorderConfigParameters:
61
+ ) -> DirorderConfigParametersTagged:
76
62
  """
77
63
  Build parameters.
78
64
 
@@ -83,7 +69,7 @@ def dirorder_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 dirorder_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 DirorderOutputs(typing.NamedTuple):
114
100
  """
115
- Output object returned when calling `dirorder(...)`.
101
+ Output object returned when calling `DirorderParameters(...)`.
116
102
  """
117
103
  root: OutputPathType
118
104
  """Output root folder. This is the root folder for all outputs."""
@@ -132,7 +118,7 @@ def dirorder_params(
132
118
  config: list[DirorderConfigParameters] | None = None,
133
119
  help_: bool = False,
134
120
  version: bool = False,
135
- ) -> DirorderParameters:
121
+ ) -> DirorderParametersTagged:
136
122
  """
137
123
  Build parameters.
138
124
 
@@ -157,7 +143,7 @@ def dirorder_params(
157
143
  Parameter dictionary
158
144
  """
159
145
  params = {
160
- "__STYXTYPE__": "dirorder",
146
+ "@type": "mrtrix/dirorder",
161
147
  "cartesian": cartesian,
162
148
  "info": info,
163
149
  "quiet": quiet,
@@ -190,29 +176,29 @@ def dirorder_cargs(
190
176
  """
191
177
  cargs = []
192
178
  cargs.append("dirorder")
193
- if params.get("cartesian"):
179
+ if params.get("cartesian", False):
194
180
  cargs.append("-cartesian")
195
- if params.get("info"):
181
+ if params.get("info", False):
196
182
  cargs.append("-info")
197
- if params.get("quiet"):
183
+ if params.get("quiet", False):
198
184
  cargs.append("-quiet")
199
- if params.get("debug"):
185
+ if params.get("debug", False):
200
186
  cargs.append("-debug")
201
- if params.get("force"):
187
+ if params.get("force", False):
202
188
  cargs.append("-force")
203
- if params.get("nthreads") is not None:
189
+ if params.get("nthreads", None) is not None:
204
190
  cargs.extend([
205
191
  "-nthreads",
206
- str(params.get("nthreads"))
192
+ str(params.get("nthreads", None))
207
193
  ])
208
- if params.get("config") is not None:
209
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
210
- if params.get("help"):
194
+ if params.get("config", None) is not None:
195
+ cargs.extend([a for c in [dirorder_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
196
+ if params.get("help", False):
211
197
  cargs.append("-help")
212
- if params.get("version"):
198
+ if params.get("version", False):
213
199
  cargs.append("-version")
214
- cargs.append(execution.input_file(params.get("input")))
215
- cargs.append(params.get("output"))
200
+ cargs.append(execution.input_file(params.get("input", None)))
201
+ cargs.append(params.get("output", None))
216
202
  return cargs
217
203
 
218
204
 
@@ -231,16 +217,18 @@ def dirorder_outputs(
231
217
  """
232
218
  ret = DirorderOutputs(
233
219
  root=execution.output_file("."),
234
- output=execution.output_file(params.get("output")),
220
+ output=execution.output_file(params.get("output", None)),
235
221
  )
236
222
  return ret
237
223
 
238
224
 
239
225
  def dirorder_execute(
240
226
  params: DirorderParameters,
241
- execution: Execution,
227
+ runner: Runner | None = None,
242
228
  ) -> DirorderOutputs:
243
229
  """
230
+ dirorder
231
+
244
232
  Reorder a set of directions to ensure near-uniformity upon truncation.
245
233
 
246
234
  The intent of this command is to reorder a set of gradient directions such
@@ -257,10 +245,12 @@ def dirorder_execute(
257
245
 
258
246
  Args:
259
247
  params: The parameters.
260
- execution: The execution object.
248
+ runner: Command runner.
261
249
  Returns:
262
250
  NamedTuple of outputs (described in `DirorderOutputs`).
263
251
  """
252
+ runner = runner or get_global_runner()
253
+ execution = runner.start_execution(DIRORDER_METADATA)
264
254
  params = execution.params(params)
265
255
  cargs = dirorder_cargs(params, execution)
266
256
  ret = dirorder_outputs(params, execution)
@@ -283,6 +273,8 @@ def dirorder(
283
273
  runner: Runner | None = None,
284
274
  ) -> DirorderOutputs:
285
275
  """
276
+ dirorder
277
+
286
278
  Reorder a set of directions to ensure near-uniformity upon truncation.
287
279
 
288
280
  The intent of this command is to reorder a set of gradient directions such
@@ -318,8 +310,6 @@ def dirorder(
318
310
  Returns:
319
311
  NamedTuple of outputs (described in `DirorderOutputs`).
320
312
  """
321
- runner = runner or get_global_runner()
322
- execution = runner.start_execution(DIRORDER_METADATA)
323
313
  params = dirorder_params(
324
314
  cartesian=cartesian,
325
315
  info=info,
@@ -333,15 +323,14 @@ def dirorder(
333
323
  input_=input_,
334
324
  output=output,
335
325
  )
336
- return dirorder_execute(params, execution)
326
+ return dirorder_execute(params, runner)
337
327
 
338
328
 
339
329
  __all__ = [
340
330
  "DIRORDER_METADATA",
341
- "DirorderConfigParameters",
342
331
  "DirorderOutputs",
343
- "DirorderParameters",
344
332
  "dirorder",
345
333
  "dirorder_config_params",
334
+ "dirorder_execute",
346
335
  "dirorder_params",
347
336
  ]