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,454 @@
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
+ VOXEL2MESH_METADATA = Metadata(
9
+ id="85ff2c9f04efcbe2d5484d2e2ccd18c1577521ed.boutiques",
10
+ name="voxel2mesh",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _Voxel2meshConfigParamsDictNoTag = typing.TypedDict('_Voxel2meshConfigParamsDictNoTag', {
17
+ "key": str,
18
+ "value": str,
19
+ })
20
+ Voxel2meshConfigParamsDictTagged = typing.TypedDict('Voxel2meshConfigParamsDictTagged', {
21
+ "@type": typing.Literal["config"],
22
+ "key": str,
23
+ "value": str,
24
+ })
25
+ Voxel2meshConfigParamsDict = _Voxel2meshConfigParamsDictNoTag | Voxel2meshConfigParamsDictTagged
26
+
27
+
28
+ _Voxel2meshParamsDictNoTag = typing.TypedDict('_Voxel2meshParamsDictNoTag', {
29
+ "blocky": bool,
30
+ "threshold": 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[Voxel2meshConfigParamsDict] | None],
37
+ "help": bool,
38
+ "version": bool,
39
+ "input": InputPathType,
40
+ "output": str,
41
+ })
42
+ Voxel2meshParamsDictTagged = typing.TypedDict('Voxel2meshParamsDictTagged', {
43
+ "@type": typing.Literal["mrtrix/voxel2mesh"],
44
+ "blocky": bool,
45
+ "threshold": typing.NotRequired[float | None],
46
+ "info": bool,
47
+ "quiet": bool,
48
+ "debug": bool,
49
+ "force": bool,
50
+ "nthreads": typing.NotRequired[int | None],
51
+ "config": typing.NotRequired[list[Voxel2meshConfigParamsDict] | None],
52
+ "help": bool,
53
+ "version": bool,
54
+ "input": InputPathType,
55
+ "output": str,
56
+ })
57
+ Voxel2meshParamsDict = _Voxel2meshParamsDictNoTag | Voxel2meshParamsDictTagged
58
+
59
+
60
+ def voxel2mesh_config(
61
+ key: str,
62
+ value: str,
63
+ ) -> Voxel2meshConfigParamsDictTagged:
64
+ """
65
+ Build parameters.
66
+
67
+ Args:
68
+ key: temporarily set the value of an MRtrix config file entry.
69
+ value: temporarily set the value of an MRtrix config file entry.
70
+ Returns:
71
+ Parameter dictionary
72
+ """
73
+ params = {
74
+ "@type": "config",
75
+ "key": key,
76
+ "value": value,
77
+ }
78
+ return params
79
+
80
+
81
+ def voxel2mesh_config_validate(
82
+ params: typing.Any,
83
+ ) -> None:
84
+ """
85
+ Validate parameters. Throws an error if `params` is not a valid
86
+ `Voxel2meshConfigParamsDict` object.
87
+
88
+ Args:
89
+ params: The parameters object to validate.
90
+ """
91
+ if params is None or not isinstance(params, dict):
92
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
93
+ if params.get("key", None) is None:
94
+ raise StyxValidationError("`key` must not be None")
95
+ if not isinstance(params["key"], str):
96
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
97
+ if params.get("value", None) is None:
98
+ raise StyxValidationError("`value` must not be None")
99
+ if not isinstance(params["value"], str):
100
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
101
+
102
+
103
+ def voxel2mesh_config_cargs(
104
+ params: Voxel2meshConfigParamsDict,
105
+ execution: Execution,
106
+ ) -> list[str]:
107
+ """
108
+ Build command-line arguments from parameters.
109
+
110
+ Args:
111
+ params: The parameters.
112
+ execution: The execution object for resolving input paths.
113
+ Returns:
114
+ Command-line arguments.
115
+ """
116
+ cargs = []
117
+ cargs.append("-config")
118
+ cargs.append(params.get("key", None))
119
+ cargs.append(params.get("value", None))
120
+ return cargs
121
+
122
+
123
+ class Voxel2meshOutputs(typing.NamedTuple):
124
+ """
125
+ Output object returned when calling `Voxel2meshParamsDict(...)`.
126
+ """
127
+ root: OutputPathType
128
+ """Output root folder. This is the root folder for all outputs."""
129
+ output: OutputPathType
130
+ """the output mesh file."""
131
+
132
+
133
+ def voxel2mesh_params(
134
+ input_: InputPathType,
135
+ output: str,
136
+ blocky: bool = False,
137
+ threshold: float | None = None,
138
+ info: bool = False,
139
+ quiet: bool = False,
140
+ debug: bool = False,
141
+ force: bool = False,
142
+ nthreads: int | None = None,
143
+ config: list[Voxel2meshConfigParamsDict] | None = None,
144
+ help_: bool = False,
145
+ version: bool = False,
146
+ ) -> Voxel2meshParamsDictTagged:
147
+ """
148
+ Build parameters.
149
+
150
+ Args:
151
+ input_: the input image.
152
+ output: the output mesh file.
153
+ blocky: generate a 'blocky' mesh that precisely represents the voxel\
154
+ edges.
155
+ threshold: manually set the intensity threshold for the Marching Cubes\
156
+ algorithm.
157
+ info: display information messages.
158
+ quiet: do not display information messages or progress status;\
159
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
160
+ environment variable to a non-empty string.
161
+ debug: display debugging messages.
162
+ force: force overwrite of output files (caution: using the same file as\
163
+ input and output might cause unexpected behaviour).
164
+ nthreads: use this number of threads in multi-threaded applications\
165
+ (set to 0 to disable multi-threading).
166
+ config: temporarily set the value of an MRtrix config file entry.
167
+ help_: display this information page and exit.
168
+ version: display version information and exit.
169
+ Returns:
170
+ Parameter dictionary
171
+ """
172
+ params = {
173
+ "@type": "mrtrix/voxel2mesh",
174
+ "blocky": blocky,
175
+ "info": info,
176
+ "quiet": quiet,
177
+ "debug": debug,
178
+ "force": force,
179
+ "help": help_,
180
+ "version": version,
181
+ "input": input_,
182
+ "output": output,
183
+ }
184
+ if threshold is not None:
185
+ params["threshold"] = threshold
186
+ if nthreads is not None:
187
+ params["nthreads"] = nthreads
188
+ if config is not None:
189
+ params["config"] = config
190
+ return params
191
+
192
+
193
+ def voxel2mesh_validate(
194
+ params: typing.Any,
195
+ ) -> None:
196
+ """
197
+ Validate parameters. Throws an error if `params` is not a valid
198
+ `Voxel2meshParamsDict` object.
199
+
200
+ Args:
201
+ params: The parameters object to validate.
202
+ """
203
+ if params is None or not isinstance(params, dict):
204
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
205
+ if params.get("blocky", False) is None:
206
+ raise StyxValidationError("`blocky` must not be None")
207
+ if not isinstance(params["blocky"], bool):
208
+ raise StyxValidationError(f'`blocky` has the wrong type: Received `{type(params.get("blocky", False))}` expected `bool`')
209
+ if params.get("threshold", None) is not None:
210
+ if not isinstance(params["threshold"], (float, int)):
211
+ raise StyxValidationError(f'`threshold` has the wrong type: Received `{type(params.get("threshold", None))}` expected `float | None`')
212
+ if params.get("info", False) is None:
213
+ raise StyxValidationError("`info` must not be None")
214
+ if not isinstance(params["info"], bool):
215
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
216
+ if params.get("quiet", False) is None:
217
+ raise StyxValidationError("`quiet` must not be None")
218
+ if not isinstance(params["quiet"], bool):
219
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
220
+ if params.get("debug", False) is None:
221
+ raise StyxValidationError("`debug` must not be None")
222
+ if not isinstance(params["debug"], bool):
223
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
224
+ if params.get("force", False) is None:
225
+ raise StyxValidationError("`force` must not be None")
226
+ if not isinstance(params["force"], bool):
227
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
228
+ if params.get("nthreads", None) is not None:
229
+ if not isinstance(params["nthreads"], int):
230
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
231
+ if params.get("config", None) is not None:
232
+ if not isinstance(params["config"], list):
233
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[Voxel2meshConfigParamsDict] | None`')
234
+ for e in params["config"]:
235
+ voxel2mesh_config_validate(e)
236
+ if params.get("help", False) is None:
237
+ raise StyxValidationError("`help` must not be None")
238
+ if not isinstance(params["help"], bool):
239
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
240
+ if params.get("version", False) is None:
241
+ raise StyxValidationError("`version` must not be None")
242
+ if not isinstance(params["version"], bool):
243
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
244
+ if params.get("input", None) is None:
245
+ raise StyxValidationError("`input` must not be None")
246
+ if not isinstance(params["input"], (pathlib.Path, str)):
247
+ raise StyxValidationError(f'`input` has the wrong type: Received `{type(params.get("input", None))}` expected `InputPathType`')
248
+ if params.get("output", None) is None:
249
+ raise StyxValidationError("`output` must not be None")
250
+ if not isinstance(params["output"], str):
251
+ raise StyxValidationError(f'`output` has the wrong type: Received `{type(params.get("output", None))}` expected `str`')
252
+
253
+
254
+ def voxel2mesh_cargs(
255
+ params: Voxel2meshParamsDict,
256
+ execution: Execution,
257
+ ) -> list[str]:
258
+ """
259
+ Build command-line arguments from parameters.
260
+
261
+ Args:
262
+ params: The parameters.
263
+ execution: The execution object for resolving input paths.
264
+ Returns:
265
+ Command-line arguments.
266
+ """
267
+ cargs = []
268
+ cargs.append("voxel2mesh")
269
+ if params.get("blocky", False):
270
+ cargs.append("-blocky")
271
+ if params.get("threshold", None) is not None:
272
+ cargs.extend([
273
+ "-threshold",
274
+ str(params.get("threshold", None))
275
+ ])
276
+ if params.get("info", False):
277
+ cargs.append("-info")
278
+ if params.get("quiet", False):
279
+ cargs.append("-quiet")
280
+ if params.get("debug", False):
281
+ cargs.append("-debug")
282
+ if params.get("force", False):
283
+ cargs.append("-force")
284
+ if params.get("nthreads", None) is not None:
285
+ cargs.extend([
286
+ "-nthreads",
287
+ str(params.get("nthreads", None))
288
+ ])
289
+ if params.get("config", None) is not None:
290
+ cargs.extend([a for c in [voxel2mesh_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
291
+ if params.get("help", False):
292
+ cargs.append("-help")
293
+ if params.get("version", False):
294
+ cargs.append("-version")
295
+ cargs.append(execution.input_file(params.get("input", None)))
296
+ cargs.append(params.get("output", None))
297
+ return cargs
298
+
299
+
300
+ def voxel2mesh_outputs(
301
+ params: Voxel2meshParamsDict,
302
+ execution: Execution,
303
+ ) -> Voxel2meshOutputs:
304
+ """
305
+ Build outputs object containing output file paths and possibly stdout/stderr.
306
+
307
+ Args:
308
+ params: The parameters.
309
+ execution: The execution object for resolving input paths.
310
+ Returns:
311
+ Outputs object.
312
+ """
313
+ ret = Voxel2meshOutputs(
314
+ root=execution.output_file("."),
315
+ output=execution.output_file(params.get("output", None)),
316
+ )
317
+ return ret
318
+
319
+
320
+ def voxel2mesh_execute(
321
+ params: Voxel2meshParamsDict,
322
+ runner: Runner | None = None,
323
+ ) -> Voxel2meshOutputs:
324
+ """
325
+ voxel2mesh
326
+
327
+ Generate a surface mesh representation from a voxel image.
328
+
329
+ This command utilises the Marching Cubes algorithm to generate a polygonal
330
+ surface that represents the isocontour(s) of the input image at a particular
331
+ intensity. By default, an appropriate threshold will be determined
332
+ automatically from the input image, however the intensity value of the
333
+ isocontour(s) can instead be set manually using the -threhsold option.
334
+
335
+ If the -blocky option is used, then the Marching Cubes algorithm will not be
336
+ used. Instead, the input image will be interpreted as a binary mask image,
337
+ and polygonal surfaces will be generated at the outer faces of the voxel
338
+ clusters within the mask.
339
+
340
+ References:
341
+
342
+ .
343
+
344
+ Author: MRTrix3 Developers
345
+
346
+ URL: https://www.mrtrix.org/
347
+
348
+ Args:
349
+ params: The parameters.
350
+ runner: Command runner.
351
+ Returns:
352
+ NamedTuple of outputs (described in `Voxel2meshOutputs`).
353
+ """
354
+ voxel2mesh_validate(params)
355
+ runner = runner or get_global_runner()
356
+ execution = runner.start_execution(VOXEL2MESH_METADATA)
357
+ params = execution.params(params)
358
+ cargs = voxel2mesh_cargs(params, execution)
359
+ ret = voxel2mesh_outputs(params, execution)
360
+ execution.run(cargs)
361
+ return ret
362
+
363
+
364
+ def voxel2mesh(
365
+ input_: InputPathType,
366
+ output: str,
367
+ blocky: bool = False,
368
+ threshold: float | None = None,
369
+ info: bool = False,
370
+ quiet: bool = False,
371
+ debug: bool = False,
372
+ force: bool = False,
373
+ nthreads: int | None = None,
374
+ config: list[Voxel2meshConfigParamsDict] | None = None,
375
+ help_: bool = False,
376
+ version: bool = False,
377
+ runner: Runner | None = None,
378
+ ) -> Voxel2meshOutputs:
379
+ """
380
+ voxel2mesh
381
+
382
+ Generate a surface mesh representation from a voxel image.
383
+
384
+ This command utilises the Marching Cubes algorithm to generate a polygonal
385
+ surface that represents the isocontour(s) of the input image at a particular
386
+ intensity. By default, an appropriate threshold will be determined
387
+ automatically from the input image, however the intensity value of the
388
+ isocontour(s) can instead be set manually using the -threhsold option.
389
+
390
+ If the -blocky option is used, then the Marching Cubes algorithm will not be
391
+ used. Instead, the input image will be interpreted as a binary mask image,
392
+ and polygonal surfaces will be generated at the outer faces of the voxel
393
+ clusters within the mask.
394
+
395
+ References:
396
+
397
+ .
398
+
399
+ Author: MRTrix3 Developers
400
+
401
+ URL: https://www.mrtrix.org/
402
+
403
+ Args:
404
+ input_: the input image.
405
+ output: the output mesh file.
406
+ blocky: generate a 'blocky' mesh that precisely represents the voxel\
407
+ edges.
408
+ threshold: manually set the intensity threshold for the Marching Cubes\
409
+ algorithm.
410
+ info: display information messages.
411
+ quiet: do not display information messages or progress status;\
412
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
413
+ environment variable to a non-empty string.
414
+ debug: display debugging messages.
415
+ force: force overwrite of output files (caution: using the same file as\
416
+ input and output might cause unexpected behaviour).
417
+ nthreads: use this number of threads in multi-threaded applications\
418
+ (set to 0 to disable multi-threading).
419
+ config: temporarily set the value of an MRtrix config file entry.
420
+ help_: display this information page and exit.
421
+ version: display version information and exit.
422
+ runner: Command runner.
423
+ Returns:
424
+ NamedTuple of outputs (described in `Voxel2meshOutputs`).
425
+ """
426
+ params = voxel2mesh_params(
427
+ blocky=blocky,
428
+ threshold=threshold,
429
+ info=info,
430
+ quiet=quiet,
431
+ debug=debug,
432
+ force=force,
433
+ nthreads=nthreads,
434
+ config=config,
435
+ help_=help_,
436
+ version=version,
437
+ input_=input_,
438
+ output=output,
439
+ )
440
+ return voxel2mesh_execute(params, runner)
441
+
442
+
443
+ __all__ = [
444
+ "VOXEL2MESH_METADATA",
445
+ "Voxel2meshConfigParamsDict",
446
+ "Voxel2meshConfigParamsDictTagged",
447
+ "Voxel2meshOutputs",
448
+ "Voxel2meshParamsDict",
449
+ "Voxel2meshParamsDictTagged",
450
+ "voxel2mesh",
451
+ "voxel2mesh_config",
452
+ "voxel2mesh_execute",
453
+ "voxel2mesh_params",
454
+ ]