niwrap-mrtrix 0.8.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.
Files changed (119) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +263 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +527 -0
  3. niwrap_mrtrix/mrtrix/amp2response.py +560 -0
  4. niwrap_mrtrix/mrtrix/amp2sh.py +870 -0
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +583 -0
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +413 -0
  7. niwrap_mrtrix/mrtrix/connectomestats.py +956 -0
  8. niwrap_mrtrix/mrtrix/dcmedit.py +552 -0
  9. niwrap_mrtrix/mrtrix/dcminfo.py +529 -0
  10. niwrap_mrtrix/mrtrix/dirflip.py +440 -0
  11. niwrap_mrtrix/mrtrix/dirgen.py +514 -0
  12. niwrap_mrtrix/mrtrix/dirmerge.py +446 -0
  13. niwrap_mrtrix/mrtrix/dirorder.py +421 -0
  14. niwrap_mrtrix/mrtrix/dirsplit.py +436 -0
  15. niwrap_mrtrix/mrtrix/dirstat.py +640 -0
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +531 -0
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +1156 -0
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +570 -0
  19. niwrap_mrtrix/mrtrix/dwi2response.py +1774 -0
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +715 -0
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +673 -0
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +570 -0
  23. niwrap_mrtrix/mrtrix/dwiextract.py +1111 -0
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +665 -0
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +613 -0
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +430 -0
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +435 -0
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +523 -0
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +1179 -0
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +477 -0
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +850 -0
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +455 -0
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +422 -0
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +882 -0
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +435 -0
  36. niwrap_mrtrix/mrtrix/fod2dec.py +571 -0
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +646 -0
  38. niwrap_mrtrix/mrtrix/label2colour.py +426 -0
  39. niwrap_mrtrix/mrtrix/label2mesh.py +417 -0
  40. niwrap_mrtrix/mrtrix/labelconvert.py +460 -0
  41. niwrap_mrtrix/mrtrix/labelstats.py +418 -0
  42. niwrap_mrtrix/mrtrix/maskdump.py +404 -0
  43. niwrap_mrtrix/mrtrix/maskfilter.py +730 -0
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +422 -0
  45. niwrap_mrtrix/mrtrix/meshconvert.py +514 -0
  46. niwrap_mrtrix/mrtrix/meshfilter.py +452 -0
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +485 -0
  48. niwrap_mrtrix/mrtrix/mrcalc.py +4302 -0
  49. niwrap_mrtrix/mrtrix/mrcat.py +467 -0
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +418 -0
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +446 -0
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +930 -0
  53. niwrap_mrtrix/mrtrix/mrcolour.py +490 -0
  54. niwrap_mrtrix/mrtrix/mrconvert.py +1967 -0
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +535 -0
  56. niwrap_mrtrix/mrtrix/mrdump.py +423 -0
  57. niwrap_mrtrix/mrtrix/mredit.py +737 -0
  58. niwrap_mrtrix/mrtrix/mrfilter.py +971 -0
  59. niwrap_mrtrix/mrtrix/mrgrid.py +1079 -0
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +494 -0
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +484 -0
  62. niwrap_mrtrix/mrtrix/mrinfo.py +1282 -0
  63. niwrap_mrtrix/mrtrix/mrmath.py +503 -0
  64. niwrap_mrtrix/mrtrix/mrmetric.py +525 -0
  65. niwrap_mrtrix/mrtrix/mrregister.py +2098 -0
  66. niwrap_mrtrix/mrtrix/mrstats.py +534 -0
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +666 -0
  68. niwrap_mrtrix/mrtrix/mrtransform.py +1372 -0
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +725 -0
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +403 -0
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +422 -0
  72. niwrap_mrtrix/mrtrix/responsemean.py +385 -0
  73. niwrap_mrtrix/mrtrix/sh2amp.py +844 -0
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +632 -0
  75. niwrap_mrtrix/mrtrix/sh2power.py +427 -0
  76. niwrap_mrtrix/mrtrix/sh2response.py +481 -0
  77. niwrap_mrtrix/mrtrix/shbasis.py +445 -0
  78. niwrap_mrtrix/mrtrix/shconv.py +661 -0
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +727 -0
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +447 -0
  81. niwrap_mrtrix/mrtrix/tckconvert.py +775 -0
  82. niwrap_mrtrix/mrtrix/tckdfc.py +684 -0
  83. niwrap_mrtrix/mrtrix/tckedit.py +1478 -0
  84. niwrap_mrtrix/mrtrix/tckgen.py +2733 -0
  85. niwrap_mrtrix/mrtrix/tckglobal.py +944 -0
  86. niwrap_mrtrix/mrtrix/tckinfo.py +402 -0
  87. niwrap_mrtrix/mrtrix/tckmap.py +1004 -0
  88. niwrap_mrtrix/mrtrix/tckresample.py +760 -0
  89. niwrap_mrtrix/mrtrix/tcksample.py +497 -0
  90. niwrap_mrtrix/mrtrix/tcksift.py +739 -0
  91. niwrap_mrtrix/mrtrix/tcksift2.py +902 -0
  92. niwrap_mrtrix/mrtrix/tckstats.py +550 -0
  93. niwrap_mrtrix/mrtrix/tcktransform.py +414 -0
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +659 -0
  95. niwrap_mrtrix/mrtrix/transformcalc.py +421 -0
  96. niwrap_mrtrix/mrtrix/transformcompose.py +625 -0
  97. niwrap_mrtrix/mrtrix/transformconvert.py +423 -0
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +414 -0
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +421 -0
  100. niwrap_mrtrix/mrtrix/tsfmult.py +401 -0
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +420 -0
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +428 -0
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +398 -0
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +432 -0
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +505 -0
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +409 -0
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +513 -0
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +1107 -0
  109. niwrap_mrtrix/mrtrix/vectorstats.py +736 -0
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +430 -0
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +454 -0
  112. niwrap_mrtrix/mrtrix/warp2metric.py +556 -0
  113. niwrap_mrtrix/mrtrix/warpconvert.py +498 -0
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +448 -0
  115. niwrap_mrtrix/mrtrix/warpinit.py +425 -0
  116. niwrap_mrtrix/mrtrix/warpinvert.py +448 -0
  117. niwrap_mrtrix-0.8.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.8.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.8.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,513 @@
1
+ # This file was auto generated by Styx.
2
+ # Do not edit this file directly.
3
+
4
+ import typing
5
+ import pathlib
6
+ from styxdefs import *
7
+
8
+ V_5TTEDIT_METADATA = Metadata(
9
+ id="600cbbcfcf2cf74592c61897ae8adbd5df0e6fdd.boutiques",
10
+ name="5ttedit",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _V5tteditConfigParamsDictNoTag = typing.TypedDict('_V5tteditConfigParamsDictNoTag', {
17
+ "key": str,
18
+ "value": str,
19
+ })
20
+ V5tteditConfigParamsDictTagged = typing.TypedDict('V5tteditConfigParamsDictTagged', {
21
+ "@type": typing.Literal["config"],
22
+ "key": str,
23
+ "value": str,
24
+ })
25
+ V5tteditConfigParamsDict = _V5tteditConfigParamsDictNoTag | V5tteditConfigParamsDictTagged
26
+
27
+
28
+ _V5tteditParamsDictNoTag = typing.TypedDict('_V5tteditParamsDictNoTag', {
29
+ "cgm": typing.NotRequired[InputPathType | None],
30
+ "sgm": typing.NotRequired[InputPathType | None],
31
+ "wm": typing.NotRequired[InputPathType | None],
32
+ "csf": typing.NotRequired[InputPathType | None],
33
+ "path": typing.NotRequired[InputPathType | None],
34
+ "none": typing.NotRequired[InputPathType | None],
35
+ "info": bool,
36
+ "quiet": bool,
37
+ "debug": bool,
38
+ "force": bool,
39
+ "nthreads": typing.NotRequired[int | None],
40
+ "config": typing.NotRequired[list[V5tteditConfigParamsDict] | None],
41
+ "help": bool,
42
+ "version": bool,
43
+ "input": InputPathType,
44
+ "output": str,
45
+ })
46
+ V5tteditParamsDictTagged = typing.TypedDict('V5tteditParamsDictTagged', {
47
+ "@type": typing.Literal["mrtrix/5ttedit"],
48
+ "cgm": typing.NotRequired[InputPathType | None],
49
+ "sgm": typing.NotRequired[InputPathType | None],
50
+ "wm": typing.NotRequired[InputPathType | None],
51
+ "csf": typing.NotRequired[InputPathType | None],
52
+ "path": typing.NotRequired[InputPathType | None],
53
+ "none": typing.NotRequired[InputPathType | None],
54
+ "info": bool,
55
+ "quiet": bool,
56
+ "debug": bool,
57
+ "force": bool,
58
+ "nthreads": typing.NotRequired[int | None],
59
+ "config": typing.NotRequired[list[V5tteditConfigParamsDict] | None],
60
+ "help": bool,
61
+ "version": bool,
62
+ "input": InputPathType,
63
+ "output": str,
64
+ })
65
+ V5tteditParamsDict = _V5tteditParamsDictNoTag | V5tteditParamsDictTagged
66
+
67
+
68
+ def v_5ttedit_config(
69
+ key: str,
70
+ value: str,
71
+ ) -> V5tteditConfigParamsDictTagged:
72
+ """
73
+ Build parameters.
74
+
75
+ Args:
76
+ key: temporarily set the value of an MRtrix config file entry.
77
+ value: temporarily set the value of an MRtrix config file entry.
78
+ Returns:
79
+ Parameter dictionary
80
+ """
81
+ params = {
82
+ "@type": "config",
83
+ "key": key,
84
+ "value": value,
85
+ }
86
+ return params
87
+
88
+
89
+ def v_5ttedit_config_validate(
90
+ params: typing.Any,
91
+ ) -> None:
92
+ """
93
+ Validate parameters. Throws an error if `params` is not a valid
94
+ `V5tteditConfigParamsDict` object.
95
+
96
+ Args:
97
+ params: The parameters object to validate.
98
+ """
99
+ if params is None or not isinstance(params, dict):
100
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
101
+ if params.get("key", None) is None:
102
+ raise StyxValidationError("`key` must not be None")
103
+ if not isinstance(params["key"], str):
104
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
105
+ if params.get("value", None) is None:
106
+ raise StyxValidationError("`value` must not be None")
107
+ if not isinstance(params["value"], str):
108
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
109
+
110
+
111
+ def v_5ttedit_config_cargs(
112
+ params: V5tteditConfigParamsDict,
113
+ execution: Execution,
114
+ ) -> list[str]:
115
+ """
116
+ Build command-line arguments from parameters.
117
+
118
+ Args:
119
+ params: The parameters.
120
+ execution: The execution object for resolving input paths.
121
+ Returns:
122
+ Command-line arguments.
123
+ """
124
+ cargs = []
125
+ cargs.append("-config")
126
+ cargs.append(params.get("key", None))
127
+ cargs.append(params.get("value", None))
128
+ return cargs
129
+
130
+
131
+ class V5tteditOutputs(typing.NamedTuple):
132
+ """
133
+ Output object returned when calling `V5tteditParamsDict(...)`.
134
+ """
135
+ root: OutputPathType
136
+ """Output root folder. This is the root folder for all outputs."""
137
+ output: OutputPathType
138
+ """the output modified 5TT image"""
139
+
140
+
141
+ def v_5ttedit_params(
142
+ input_: InputPathType,
143
+ output: str,
144
+ cgm: InputPathType | None = None,
145
+ sgm: InputPathType | None = None,
146
+ wm: InputPathType | None = None,
147
+ csf: InputPathType | None = None,
148
+ path: InputPathType | None = None,
149
+ none: InputPathType | None = None,
150
+ info: bool = False,
151
+ quiet: bool = False,
152
+ debug: bool = False,
153
+ force: bool = False,
154
+ nthreads: int | None = None,
155
+ config: list[V5tteditConfigParamsDict] | None = None,
156
+ help_: bool = False,
157
+ version: bool = False,
158
+ ) -> V5tteditParamsDictTagged:
159
+ """
160
+ Build parameters.
161
+
162
+ Args:
163
+ input_: the 5TT image to be modified.
164
+ output: the output modified 5TT image.
165
+ cgm: provide a mask of voxels that should be set to cortical grey\
166
+ matter.
167
+ sgm: provide a mask of voxels that should be set to sub-cortical grey\
168
+ matter.
169
+ wm: provide a mask of voxels that should be set to white matter.
170
+ csf: provide a mask of voxels that should be set to CSF.
171
+ path: provide a mask of voxels that should be set to pathological\
172
+ tissue.
173
+ none: provide a mask of voxels that should be cleared (i.e. are\
174
+ non-brain); note that this will supersede all other provided masks.
175
+ info: display information messages.
176
+ quiet: do not display information messages or progress status;\
177
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
178
+ environment variable to a non-empty string.
179
+ debug: display debugging messages.
180
+ force: force overwrite of output files (caution: using the same file as\
181
+ input and output might cause unexpected behaviour).
182
+ nthreads: use this number of threads in multi-threaded applications\
183
+ (set to 0 to disable multi-threading).
184
+ config: temporarily set the value of an MRtrix config file entry.
185
+ help_: display this information page and exit.
186
+ version: display version information and exit.
187
+ Returns:
188
+ Parameter dictionary
189
+ """
190
+ params = {
191
+ "@type": "mrtrix/5ttedit",
192
+ "info": info,
193
+ "quiet": quiet,
194
+ "debug": debug,
195
+ "force": force,
196
+ "help": help_,
197
+ "version": version,
198
+ "input": input_,
199
+ "output": output,
200
+ }
201
+ if cgm is not None:
202
+ params["cgm"] = cgm
203
+ if sgm is not None:
204
+ params["sgm"] = sgm
205
+ if wm is not None:
206
+ params["wm"] = wm
207
+ if csf is not None:
208
+ params["csf"] = csf
209
+ if path is not None:
210
+ params["path"] = path
211
+ if none is not None:
212
+ params["none"] = none
213
+ if nthreads is not None:
214
+ params["nthreads"] = nthreads
215
+ if config is not None:
216
+ params["config"] = config
217
+ return params
218
+
219
+
220
+ def v_5ttedit_validate(
221
+ params: typing.Any,
222
+ ) -> None:
223
+ """
224
+ Validate parameters. Throws an error if `params` is not a valid
225
+ `V5tteditParamsDict` object.
226
+
227
+ Args:
228
+ params: The parameters object to validate.
229
+ """
230
+ if params is None or not isinstance(params, dict):
231
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
232
+ if params.get("cgm", None) is not None:
233
+ if not isinstance(params["cgm"], (pathlib.Path, str)):
234
+ raise StyxValidationError(f'`cgm` has the wrong type: Received `{type(params.get("cgm", None))}` expected `InputPathType | None`')
235
+ if params.get("sgm", None) is not None:
236
+ if not isinstance(params["sgm"], (pathlib.Path, str)):
237
+ raise StyxValidationError(f'`sgm` has the wrong type: Received `{type(params.get("sgm", None))}` expected `InputPathType | None`')
238
+ if params.get("wm", None) is not None:
239
+ if not isinstance(params["wm"], (pathlib.Path, str)):
240
+ raise StyxValidationError(f'`wm` has the wrong type: Received `{type(params.get("wm", None))}` expected `InputPathType | None`')
241
+ if params.get("csf", None) is not None:
242
+ if not isinstance(params["csf"], (pathlib.Path, str)):
243
+ raise StyxValidationError(f'`csf` has the wrong type: Received `{type(params.get("csf", None))}` expected `InputPathType | None`')
244
+ if params.get("path", None) is not None:
245
+ if not isinstance(params["path"], (pathlib.Path, str)):
246
+ raise StyxValidationError(f'`path` has the wrong type: Received `{type(params.get("path", None))}` expected `InputPathType | None`')
247
+ if params.get("none", None) is not None:
248
+ if not isinstance(params["none"], (pathlib.Path, str)):
249
+ raise StyxValidationError(f'`none` has the wrong type: Received `{type(params.get("none", None))}` expected `InputPathType | None`')
250
+ if params.get("info", False) is None:
251
+ raise StyxValidationError("`info` must not be None")
252
+ if not isinstance(params["info"], bool):
253
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
254
+ if params.get("quiet", False) is None:
255
+ raise StyxValidationError("`quiet` must not be None")
256
+ if not isinstance(params["quiet"], bool):
257
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
258
+ if params.get("debug", False) is None:
259
+ raise StyxValidationError("`debug` must not be None")
260
+ if not isinstance(params["debug"], bool):
261
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
262
+ if params.get("force", False) is None:
263
+ raise StyxValidationError("`force` must not be None")
264
+ if not isinstance(params["force"], bool):
265
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
266
+ if params.get("nthreads", None) is not None:
267
+ if not isinstance(params["nthreads"], int):
268
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
269
+ if params.get("config", None) is not None:
270
+ if not isinstance(params["config"], list):
271
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[V5tteditConfigParamsDict] | None`')
272
+ for e in params["config"]:
273
+ v_5ttedit_config_validate(e)
274
+ if params.get("help", False) is None:
275
+ raise StyxValidationError("`help` must not be None")
276
+ if not isinstance(params["help"], bool):
277
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
278
+ if params.get("version", False) is None:
279
+ raise StyxValidationError("`version` must not be None")
280
+ if not isinstance(params["version"], bool):
281
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
282
+ if params.get("input", None) is None:
283
+ raise StyxValidationError("`input` must not be None")
284
+ if not isinstance(params["input"], (pathlib.Path, str)):
285
+ raise StyxValidationError(f'`input` has the wrong type: Received `{type(params.get("input", None))}` expected `InputPathType`')
286
+ if params.get("output", None) is None:
287
+ raise StyxValidationError("`output` must not be None")
288
+ if not isinstance(params["output"], str):
289
+ raise StyxValidationError(f'`output` has the wrong type: Received `{type(params.get("output", None))}` expected `str`')
290
+
291
+
292
+ def v_5ttedit_cargs(
293
+ params: V5tteditParamsDict,
294
+ execution: Execution,
295
+ ) -> list[str]:
296
+ """
297
+ Build command-line arguments from parameters.
298
+
299
+ Args:
300
+ params: The parameters.
301
+ execution: The execution object for resolving input paths.
302
+ Returns:
303
+ Command-line arguments.
304
+ """
305
+ cargs = []
306
+ cargs.append("5ttedit")
307
+ if params.get("cgm", None) is not None:
308
+ cargs.extend([
309
+ "-cgm",
310
+ execution.input_file(params.get("cgm", None))
311
+ ])
312
+ if params.get("sgm", None) is not None:
313
+ cargs.extend([
314
+ "-sgm",
315
+ execution.input_file(params.get("sgm", None))
316
+ ])
317
+ if params.get("wm", None) is not None:
318
+ cargs.extend([
319
+ "-wm",
320
+ execution.input_file(params.get("wm", None))
321
+ ])
322
+ if params.get("csf", None) is not None:
323
+ cargs.extend([
324
+ "-csf",
325
+ execution.input_file(params.get("csf", None))
326
+ ])
327
+ if params.get("path", None) is not None:
328
+ cargs.extend([
329
+ "-path",
330
+ execution.input_file(params.get("path", None))
331
+ ])
332
+ if params.get("none", None) is not None:
333
+ cargs.extend([
334
+ "-none",
335
+ execution.input_file(params.get("none", None))
336
+ ])
337
+ if params.get("info", False):
338
+ cargs.append("-info")
339
+ if params.get("quiet", False):
340
+ cargs.append("-quiet")
341
+ if params.get("debug", False):
342
+ cargs.append("-debug")
343
+ if params.get("force", False):
344
+ cargs.append("-force")
345
+ if params.get("nthreads", None) is not None:
346
+ cargs.extend([
347
+ "-nthreads",
348
+ str(params.get("nthreads", None))
349
+ ])
350
+ if params.get("config", None) is not None:
351
+ cargs.extend([a for c in [v_5ttedit_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
352
+ if params.get("help", False):
353
+ cargs.append("-help")
354
+ if params.get("version", False):
355
+ cargs.append("-version")
356
+ cargs.append(execution.input_file(params.get("input", None)))
357
+ cargs.append(params.get("output", None))
358
+ return cargs
359
+
360
+
361
+ def v_5ttedit_outputs(
362
+ params: V5tteditParamsDict,
363
+ execution: Execution,
364
+ ) -> V5tteditOutputs:
365
+ """
366
+ Build outputs object containing output file paths and possibly stdout/stderr.
367
+
368
+ Args:
369
+ params: The parameters.
370
+ execution: The execution object for resolving input paths.
371
+ Returns:
372
+ Outputs object.
373
+ """
374
+ ret = V5tteditOutputs(
375
+ root=execution.output_file("."),
376
+ output=execution.output_file(params.get("output", None)),
377
+ )
378
+ return ret
379
+
380
+
381
+ def v_5ttedit_execute(
382
+ params: V5tteditParamsDict,
383
+ runner: Runner | None = None,
384
+ ) -> V5tteditOutputs:
385
+ """
386
+ 5ttedit
387
+
388
+ Manually set the partial volume fractions in an ACT five-tissue-type (5TT)
389
+ image using mask images.
390
+
391
+
392
+
393
+ References:
394
+
395
+ .
396
+
397
+ Author: MRTrix3 Developers
398
+
399
+ URL: https://www.mrtrix.org/
400
+
401
+ Args:
402
+ params: The parameters.
403
+ runner: Command runner.
404
+ Returns:
405
+ NamedTuple of outputs (described in `V5tteditOutputs`).
406
+ """
407
+ v_5ttedit_validate(params)
408
+ runner = runner or get_global_runner()
409
+ execution = runner.start_execution(V_5TTEDIT_METADATA)
410
+ params = execution.params(params)
411
+ cargs = v_5ttedit_cargs(params, execution)
412
+ ret = v_5ttedit_outputs(params, execution)
413
+ execution.run(cargs)
414
+ return ret
415
+
416
+
417
+ def v_5ttedit(
418
+ input_: InputPathType,
419
+ output: str,
420
+ cgm: InputPathType | None = None,
421
+ sgm: InputPathType | None = None,
422
+ wm: InputPathType | None = None,
423
+ csf: InputPathType | None = None,
424
+ path: InputPathType | None = None,
425
+ none: InputPathType | None = None,
426
+ info: bool = False,
427
+ quiet: bool = False,
428
+ debug: bool = False,
429
+ force: bool = False,
430
+ nthreads: int | None = None,
431
+ config: list[V5tteditConfigParamsDict] | None = None,
432
+ help_: bool = False,
433
+ version: bool = False,
434
+ runner: Runner | None = None,
435
+ ) -> V5tteditOutputs:
436
+ """
437
+ 5ttedit
438
+
439
+ Manually set the partial volume fractions in an ACT five-tissue-type (5TT)
440
+ image using mask images.
441
+
442
+
443
+
444
+ References:
445
+
446
+ .
447
+
448
+ Author: MRTrix3 Developers
449
+
450
+ URL: https://www.mrtrix.org/
451
+
452
+ Args:
453
+ input_: the 5TT image to be modified.
454
+ output: the output modified 5TT image.
455
+ cgm: provide a mask of voxels that should be set to cortical grey\
456
+ matter.
457
+ sgm: provide a mask of voxels that should be set to sub-cortical grey\
458
+ matter.
459
+ wm: provide a mask of voxels that should be set to white matter.
460
+ csf: provide a mask of voxels that should be set to CSF.
461
+ path: provide a mask of voxels that should be set to pathological\
462
+ tissue.
463
+ none: provide a mask of voxels that should be cleared (i.e. are\
464
+ non-brain); note that this will supersede all other provided masks.
465
+ info: display information messages.
466
+ quiet: do not display information messages or progress status;\
467
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
468
+ environment variable to a non-empty string.
469
+ debug: display debugging messages.
470
+ force: force overwrite of output files (caution: using the same file as\
471
+ input and output might cause unexpected behaviour).
472
+ nthreads: use this number of threads in multi-threaded applications\
473
+ (set to 0 to disable multi-threading).
474
+ config: temporarily set the value of an MRtrix config file entry.
475
+ help_: display this information page and exit.
476
+ version: display version information and exit.
477
+ runner: Command runner.
478
+ Returns:
479
+ NamedTuple of outputs (described in `V5tteditOutputs`).
480
+ """
481
+ params = v_5ttedit_params(
482
+ cgm=cgm,
483
+ sgm=sgm,
484
+ wm=wm,
485
+ csf=csf,
486
+ path=path,
487
+ none=none,
488
+ info=info,
489
+ quiet=quiet,
490
+ debug=debug,
491
+ force=force,
492
+ nthreads=nthreads,
493
+ config=config,
494
+ help_=help_,
495
+ version=version,
496
+ input_=input_,
497
+ output=output,
498
+ )
499
+ return v_5ttedit_execute(params, runner)
500
+
501
+
502
+ __all__ = [
503
+ "V5tteditConfigParamsDict",
504
+ "V5tteditConfigParamsDictTagged",
505
+ "V5tteditOutputs",
506
+ "V5tteditParamsDict",
507
+ "V5tteditParamsDictTagged",
508
+ "V_5TTEDIT_METADATA",
509
+ "v_5ttedit",
510
+ "v_5ttedit_config",
511
+ "v_5ttedit_execute",
512
+ "v_5ttedit_params",
513
+ ]