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,530 @@
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
+ FOD2FIXEL_METADATA = Metadata(
9
+ id="4748cd2237541a5061a51ecd86840055b92d34ff.boutiques",
10
+ name="fod2fixel",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ Fod2fixelConfigParameters = typing.TypedDict('Fod2fixelConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ Fod2fixelParameters = typing.TypedDict('Fod2fixelParameters', {
24
+ "__STYX_TYPE__": typing.Literal["fod2fixel"],
25
+ "afd": typing.NotRequired[str | None],
26
+ "peak_amp": typing.NotRequired[str | None],
27
+ "disp": typing.NotRequired[str | None],
28
+ "fmls_integral": typing.NotRequired[float | None],
29
+ "fmls_peak_value": typing.NotRequired[float | None],
30
+ "fmls_no_thresholds": bool,
31
+ "fmls_lobe_merge_ratio": typing.NotRequired[float | None],
32
+ "mask": typing.NotRequired[InputPathType | None],
33
+ "maxnum": typing.NotRequired[int | None],
34
+ "nii": bool,
35
+ "dirpeak": bool,
36
+ "info": bool,
37
+ "quiet": bool,
38
+ "debug": bool,
39
+ "force": bool,
40
+ "nthreads": typing.NotRequired[int | None],
41
+ "config": typing.NotRequired[list[Fod2fixelConfigParameters] | None],
42
+ "help": bool,
43
+ "version": bool,
44
+ "fod": InputPathType,
45
+ "fixel_directory": str,
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
+ "fod2fixel": fod2fixel_cargs,
62
+ "config": fod2fixel_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
+ "fod2fixel": fod2fixel_outputs,
79
+ }.get(t)
80
+
81
+
82
+ def fod2fixel_config_params(
83
+ key: str,
84
+ value: str,
85
+ ) -> Fod2fixelConfigParameters:
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 fod2fixel_config_cargs(
104
+ params: Fod2fixelConfigParameters,
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 Fod2fixelOutputs(typing.NamedTuple):
124
+ """
125
+ Output object returned when calling `fod2fixel(...)`.
126
+ """
127
+ root: OutputPathType
128
+ """Output root folder. This is the root folder for all outputs."""
129
+ fixel_directory: OutputPathType
130
+ """the output fixel directory"""
131
+ afd: OutputPathType | None
132
+ """output the total Apparent Fibre Density per fixel (integral of FOD lobe)
133
+ """
134
+ peak_amp: OutputPathType | None
135
+ """output the amplitude of the FOD at the maximal peak per fixel """
136
+ disp: OutputPathType | None
137
+ """output a measure of dispersion per fixel as the ratio between FOD lobe
138
+ integral and maximal peak amplitude """
139
+
140
+
141
+ def fod2fixel_params(
142
+ fod: InputPathType,
143
+ fixel_directory: str,
144
+ afd: str | None = None,
145
+ peak_amp: str | None = None,
146
+ disp: str | None = None,
147
+ fmls_integral: float | None = None,
148
+ fmls_peak_value: float | None = None,
149
+ fmls_no_thresholds: bool = False,
150
+ fmls_lobe_merge_ratio: float | None = None,
151
+ mask: InputPathType | None = None,
152
+ maxnum: int | None = None,
153
+ nii: bool = False,
154
+ dirpeak: bool = False,
155
+ info: bool = False,
156
+ quiet: bool = False,
157
+ debug: bool = False,
158
+ force: bool = False,
159
+ nthreads: int | None = None,
160
+ config: list[Fod2fixelConfigParameters] | None = None,
161
+ help_: bool = False,
162
+ version: bool = False,
163
+ ) -> Fod2fixelParameters:
164
+ """
165
+ Build parameters.
166
+
167
+ Args:
168
+ fod: the input fod image.
169
+ fixel_directory: the output fixel directory.
170
+ afd: output the total Apparent Fibre Density per fixel (integral of FOD\
171
+ lobe).
172
+ peak_amp: output the amplitude of the FOD at the maximal peak per fixel.
173
+ disp: output a measure of dispersion per fixel as the ratio between FOD\
174
+ lobe integral and maximal peak amplitude.
175
+ fmls_integral: threshold absolute numerical integral of positive FOD\
176
+ lobes. Any lobe for which the integral is smaller than this threshold\
177
+ will be discarded. Default: 0.
178
+ fmls_peak_value: threshold peak amplitude of positive FOD lobes. Any\
179
+ lobe for which the maximal peak amplitude is smaller than this\
180
+ threshold will be discarded. Default: 0.1.
181
+ fmls_no_thresholds: disable all FOD lobe thresholding; every lobe where\
182
+ the FOD is positive will be retained.
183
+ fmls_lobe_merge_ratio: Specify the ratio between a given FOD amplitude\
184
+ sample between two lobes, and the smallest peak amplitude of the\
185
+ adjacent lobes, above which those lobes will be merged. This is the\
186
+ amplitude of the FOD at the 'bridge' point between the two lobes,\
187
+ divided by the peak amplitude of the smaller of the two adjoining\
188
+ lobes. A value of 1.0 will never merge two lobes into one; a value of\
189
+ 0.0 will always merge lobes unless they are bisected by a zero-valued\
190
+ crossing. Default: 1.
191
+ mask: only perform computation within the specified binary brain mask\
192
+ image.
193
+ maxnum: maximum number of fixels to output for any particular voxel\
194
+ (default: no limit).
195
+ nii: output the directions and index file in nii format (instead of the\
196
+ default mif).
197
+ dirpeak: define the fixel direction as that of the lobe's maximal peak\
198
+ as opposed to its weighted mean direction (the default).
199
+ info: display information messages.
200
+ quiet: do not display information messages or progress status;\
201
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
202
+ environment variable to a non-empty string.
203
+ debug: display debugging messages.
204
+ force: force overwrite of output files (caution: using the same file as\
205
+ input and output might cause unexpected behaviour).
206
+ nthreads: use this number of threads in multi-threaded applications\
207
+ (set to 0 to disable multi-threading).
208
+ config: temporarily set the value of an MRtrix config file entry.
209
+ help_: display this information page and exit.
210
+ version: display version information and exit.
211
+ Returns:
212
+ Parameter dictionary
213
+ """
214
+ params = {
215
+ "__STYXTYPE__": "fod2fixel",
216
+ "fmls_no_thresholds": fmls_no_thresholds,
217
+ "nii": nii,
218
+ "dirpeak": dirpeak,
219
+ "info": info,
220
+ "quiet": quiet,
221
+ "debug": debug,
222
+ "force": force,
223
+ "help": help_,
224
+ "version": version,
225
+ "fod": fod,
226
+ "fixel_directory": fixel_directory,
227
+ }
228
+ if afd is not None:
229
+ params["afd"] = afd
230
+ if peak_amp is not None:
231
+ params["peak_amp"] = peak_amp
232
+ if disp is not None:
233
+ params["disp"] = disp
234
+ if fmls_integral is not None:
235
+ params["fmls_integral"] = fmls_integral
236
+ if fmls_peak_value is not None:
237
+ params["fmls_peak_value"] = fmls_peak_value
238
+ if fmls_lobe_merge_ratio is not None:
239
+ params["fmls_lobe_merge_ratio"] = fmls_lobe_merge_ratio
240
+ if mask is not None:
241
+ params["mask"] = mask
242
+ if maxnum is not None:
243
+ params["maxnum"] = maxnum
244
+ if nthreads is not None:
245
+ params["nthreads"] = nthreads
246
+ if config is not None:
247
+ params["config"] = config
248
+ return params
249
+
250
+
251
+ def fod2fixel_cargs(
252
+ params: Fod2fixelParameters,
253
+ execution: Execution,
254
+ ) -> list[str]:
255
+ """
256
+ Build command-line arguments from parameters.
257
+
258
+ Args:
259
+ params: The parameters.
260
+ execution: The execution object for resolving input paths.
261
+ Returns:
262
+ Command-line arguments.
263
+ """
264
+ cargs = []
265
+ cargs.append("fod2fixel")
266
+ if params.get("afd") is not None:
267
+ cargs.extend([
268
+ "-afd",
269
+ params.get("afd")
270
+ ])
271
+ if params.get("peak_amp") is not None:
272
+ cargs.extend([
273
+ "-peak_amp",
274
+ params.get("peak_amp")
275
+ ])
276
+ if params.get("disp") is not None:
277
+ cargs.extend([
278
+ "-disp",
279
+ params.get("disp")
280
+ ])
281
+ if params.get("fmls_integral") is not None:
282
+ cargs.extend([
283
+ "-fmls_integral",
284
+ str(params.get("fmls_integral"))
285
+ ])
286
+ if params.get("fmls_peak_value") is not None:
287
+ cargs.extend([
288
+ "-fmls_peak_value",
289
+ str(params.get("fmls_peak_value"))
290
+ ])
291
+ if params.get("fmls_no_thresholds"):
292
+ cargs.append("-fmls_no_thresholds")
293
+ if params.get("fmls_lobe_merge_ratio") is not None:
294
+ cargs.extend([
295
+ "-fmls_lobe_merge_ratio",
296
+ str(params.get("fmls_lobe_merge_ratio"))
297
+ ])
298
+ if params.get("mask") is not None:
299
+ cargs.extend([
300
+ "-mask",
301
+ execution.input_file(params.get("mask"))
302
+ ])
303
+ if params.get("maxnum") is not None:
304
+ cargs.extend([
305
+ "-maxnum",
306
+ str(params.get("maxnum"))
307
+ ])
308
+ if params.get("nii"):
309
+ cargs.append("-nii")
310
+ if params.get("dirpeak"):
311
+ cargs.append("-dirpeak")
312
+ if params.get("info"):
313
+ cargs.append("-info")
314
+ if params.get("quiet"):
315
+ cargs.append("-quiet")
316
+ if params.get("debug"):
317
+ cargs.append("-debug")
318
+ if params.get("force"):
319
+ cargs.append("-force")
320
+ if params.get("nthreads") is not None:
321
+ cargs.extend([
322
+ "-nthreads",
323
+ str(params.get("nthreads"))
324
+ ])
325
+ if params.get("config") is not None:
326
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
327
+ if params.get("help"):
328
+ cargs.append("-help")
329
+ if params.get("version"):
330
+ cargs.append("-version")
331
+ cargs.append(execution.input_file(params.get("fod")))
332
+ cargs.append(params.get("fixel_directory"))
333
+ return cargs
334
+
335
+
336
+ def fod2fixel_outputs(
337
+ params: Fod2fixelParameters,
338
+ execution: Execution,
339
+ ) -> Fod2fixelOutputs:
340
+ """
341
+ Build outputs object containing output file paths and possibly stdout/stderr.
342
+
343
+ Args:
344
+ params: The parameters.
345
+ execution: The execution object for resolving input paths.
346
+ Returns:
347
+ Outputs object.
348
+ """
349
+ ret = Fod2fixelOutputs(
350
+ root=execution.output_file("."),
351
+ fixel_directory=execution.output_file(params.get("fixel_directory")),
352
+ afd=execution.output_file(params.get("afd")) if (params.get("afd") is not None) else None,
353
+ peak_amp=execution.output_file(params.get("peak_amp")) if (params.get("peak_amp") is not None) else None,
354
+ disp=execution.output_file(params.get("disp")) if (params.get("disp") is not None) else None,
355
+ )
356
+ return ret
357
+
358
+
359
+ def fod2fixel_execute(
360
+ params: Fod2fixelParameters,
361
+ execution: Execution,
362
+ ) -> Fod2fixelOutputs:
363
+ """
364
+ Perform segmentation of continuous Fibre Orientation Distributions (FODs) to
365
+ produce discrete fixels.
366
+
367
+
368
+
369
+ References:
370
+
371
+ * Reference for the FOD segmentation method:
372
+ Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. SIFT:
373
+ Spherical-deconvolution informed filtering of tractograms. NeuroImage, 2013,
374
+ 67, 298-312 (Appendix 2)
375
+
376
+ * Reference for Apparent Fibre Density (AFD):
377
+ Raffelt, D.; Tournier, J.-D.; Rose, S.; Ridgway, G.R.; Henderson, R.;
378
+ Crozier, S.; Salvado, O.; Connelly, A. Apparent Fibre Density: a novel
379
+ measure for the analysis of diffusion-weighted magnetic resonance
380
+ images.Neuroimage, 2012, 15;59(4), 3976-94.
381
+
382
+ Author: MRTrix3 Developers
383
+
384
+ URL: https://www.mrtrix.org/
385
+
386
+ Args:
387
+ params: The parameters.
388
+ execution: The execution object.
389
+ Returns:
390
+ NamedTuple of outputs (described in `Fod2fixelOutputs`).
391
+ """
392
+ params = execution.params(params)
393
+ cargs = fod2fixel_cargs(params, execution)
394
+ ret = fod2fixel_outputs(params, execution)
395
+ execution.run(cargs)
396
+ return ret
397
+
398
+
399
+ def fod2fixel(
400
+ fod: InputPathType,
401
+ fixel_directory: str,
402
+ afd: str | None = None,
403
+ peak_amp: str | None = None,
404
+ disp: str | None = None,
405
+ fmls_integral: float | None = None,
406
+ fmls_peak_value: float | None = None,
407
+ fmls_no_thresholds: bool = False,
408
+ fmls_lobe_merge_ratio: float | None = None,
409
+ mask: InputPathType | None = None,
410
+ maxnum: int | None = None,
411
+ nii: bool = False,
412
+ dirpeak: bool = False,
413
+ info: bool = False,
414
+ quiet: bool = False,
415
+ debug: bool = False,
416
+ force: bool = False,
417
+ nthreads: int | None = None,
418
+ config: list[Fod2fixelConfigParameters] | None = None,
419
+ help_: bool = False,
420
+ version: bool = False,
421
+ runner: Runner | None = None,
422
+ ) -> Fod2fixelOutputs:
423
+ """
424
+ Perform segmentation of continuous Fibre Orientation Distributions (FODs) to
425
+ produce discrete fixels.
426
+
427
+
428
+
429
+ References:
430
+
431
+ * Reference for the FOD segmentation method:
432
+ Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. SIFT:
433
+ Spherical-deconvolution informed filtering of tractograms. NeuroImage, 2013,
434
+ 67, 298-312 (Appendix 2)
435
+
436
+ * Reference for Apparent Fibre Density (AFD):
437
+ Raffelt, D.; Tournier, J.-D.; Rose, S.; Ridgway, G.R.; Henderson, R.;
438
+ Crozier, S.; Salvado, O.; Connelly, A. Apparent Fibre Density: a novel
439
+ measure for the analysis of diffusion-weighted magnetic resonance
440
+ images.Neuroimage, 2012, 15;59(4), 3976-94.
441
+
442
+ Author: MRTrix3 Developers
443
+
444
+ URL: https://www.mrtrix.org/
445
+
446
+ Args:
447
+ fod: the input fod image.
448
+ fixel_directory: the output fixel directory.
449
+ afd: output the total Apparent Fibre Density per fixel (integral of FOD\
450
+ lobe).
451
+ peak_amp: output the amplitude of the FOD at the maximal peak per fixel.
452
+ disp: output a measure of dispersion per fixel as the ratio between FOD\
453
+ lobe integral and maximal peak amplitude.
454
+ fmls_integral: threshold absolute numerical integral of positive FOD\
455
+ lobes. Any lobe for which the integral is smaller than this threshold\
456
+ will be discarded. Default: 0.
457
+ fmls_peak_value: threshold peak amplitude of positive FOD lobes. Any\
458
+ lobe for which the maximal peak amplitude is smaller than this\
459
+ threshold will be discarded. Default: 0.1.
460
+ fmls_no_thresholds: disable all FOD lobe thresholding; every lobe where\
461
+ the FOD is positive will be retained.
462
+ fmls_lobe_merge_ratio: Specify the ratio between a given FOD amplitude\
463
+ sample between two lobes, and the smallest peak amplitude of the\
464
+ adjacent lobes, above which those lobes will be merged. This is the\
465
+ amplitude of the FOD at the 'bridge' point between the two lobes,\
466
+ divided by the peak amplitude of the smaller of the two adjoining\
467
+ lobes. A value of 1.0 will never merge two lobes into one; a value of\
468
+ 0.0 will always merge lobes unless they are bisected by a zero-valued\
469
+ crossing. Default: 1.
470
+ mask: only perform computation within the specified binary brain mask\
471
+ image.
472
+ maxnum: maximum number of fixels to output for any particular voxel\
473
+ (default: no limit).
474
+ nii: output the directions and index file in nii format (instead of the\
475
+ default mif).
476
+ dirpeak: define the fixel direction as that of the lobe's maximal peak\
477
+ as opposed to its weighted mean direction (the default).
478
+ info: display information messages.
479
+ quiet: do not display information messages or progress status;\
480
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
481
+ environment variable to a non-empty string.
482
+ debug: display debugging messages.
483
+ force: force overwrite of output files (caution: using the same file as\
484
+ input and output might cause unexpected behaviour).
485
+ nthreads: use this number of threads in multi-threaded applications\
486
+ (set to 0 to disable multi-threading).
487
+ config: temporarily set the value of an MRtrix config file entry.
488
+ help_: display this information page and exit.
489
+ version: display version information and exit.
490
+ runner: Command runner.
491
+ Returns:
492
+ NamedTuple of outputs (described in `Fod2fixelOutputs`).
493
+ """
494
+ runner = runner or get_global_runner()
495
+ execution = runner.start_execution(FOD2FIXEL_METADATA)
496
+ params = fod2fixel_params(
497
+ afd=afd,
498
+ peak_amp=peak_amp,
499
+ disp=disp,
500
+ fmls_integral=fmls_integral,
501
+ fmls_peak_value=fmls_peak_value,
502
+ fmls_no_thresholds=fmls_no_thresholds,
503
+ fmls_lobe_merge_ratio=fmls_lobe_merge_ratio,
504
+ mask=mask,
505
+ maxnum=maxnum,
506
+ nii=nii,
507
+ dirpeak=dirpeak,
508
+ info=info,
509
+ quiet=quiet,
510
+ debug=debug,
511
+ force=force,
512
+ nthreads=nthreads,
513
+ config=config,
514
+ help_=help_,
515
+ version=version,
516
+ fod=fod,
517
+ fixel_directory=fixel_directory,
518
+ )
519
+ return fod2fixel_execute(params, execution)
520
+
521
+
522
+ __all__ = [
523
+ "FOD2FIXEL_METADATA",
524
+ "Fod2fixelConfigParameters",
525
+ "Fod2fixelOutputs",
526
+ "Fod2fixelParameters",
527
+ "fod2fixel",
528
+ "fod2fixel_config_params",
529
+ "fod2fixel_params",
530
+ ]