niwrap-mrtrix 0.5.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 (119) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +130 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
  3. niwrap_mrtrix/mrtrix/amp2response.py +453 -0
  4. niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
  7. niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
  8. niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
  9. niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
  10. niwrap_mrtrix/mrtrix/dirflip.py +362 -0
  11. niwrap_mrtrix/mrtrix/dirgen.py +423 -0
  12. niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
  13. niwrap_mrtrix/mrtrix/dirorder.py +347 -0
  14. niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
  15. niwrap_mrtrix/mrtrix/dirstat.py +530 -0
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
  19. niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
  23. niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
  36. niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
  38. niwrap_mrtrix/mrtrix/label2colour.py +351 -0
  39. niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
  40. niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
  41. niwrap_mrtrix/mrtrix/labelstats.py +344 -0
  42. niwrap_mrtrix/mrtrix/maskdump.py +336 -0
  43. niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
  45. niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
  46. niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
  48. niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
  49. niwrap_mrtrix/mrtrix/mrcat.py +382 -0
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
  53. niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
  54. niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
  56. niwrap_mrtrix/mrtrix/mrdump.py +351 -0
  57. niwrap_mrtrix/mrtrix/mredit.py +546 -0
  58. niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
  59. niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
  62. niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
  63. niwrap_mrtrix/mrtrix/mrmath.py +413 -0
  64. niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
  65. niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
  66. niwrap_mrtrix/mrtrix/mrstats.py +427 -0
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
  68. niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
  72. niwrap_mrtrix/mrtrix/responsemean.py +316 -0
  73. niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
  75. niwrap_mrtrix/mrtrix/sh2power.py +353 -0
  76. niwrap_mrtrix/mrtrix/sh2response.py +394 -0
  77. niwrap_mrtrix/mrtrix/shbasis.py +373 -0
  78. niwrap_mrtrix/mrtrix/shconv.py +498 -0
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
  81. niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
  82. niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
  83. niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
  84. niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
  85. niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
  86. niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
  87. niwrap_mrtrix/mrtrix/tckmap.py +772 -0
  88. niwrap_mrtrix/mrtrix/tckresample.py +580 -0
  89. niwrap_mrtrix/mrtrix/tcksample.py +404 -0
  90. niwrap_mrtrix/mrtrix/tcksift.py +592 -0
  91. niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
  92. niwrap_mrtrix/mrtrix/tckstats.py +441 -0
  93. niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
  95. niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
  96. niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
  97. niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
  100. niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
  109. niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
  112. niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
  113. niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
  115. niwrap_mrtrix/mrtrix/warpinit.py +356 -0
  116. niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
  117. niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,544 @@
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
+ TENSOR2METRIC_METADATA = Metadata(
9
+ id="ce3b6c1eb5966c84af85ddfef969868689c115fb.boutiques",
10
+ name="tensor2metric",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ Tensor2metricConfigParameters = typing.TypedDict('Tensor2metricConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ Tensor2metricParameters = typing.TypedDict('Tensor2metricParameters', {
24
+ "__STYX_TYPE__": typing.Literal["tensor2metric"],
25
+ "adc": typing.NotRequired[str | None],
26
+ "fa": typing.NotRequired[str | None],
27
+ "ad": typing.NotRequired[str | None],
28
+ "rd": typing.NotRequired[str | None],
29
+ "cl": typing.NotRequired[str | None],
30
+ "cp": typing.NotRequired[str | None],
31
+ "cs": typing.NotRequired[str | None],
32
+ "value": typing.NotRequired[str | None],
33
+ "vector": typing.NotRequired[str | None],
34
+ "num": typing.NotRequired[list[int] | None],
35
+ "modulate": typing.NotRequired[str | None],
36
+ "mask": typing.NotRequired[InputPathType | None],
37
+ "info": bool,
38
+ "quiet": bool,
39
+ "debug": bool,
40
+ "force": bool,
41
+ "nthreads": typing.NotRequired[int | None],
42
+ "config": typing.NotRequired[list[Tensor2metricConfigParameters] | None],
43
+ "help": bool,
44
+ "version": bool,
45
+ "tensor": InputPathType,
46
+ })
47
+
48
+
49
+ def dyn_cargs(
50
+ t: str,
51
+ ) -> typing.Any:
52
+ """
53
+ Get build cargs function by command type.
54
+
55
+ Args:
56
+ t: Command type.
57
+ Returns:
58
+ Build cargs function.
59
+ """
60
+ return {
61
+ "tensor2metric": tensor2metric_cargs,
62
+ "config": tensor2metric_config_cargs,
63
+ }.get(t)
64
+
65
+
66
+ def dyn_outputs(
67
+ t: str,
68
+ ) -> typing.Any:
69
+ """
70
+ Get build outputs function by command type.
71
+
72
+ Args:
73
+ t: Command type.
74
+ Returns:
75
+ Build outputs function.
76
+ """
77
+ return {
78
+ "tensor2metric": tensor2metric_outputs,
79
+ }.get(t)
80
+
81
+
82
+ def tensor2metric_config_params(
83
+ key: str,
84
+ value: str,
85
+ ) -> Tensor2metricConfigParameters:
86
+ """
87
+ Build parameters.
88
+
89
+ Args:
90
+ key: temporarily set the value of an MRtrix config file entry.
91
+ value: temporarily set the value of an MRtrix config file entry.
92
+ Returns:
93
+ Parameter dictionary
94
+ """
95
+ params = {
96
+ "__STYXTYPE__": "config",
97
+ "key": key,
98
+ "value": value,
99
+ }
100
+ return params
101
+
102
+
103
+ def tensor2metric_config_cargs(
104
+ params: Tensor2metricConfigParameters,
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"))
119
+ cargs.append(params.get("value"))
120
+ return cargs
121
+
122
+
123
+ class Tensor2metricOutputs(typing.NamedTuple):
124
+ """
125
+ Output object returned when calling `tensor2metric(...)`.
126
+ """
127
+ root: OutputPathType
128
+ """Output root folder. This is the root folder for all outputs."""
129
+ adc: OutputPathType | None
130
+ """compute the mean apparent diffusion coefficient (ADC) of the diffusion
131
+ tensor. (sometimes also referred to as the mean diffusivity (MD)) """
132
+ fa: OutputPathType | None
133
+ """compute the fractional anisotropy (FA) of the diffusion tensor. """
134
+ ad: OutputPathType | None
135
+ """compute the axial diffusivity (AD) of the diffusion tensor. (equivalent
136
+ to the principal eigenvalue) """
137
+ rd: OutputPathType | None
138
+ """compute the radial diffusivity (RD) of the diffusion tensor. (equivalent
139
+ to the mean of the two non-principal eigenvalues) """
140
+ cl: OutputPathType | None
141
+ """compute the linearity metric of the diffusion tensor. (one of the three
142
+ Westin shape metrics) """
143
+ cp: OutputPathType | None
144
+ """compute the planarity metric of the diffusion tensor. (one of the three
145
+ Westin shape metrics) """
146
+ cs: OutputPathType | None
147
+ """compute the sphericity metric of the diffusion tensor. (one of the three
148
+ Westin shape metrics) """
149
+ value: OutputPathType | None
150
+ """compute the selected eigenvalue(s) of the diffusion tensor. """
151
+ vector: OutputPathType | None
152
+ """compute the selected eigenvector(s) of the diffusion tensor. """
153
+
154
+
155
+ def tensor2metric_params(
156
+ tensor: InputPathType,
157
+ adc: str | None = None,
158
+ fa: str | None = None,
159
+ ad: str | None = None,
160
+ rd: str | None = None,
161
+ cl: str | None = None,
162
+ cp: str | None = None,
163
+ cs: str | None = None,
164
+ value: str | None = None,
165
+ vector: str | None = None,
166
+ num: list[int] | None = None,
167
+ modulate: str | None = None,
168
+ mask: InputPathType | None = None,
169
+ info: bool = False,
170
+ quiet: bool = False,
171
+ debug: bool = False,
172
+ force: bool = False,
173
+ nthreads: int | None = None,
174
+ config: list[Tensor2metricConfigParameters] | None = None,
175
+ help_: bool = False,
176
+ version: bool = False,
177
+ ) -> Tensor2metricParameters:
178
+ """
179
+ Build parameters.
180
+
181
+ Args:
182
+ tensor: the input tensor image.
183
+ adc: compute the mean apparent diffusion coefficient (ADC) of the\
184
+ diffusion tensor. (sometimes also referred to as the mean diffusivity\
185
+ (MD)).
186
+ fa: compute the fractional anisotropy (FA) of the diffusion tensor.
187
+ ad: compute the axial diffusivity (AD) of the diffusion tensor.\
188
+ (equivalent to the principal eigenvalue).
189
+ rd: compute the radial diffusivity (RD) of the diffusion tensor.\
190
+ (equivalent to the mean of the two non-principal eigenvalues).
191
+ cl: compute the linearity metric of the diffusion tensor. (one of the\
192
+ three Westin shape metrics).
193
+ cp: compute the planarity metric of the diffusion tensor. (one of the\
194
+ three Westin shape metrics).
195
+ cs: compute the sphericity metric of the diffusion tensor. (one of the\
196
+ three Westin shape metrics).
197
+ value: compute the selected eigenvalue(s) of the diffusion tensor.
198
+ vector: compute the selected eigenvector(s) of the diffusion tensor.
199
+ num: specify the desired eigenvalue/eigenvector(s). Note that several\
200
+ eigenvalues can be specified as a number sequence. For example, '1,3'\
201
+ specifies the principal (1) and minor (3) eigenvalues/eigenvectors\
202
+ (default = 1).
203
+ modulate: specify how to modulate the magnitude of the eigenvectors.\
204
+ Valid choices are: none, FA, eigval (default = FA).
205
+ mask: only perform computation within the specified binary brain mask\
206
+ image.
207
+ info: display information messages.
208
+ quiet: do not display information messages or progress status;\
209
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
210
+ environment variable to a non-empty string.
211
+ debug: display debugging messages.
212
+ force: force overwrite of output files (caution: using the same file as\
213
+ input and output might cause unexpected behaviour).
214
+ nthreads: use this number of threads in multi-threaded applications\
215
+ (set to 0 to disable multi-threading).
216
+ config: temporarily set the value of an MRtrix config file entry.
217
+ help_: display this information page and exit.
218
+ version: display version information and exit.
219
+ Returns:
220
+ Parameter dictionary
221
+ """
222
+ params = {
223
+ "__STYXTYPE__": "tensor2metric",
224
+ "info": info,
225
+ "quiet": quiet,
226
+ "debug": debug,
227
+ "force": force,
228
+ "help": help_,
229
+ "version": version,
230
+ "tensor": tensor,
231
+ }
232
+ if adc is not None:
233
+ params["adc"] = adc
234
+ if fa is not None:
235
+ params["fa"] = fa
236
+ if ad is not None:
237
+ params["ad"] = ad
238
+ if rd is not None:
239
+ params["rd"] = rd
240
+ if cl is not None:
241
+ params["cl"] = cl
242
+ if cp is not None:
243
+ params["cp"] = cp
244
+ if cs is not None:
245
+ params["cs"] = cs
246
+ if value is not None:
247
+ params["value"] = value
248
+ if vector is not None:
249
+ params["vector"] = vector
250
+ if num is not None:
251
+ params["num"] = num
252
+ if modulate is not None:
253
+ params["modulate"] = modulate
254
+ if mask is not None:
255
+ params["mask"] = mask
256
+ if nthreads is not None:
257
+ params["nthreads"] = nthreads
258
+ if config is not None:
259
+ params["config"] = config
260
+ return params
261
+
262
+
263
+ def tensor2metric_cargs(
264
+ params: Tensor2metricParameters,
265
+ execution: Execution,
266
+ ) -> list[str]:
267
+ """
268
+ Build command-line arguments from parameters.
269
+
270
+ Args:
271
+ params: The parameters.
272
+ execution: The execution object for resolving input paths.
273
+ Returns:
274
+ Command-line arguments.
275
+ """
276
+ cargs = []
277
+ cargs.append("tensor2metric")
278
+ if params.get("adc") is not None:
279
+ cargs.extend([
280
+ "-adc",
281
+ params.get("adc")
282
+ ])
283
+ if params.get("fa") is not None:
284
+ cargs.extend([
285
+ "-fa",
286
+ params.get("fa")
287
+ ])
288
+ if params.get("ad") is not None:
289
+ cargs.extend([
290
+ "-ad",
291
+ params.get("ad")
292
+ ])
293
+ if params.get("rd") is not None:
294
+ cargs.extend([
295
+ "-rd",
296
+ params.get("rd")
297
+ ])
298
+ if params.get("cl") is not None:
299
+ cargs.extend([
300
+ "-cl",
301
+ params.get("cl")
302
+ ])
303
+ if params.get("cp") is not None:
304
+ cargs.extend([
305
+ "-cp",
306
+ params.get("cp")
307
+ ])
308
+ if params.get("cs") is not None:
309
+ cargs.extend([
310
+ "-cs",
311
+ params.get("cs")
312
+ ])
313
+ if params.get("value") is not None:
314
+ cargs.extend([
315
+ "-value",
316
+ params.get("value")
317
+ ])
318
+ if params.get("vector") is not None:
319
+ cargs.extend([
320
+ "-vector",
321
+ params.get("vector")
322
+ ])
323
+ if params.get("num") is not None:
324
+ cargs.extend([
325
+ "-num",
326
+ *map(str, params.get("num"))
327
+ ])
328
+ if params.get("modulate") is not None:
329
+ cargs.extend([
330
+ "-modulate",
331
+ params.get("modulate")
332
+ ])
333
+ if params.get("mask") is not None:
334
+ cargs.extend([
335
+ "-mask",
336
+ execution.input_file(params.get("mask"))
337
+ ])
338
+ if params.get("info"):
339
+ cargs.append("-info")
340
+ if params.get("quiet"):
341
+ cargs.append("-quiet")
342
+ if params.get("debug"):
343
+ cargs.append("-debug")
344
+ if params.get("force"):
345
+ cargs.append("-force")
346
+ if params.get("nthreads") is not None:
347
+ cargs.extend([
348
+ "-nthreads",
349
+ str(params.get("nthreads"))
350
+ ])
351
+ if params.get("config") is not None:
352
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
353
+ if params.get("help"):
354
+ cargs.append("-help")
355
+ if params.get("version"):
356
+ cargs.append("-version")
357
+ cargs.append(execution.input_file(params.get("tensor")))
358
+ return cargs
359
+
360
+
361
+ def tensor2metric_outputs(
362
+ params: Tensor2metricParameters,
363
+ execution: Execution,
364
+ ) -> Tensor2metricOutputs:
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 = Tensor2metricOutputs(
375
+ root=execution.output_file("."),
376
+ adc=execution.output_file(params.get("adc")) if (params.get("adc") is not None) else None,
377
+ fa=execution.output_file(params.get("fa")) if (params.get("fa") is not None) else None,
378
+ ad=execution.output_file(params.get("ad")) if (params.get("ad") is not None) else None,
379
+ rd=execution.output_file(params.get("rd")) if (params.get("rd") is not None) else None,
380
+ cl=execution.output_file(params.get("cl")) if (params.get("cl") is not None) else None,
381
+ cp=execution.output_file(params.get("cp")) if (params.get("cp") is not None) else None,
382
+ cs=execution.output_file(params.get("cs")) if (params.get("cs") is not None) else None,
383
+ value=execution.output_file(params.get("value")) if (params.get("value") is not None) else None,
384
+ vector=execution.output_file(params.get("vector")) if (params.get("vector") is not None) else None,
385
+ )
386
+ return ret
387
+
388
+
389
+ def tensor2metric_execute(
390
+ params: Tensor2metricParameters,
391
+ execution: Execution,
392
+ ) -> Tensor2metricOutputs:
393
+ """
394
+ Generate maps of tensor-derived parameters.
395
+
396
+
397
+
398
+ References:
399
+
400
+ Basser, P. J.; Mattiello, J. & Lebihan, D. MR diffusion tensor spectroscopy
401
+ and imaging. Biophysical Journal, 1994, 66, 259-267
402
+
403
+ Westin, C. F.; Peled, S.; Gudbjartsson, H.; Kikinis, R. & Jolesz, F. A.
404
+ Geometrical diffusion measures for MRI from tensor basis analysis. Proc Intl
405
+ Soc Mag Reson Med, 1997, 5, 1742.
406
+
407
+ Author: MRTrix3 Developers
408
+
409
+ URL: https://www.mrtrix.org/
410
+
411
+ Args:
412
+ params: The parameters.
413
+ execution: The execution object.
414
+ Returns:
415
+ NamedTuple of outputs (described in `Tensor2metricOutputs`).
416
+ """
417
+ params = execution.params(params)
418
+ cargs = tensor2metric_cargs(params, execution)
419
+ ret = tensor2metric_outputs(params, execution)
420
+ execution.run(cargs)
421
+ return ret
422
+
423
+
424
+ def tensor2metric(
425
+ tensor: InputPathType,
426
+ adc: str | None = None,
427
+ fa: str | None = None,
428
+ ad: str | None = None,
429
+ rd: str | None = None,
430
+ cl: str | None = None,
431
+ cp: str | None = None,
432
+ cs: str | None = None,
433
+ value: str | None = None,
434
+ vector: str | None = None,
435
+ num: list[int] | None = None,
436
+ modulate: str | None = None,
437
+ mask: InputPathType | None = None,
438
+ info: bool = False,
439
+ quiet: bool = False,
440
+ debug: bool = False,
441
+ force: bool = False,
442
+ nthreads: int | None = None,
443
+ config: list[Tensor2metricConfigParameters] | None = None,
444
+ help_: bool = False,
445
+ version: bool = False,
446
+ runner: Runner | None = None,
447
+ ) -> Tensor2metricOutputs:
448
+ """
449
+ Generate maps of tensor-derived parameters.
450
+
451
+
452
+
453
+ References:
454
+
455
+ Basser, P. J.; Mattiello, J. & Lebihan, D. MR diffusion tensor spectroscopy
456
+ and imaging. Biophysical Journal, 1994, 66, 259-267
457
+
458
+ Westin, C. F.; Peled, S.; Gudbjartsson, H.; Kikinis, R. & Jolesz, F. A.
459
+ Geometrical diffusion measures for MRI from tensor basis analysis. Proc Intl
460
+ Soc Mag Reson Med, 1997, 5, 1742.
461
+
462
+ Author: MRTrix3 Developers
463
+
464
+ URL: https://www.mrtrix.org/
465
+
466
+ Args:
467
+ tensor: the input tensor image.
468
+ adc: compute the mean apparent diffusion coefficient (ADC) of the\
469
+ diffusion tensor. (sometimes also referred to as the mean diffusivity\
470
+ (MD)).
471
+ fa: compute the fractional anisotropy (FA) of the diffusion tensor.
472
+ ad: compute the axial diffusivity (AD) of the diffusion tensor.\
473
+ (equivalent to the principal eigenvalue).
474
+ rd: compute the radial diffusivity (RD) of the diffusion tensor.\
475
+ (equivalent to the mean of the two non-principal eigenvalues).
476
+ cl: compute the linearity metric of the diffusion tensor. (one of the\
477
+ three Westin shape metrics).
478
+ cp: compute the planarity metric of the diffusion tensor. (one of the\
479
+ three Westin shape metrics).
480
+ cs: compute the sphericity metric of the diffusion tensor. (one of the\
481
+ three Westin shape metrics).
482
+ value: compute the selected eigenvalue(s) of the diffusion tensor.
483
+ vector: compute the selected eigenvector(s) of the diffusion tensor.
484
+ num: specify the desired eigenvalue/eigenvector(s). Note that several\
485
+ eigenvalues can be specified as a number sequence. For example, '1,3'\
486
+ specifies the principal (1) and minor (3) eigenvalues/eigenvectors\
487
+ (default = 1).
488
+ modulate: specify how to modulate the magnitude of the eigenvectors.\
489
+ Valid choices are: none, FA, eigval (default = FA).
490
+ mask: only perform computation within the specified binary brain mask\
491
+ image.
492
+ info: display information messages.
493
+ quiet: do not display information messages or progress status;\
494
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
495
+ environment variable to a non-empty string.
496
+ debug: display debugging messages.
497
+ force: force overwrite of output files (caution: using the same file as\
498
+ input and output might cause unexpected behaviour).
499
+ nthreads: use this number of threads in multi-threaded applications\
500
+ (set to 0 to disable multi-threading).
501
+ config: temporarily set the value of an MRtrix config file entry.
502
+ help_: display this information page and exit.
503
+ version: display version information and exit.
504
+ runner: Command runner.
505
+ Returns:
506
+ NamedTuple of outputs (described in `Tensor2metricOutputs`).
507
+ """
508
+ runner = runner or get_global_runner()
509
+ execution = runner.start_execution(TENSOR2METRIC_METADATA)
510
+ params = tensor2metric_params(
511
+ adc=adc,
512
+ fa=fa,
513
+ ad=ad,
514
+ rd=rd,
515
+ cl=cl,
516
+ cp=cp,
517
+ cs=cs,
518
+ value=value,
519
+ vector=vector,
520
+ num=num,
521
+ modulate=modulate,
522
+ mask=mask,
523
+ info=info,
524
+ quiet=quiet,
525
+ debug=debug,
526
+ force=force,
527
+ nthreads=nthreads,
528
+ config=config,
529
+ help_=help_,
530
+ version=version,
531
+ tensor=tensor,
532
+ )
533
+ return tensor2metric_execute(params, execution)
534
+
535
+
536
+ __all__ = [
537
+ "TENSOR2METRIC_METADATA",
538
+ "Tensor2metricConfigParameters",
539
+ "Tensor2metricOutputs",
540
+ "Tensor2metricParameters",
541
+ "tensor2metric",
542
+ "tensor2metric_config_params",
543
+ "tensor2metric_params",
544
+ ]