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
  MRHISTMATCH_METADATA = Metadata(
9
- id="206ca9f93c734ef895b607551ad543417dfac1ae.boutiques",
9
+ id="1798cd7ea1a79d9523cf1fd1a7ec35b94aa4a5ab.boutiques",
10
10
  name="mrhistmatch",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,37 @@ MRHISTMATCH_METADATA = Metadata(
14
14
 
15
15
 
16
16
  MrhistmatchConfigParameters = typing.TypedDict('MrhistmatchConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ MrhistmatchConfigParametersTagged = typing.TypedDict('MrhistmatchConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  MrhistmatchParameters = typing.TypedDict('MrhistmatchParameters', {
24
- "__STYXTYPE__": typing.Literal["mrhistmatch"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/mrhistmatch"]],
30
+ "mask_input": typing.NotRequired[InputPathType | None],
31
+ "mask_target": typing.NotRequired[InputPathType | None],
32
+ "bins": typing.NotRequired[int | None],
33
+ "info": bool,
34
+ "quiet": bool,
35
+ "debug": bool,
36
+ "force": bool,
37
+ "nthreads": typing.NotRequired[int | None],
38
+ "config": typing.NotRequired[list[MrhistmatchConfigParameters] | None],
39
+ "help": bool,
40
+ "version": bool,
41
+ "type": str,
42
+ "input": InputPathType,
43
+ "target": InputPathType,
44
+ "output": str,
45
+ })
46
+ MrhistmatchParametersTagged = typing.TypedDict('MrhistmatchParametersTagged', {
47
+ "@type": typing.Literal["mrtrix/mrhistmatch"],
25
48
  "mask_input": typing.NotRequired[InputPathType | None],
26
49
  "mask_target": typing.NotRequired[InputPathType | None],
27
50
  "bins": typing.NotRequired[int | None],
@@ -38,45 +61,12 @@ MrhistmatchParameters = typing.TypedDict('MrhistmatchParameters', {
38
61
  "target": InputPathType,
39
62
  "output": str,
40
63
  })
41
-
42
-
43
- def dyn_cargs(
44
- t: str,
45
- ) -> typing.Any:
46
- """
47
- Get build cargs function by command type.
48
-
49
- Args:
50
- t: Command type.
51
- Returns:
52
- Build cargs function.
53
- """
54
- return {
55
- "mrhistmatch": mrhistmatch_cargs,
56
- "config": mrhistmatch_config_cargs,
57
- }.get(t)
58
-
59
-
60
- def dyn_outputs(
61
- t: str,
62
- ) -> typing.Any:
63
- """
64
- Get build outputs function by command type.
65
-
66
- Args:
67
- t: Command type.
68
- Returns:
69
- Build outputs function.
70
- """
71
- return {
72
- "mrhistmatch": mrhistmatch_outputs,
73
- }.get(t)
74
64
 
75
65
 
76
66
  def mrhistmatch_config_params(
77
67
  key: str,
78
68
  value: str,
79
- ) -> MrhistmatchConfigParameters:
69
+ ) -> MrhistmatchConfigParametersTagged:
80
70
  """
81
71
  Build parameters.
82
72
 
@@ -87,7 +77,7 @@ def mrhistmatch_config_params(
87
77
  Parameter dictionary
88
78
  """
89
79
  params = {
90
- "__STYXTYPE__": "config",
80
+ "@type": "config",
91
81
  "key": key,
92
82
  "value": value,
93
83
  }
@@ -109,14 +99,14 @@ def mrhistmatch_config_cargs(
109
99
  """
110
100
  cargs = []
111
101
  cargs.append("-config")
112
- cargs.append(params.get("key"))
113
- cargs.append(params.get("value"))
102
+ cargs.append(params.get("key", None))
103
+ cargs.append(params.get("value", None))
114
104
  return cargs
115
105
 
116
106
 
117
107
  class MrhistmatchOutputs(typing.NamedTuple):
118
108
  """
119
- Output object returned when calling `mrhistmatch(...)`.
109
+ Output object returned when calling `MrhistmatchParameters(...)`.
120
110
  """
121
111
  root: OutputPathType
122
112
  """Output root folder. This is the root folder for all outputs."""
@@ -140,7 +130,7 @@ def mrhistmatch_params(
140
130
  config: list[MrhistmatchConfigParameters] | None = None,
141
131
  help_: bool = False,
142
132
  version: bool = False,
143
- ) -> MrhistmatchParameters:
133
+ ) -> MrhistmatchParametersTagged:
144
134
  """
145
135
  Build parameters.
146
136
 
@@ -171,7 +161,7 @@ def mrhistmatch_params(
171
161
  Parameter dictionary
172
162
  """
173
163
  params = {
174
- "__STYXTYPE__": "mrhistmatch",
164
+ "@type": "mrtrix/mrhistmatch",
175
165
  "info": info,
176
166
  "quiet": quiet,
177
167
  "debug": debug,
@@ -211,44 +201,44 @@ def mrhistmatch_cargs(
211
201
  """
212
202
  cargs = []
213
203
  cargs.append("mrhistmatch")
214
- if params.get("mask_input") is not None:
204
+ if params.get("mask_input", None) is not None:
215
205
  cargs.extend([
216
206
  "-mask_input",
217
- execution.input_file(params.get("mask_input"))
207
+ execution.input_file(params.get("mask_input", None))
218
208
  ])
219
- if params.get("mask_target") is not None:
209
+ if params.get("mask_target", None) is not None:
220
210
  cargs.extend([
221
211
  "-mask_target",
222
- execution.input_file(params.get("mask_target"))
212
+ execution.input_file(params.get("mask_target", None))
223
213
  ])
224
- if params.get("bins") is not None:
214
+ if params.get("bins", None) is not None:
225
215
  cargs.extend([
226
216
  "-bins",
227
- str(params.get("bins"))
217
+ str(params.get("bins", None))
228
218
  ])
229
- if params.get("info"):
219
+ if params.get("info", False):
230
220
  cargs.append("-info")
231
- if params.get("quiet"):
221
+ if params.get("quiet", False):
232
222
  cargs.append("-quiet")
233
- if params.get("debug"):
223
+ if params.get("debug", False):
234
224
  cargs.append("-debug")
235
- if params.get("force"):
225
+ if params.get("force", False):
236
226
  cargs.append("-force")
237
- if params.get("nthreads") is not None:
227
+ if params.get("nthreads", None) is not None:
238
228
  cargs.extend([
239
229
  "-nthreads",
240
- str(params.get("nthreads"))
230
+ str(params.get("nthreads", None))
241
231
  ])
242
- if params.get("config") is not None:
243
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
244
- if params.get("help"):
232
+ if params.get("config", None) is not None:
233
+ cargs.extend([a for c in [mrhistmatch_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
234
+ if params.get("help", False):
245
235
  cargs.append("-help")
246
- if params.get("version"):
236
+ if params.get("version", False):
247
237
  cargs.append("-version")
248
- cargs.append(params.get("type"))
249
- cargs.append(execution.input_file(params.get("input")))
250
- cargs.append(execution.input_file(params.get("target")))
251
- cargs.append(params.get("output"))
238
+ cargs.append(params.get("type", None))
239
+ cargs.append(execution.input_file(params.get("input", None)))
240
+ cargs.append(execution.input_file(params.get("target", None)))
241
+ cargs.append(params.get("output", None))
252
242
  return cargs
253
243
 
254
244
 
@@ -267,16 +257,18 @@ def mrhistmatch_outputs(
267
257
  """
268
258
  ret = MrhistmatchOutputs(
269
259
  root=execution.output_file("."),
270
- output=execution.output_file(params.get("output")),
260
+ output=execution.output_file(params.get("output", None)),
271
261
  )
272
262
  return ret
273
263
 
274
264
 
275
265
  def mrhistmatch_execute(
276
266
  params: MrhistmatchParameters,
277
- execution: Execution,
267
+ runner: Runner | None = None,
278
268
  ) -> MrhistmatchOutputs:
279
269
  """
270
+ mrhistmatch
271
+
280
272
  Modify the intensities of one image to match the histogram of another.
281
273
 
282
274
 
@@ -296,10 +288,12 @@ def mrhistmatch_execute(
296
288
 
297
289
  Args:
298
290
  params: The parameters.
299
- execution: The execution object.
291
+ runner: Command runner.
300
292
  Returns:
301
293
  NamedTuple of outputs (described in `MrhistmatchOutputs`).
302
294
  """
295
+ runner = runner or get_global_runner()
296
+ execution = runner.start_execution(MRHISTMATCH_METADATA)
303
297
  params = execution.params(params)
304
298
  cargs = mrhistmatch_cargs(params, execution)
305
299
  ret = mrhistmatch_outputs(params, execution)
@@ -326,6 +320,8 @@ def mrhistmatch(
326
320
  runner: Runner | None = None,
327
321
  ) -> MrhistmatchOutputs:
328
322
  """
323
+ mrhistmatch
324
+
329
325
  Modify the intensities of one image to match the histogram of another.
330
326
 
331
327
 
@@ -370,8 +366,6 @@ def mrhistmatch(
370
366
  Returns:
371
367
  NamedTuple of outputs (described in `MrhistmatchOutputs`).
372
368
  """
373
- runner = runner or get_global_runner()
374
- execution = runner.start_execution(MRHISTMATCH_METADATA)
375
369
  params = mrhistmatch_params(
376
370
  mask_input=mask_input,
377
371
  mask_target=mask_target,
@@ -389,15 +383,14 @@ def mrhistmatch(
389
383
  target=target,
390
384
  output=output,
391
385
  )
392
- return mrhistmatch_execute(params, execution)
386
+ return mrhistmatch_execute(params, runner)
393
387
 
394
388
 
395
389
  __all__ = [
396
390
  "MRHISTMATCH_METADATA",
397
- "MrhistmatchConfigParameters",
398
391
  "MrhistmatchOutputs",
399
- "MrhistmatchParameters",
400
392
  "mrhistmatch",
401
393
  "mrhistmatch_config_params",
394
+ "mrhistmatch_execute",
402
395
  "mrhistmatch_params",
403
396
  ]
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MRHISTOGRAM_METADATA = Metadata(
9
- id="ade91b73497b020ffb26e31a552c8567783427a9.boutiques",
9
+ id="5c07265a48110ef8900f48adf78d74320253b0c0.boutiques",
10
10
  name="mrhistogram",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,37 @@ MRHISTOGRAM_METADATA = Metadata(
14
14
 
15
15
 
16
16
  MrhistogramConfigParameters = typing.TypedDict('MrhistogramConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ MrhistogramConfigParametersTagged = typing.TypedDict('MrhistogramConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  MrhistogramParameters = typing.TypedDict('MrhistogramParameters', {
24
- "__STYXTYPE__": typing.Literal["mrhistogram"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/mrhistogram"]],
30
+ "bins": typing.NotRequired[int | None],
31
+ "template": typing.NotRequired[InputPathType | None],
32
+ "mask": typing.NotRequired[InputPathType | None],
33
+ "ignorezero": bool,
34
+ "allvolumes": bool,
35
+ "info": bool,
36
+ "quiet": bool,
37
+ "debug": bool,
38
+ "force": bool,
39
+ "nthreads": typing.NotRequired[int | None],
40
+ "config": typing.NotRequired[list[MrhistogramConfigParameters] | None],
41
+ "help": bool,
42
+ "version": bool,
43
+ "image": InputPathType,
44
+ "hist": str,
45
+ })
46
+ MrhistogramParametersTagged = typing.TypedDict('MrhistogramParametersTagged', {
47
+ "@type": typing.Literal["mrtrix/mrhistogram"],
25
48
  "bins": typing.NotRequired[int | None],
26
49
  "template": typing.NotRequired[InputPathType | None],
27
50
  "mask": typing.NotRequired[InputPathType | None],
@@ -38,45 +61,12 @@ MrhistogramParameters = typing.TypedDict('MrhistogramParameters', {
38
61
  "image": InputPathType,
39
62
  "hist": str,
40
63
  })
41
-
42
-
43
- def dyn_cargs(
44
- t: str,
45
- ) -> typing.Any:
46
- """
47
- Get build cargs function by command type.
48
-
49
- Args:
50
- t: Command type.
51
- Returns:
52
- Build cargs function.
53
- """
54
- return {
55
- "mrhistogram": mrhistogram_cargs,
56
- "config": mrhistogram_config_cargs,
57
- }.get(t)
58
-
59
-
60
- def dyn_outputs(
61
- t: str,
62
- ) -> typing.Any:
63
- """
64
- Get build outputs function by command type.
65
-
66
- Args:
67
- t: Command type.
68
- Returns:
69
- Build outputs function.
70
- """
71
- return {
72
- "mrhistogram": mrhistogram_outputs,
73
- }.get(t)
74
64
 
75
65
 
76
66
  def mrhistogram_config_params(
77
67
  key: str,
78
68
  value: str,
79
- ) -> MrhistogramConfigParameters:
69
+ ) -> MrhistogramConfigParametersTagged:
80
70
  """
81
71
  Build parameters.
82
72
 
@@ -87,7 +77,7 @@ def mrhistogram_config_params(
87
77
  Parameter dictionary
88
78
  """
89
79
  params = {
90
- "__STYXTYPE__": "config",
80
+ "@type": "config",
91
81
  "key": key,
92
82
  "value": value,
93
83
  }
@@ -109,14 +99,14 @@ def mrhistogram_config_cargs(
109
99
  """
110
100
  cargs = []
111
101
  cargs.append("-config")
112
- cargs.append(params.get("key"))
113
- cargs.append(params.get("value"))
102
+ cargs.append(params.get("key", None))
103
+ cargs.append(params.get("value", None))
114
104
  return cargs
115
105
 
116
106
 
117
107
  class MrhistogramOutputs(typing.NamedTuple):
118
108
  """
119
- Output object returned when calling `mrhistogram(...)`.
109
+ Output object returned when calling `MrhistogramParameters(...)`.
120
110
  """
121
111
  root: OutputPathType
122
112
  """Output root folder. This is the root folder for all outputs."""
@@ -140,7 +130,7 @@ def mrhistogram_params(
140
130
  config: list[MrhistogramConfigParameters] | None = None,
141
131
  help_: bool = False,
142
132
  version: bool = False,
143
- ) -> MrhistogramParameters:
133
+ ) -> MrhistogramParametersTagged:
144
134
  """
145
135
  Build parameters.
146
136
 
@@ -170,7 +160,7 @@ def mrhistogram_params(
170
160
  Parameter dictionary
171
161
  """
172
162
  params = {
173
- "__STYXTYPE__": "mrhistogram",
163
+ "@type": "mrtrix/mrhistogram",
174
164
  "ignorezero": ignorezero,
175
165
  "allvolumes": allvolumes,
176
166
  "info": info,
@@ -210,46 +200,46 @@ def mrhistogram_cargs(
210
200
  """
211
201
  cargs = []
212
202
  cargs.append("mrhistogram")
213
- if params.get("bins") is not None:
203
+ if params.get("bins", None) is not None:
214
204
  cargs.extend([
215
205
  "-bins",
216
- str(params.get("bins"))
206
+ str(params.get("bins", None))
217
207
  ])
218
- if params.get("template") is not None:
208
+ if params.get("template", None) is not None:
219
209
  cargs.extend([
220
210
  "-template",
221
- execution.input_file(params.get("template"))
211
+ execution.input_file(params.get("template", None))
222
212
  ])
223
- if params.get("mask") is not None:
213
+ if params.get("mask", None) is not None:
224
214
  cargs.extend([
225
215
  "-mask",
226
- execution.input_file(params.get("mask"))
216
+ execution.input_file(params.get("mask", None))
227
217
  ])
228
- if params.get("ignorezero"):
218
+ if params.get("ignorezero", False):
229
219
  cargs.append("-ignorezero")
230
- if params.get("allvolumes"):
220
+ if params.get("allvolumes", False):
231
221
  cargs.append("-allvolumes")
232
- if params.get("info"):
222
+ if params.get("info", False):
233
223
  cargs.append("-info")
234
- if params.get("quiet"):
224
+ if params.get("quiet", False):
235
225
  cargs.append("-quiet")
236
- if params.get("debug"):
226
+ if params.get("debug", False):
237
227
  cargs.append("-debug")
238
- if params.get("force"):
228
+ if params.get("force", False):
239
229
  cargs.append("-force")
240
- if params.get("nthreads") is not None:
230
+ if params.get("nthreads", None) is not None:
241
231
  cargs.extend([
242
232
  "-nthreads",
243
- str(params.get("nthreads"))
233
+ str(params.get("nthreads", None))
244
234
  ])
245
- if params.get("config") is not None:
246
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
247
- if params.get("help"):
235
+ if params.get("config", None) is not None:
236
+ cargs.extend([a for c in [mrhistogram_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
237
+ if params.get("help", False):
248
238
  cargs.append("-help")
249
- if params.get("version"):
239
+ if params.get("version", False):
250
240
  cargs.append("-version")
251
- cargs.append(execution.input_file(params.get("image")))
252
- cargs.append(params.get("hist"))
241
+ cargs.append(execution.input_file(params.get("image", None)))
242
+ cargs.append(params.get("hist", None))
253
243
  return cargs
254
244
 
255
245
 
@@ -268,16 +258,18 @@ def mrhistogram_outputs(
268
258
  """
269
259
  ret = MrhistogramOutputs(
270
260
  root=execution.output_file("."),
271
- hist=execution.output_file(params.get("hist")),
261
+ hist=execution.output_file(params.get("hist", None)),
272
262
  )
273
263
  return ret
274
264
 
275
265
 
276
266
  def mrhistogram_execute(
277
267
  params: MrhistogramParameters,
278
- execution: Execution,
268
+ runner: Runner | None = None,
279
269
  ) -> MrhistogramOutputs:
280
270
  """
271
+ mrhistogram
272
+
281
273
  Generate a histogram of image intensities.
282
274
 
283
275
 
@@ -292,10 +284,12 @@ def mrhistogram_execute(
292
284
 
293
285
  Args:
294
286
  params: The parameters.
295
- execution: The execution object.
287
+ runner: Command runner.
296
288
  Returns:
297
289
  NamedTuple of outputs (described in `MrhistogramOutputs`).
298
290
  """
291
+ runner = runner or get_global_runner()
292
+ execution = runner.start_execution(MRHISTOGRAM_METADATA)
299
293
  params = execution.params(params)
300
294
  cargs = mrhistogram_cargs(params, execution)
301
295
  ret = mrhistogram_outputs(params, execution)
@@ -322,6 +316,8 @@ def mrhistogram(
322
316
  runner: Runner | None = None,
323
317
  ) -> MrhistogramOutputs:
324
318
  """
319
+ mrhistogram
320
+
325
321
  Generate a histogram of image intensities.
326
322
 
327
323
 
@@ -360,8 +356,6 @@ def mrhistogram(
360
356
  Returns:
361
357
  NamedTuple of outputs (described in `MrhistogramOutputs`).
362
358
  """
363
- runner = runner or get_global_runner()
364
- execution = runner.start_execution(MRHISTOGRAM_METADATA)
365
359
  params = mrhistogram_params(
366
360
  bins=bins,
367
361
  template=template,
@@ -379,15 +373,14 @@ def mrhistogram(
379
373
  image=image,
380
374
  hist=hist,
381
375
  )
382
- return mrhistogram_execute(params, execution)
376
+ return mrhistogram_execute(params, runner)
383
377
 
384
378
 
385
379
  __all__ = [
386
380
  "MRHISTOGRAM_METADATA",
387
- "MrhistogramConfigParameters",
388
381
  "MrhistogramOutputs",
389
- "MrhistogramParameters",
390
382
  "mrhistogram",
391
383
  "mrhistogram_config_params",
384
+ "mrhistogram_execute",
392
385
  "mrhistogram_params",
393
386
  ]