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,478 @@
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
+ DWIDENOISE_METADATA = Metadata(
9
+ id="ed89d7a30761400bc9f73bcffb1319ae9ec84397.boutiques",
10
+ name="dwidenoise",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ DwidenoiseConfigParameters = typing.TypedDict('DwidenoiseConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ DwidenoiseParameters = typing.TypedDict('DwidenoiseParameters', {
24
+ "__STYX_TYPE__": typing.Literal["dwidenoise"],
25
+ "mask": typing.NotRequired[InputPathType | None],
26
+ "extent": typing.NotRequired[list[int] | None],
27
+ "noise": typing.NotRequired[str | None],
28
+ "datatype": typing.NotRequired[str | None],
29
+ "estimator": typing.NotRequired[str | None],
30
+ "info": bool,
31
+ "quiet": bool,
32
+ "debug": bool,
33
+ "force": bool,
34
+ "nthreads": typing.NotRequired[int | None],
35
+ "config": typing.NotRequired[list[DwidenoiseConfigParameters] | None],
36
+ "help": bool,
37
+ "version": bool,
38
+ "dwi": InputPathType,
39
+ "out": str,
40
+ })
41
+
42
+
43
+ def dyn_cargs(
44
+ t: str,
45
+ ) -> typing.Any:
46
+ """
47
+ Get build cargs function by command type.
48
+
49
+ Args:
50
+ t: Command type.
51
+ Returns:
52
+ Build cargs function.
53
+ """
54
+ return {
55
+ "dwidenoise": dwidenoise_cargs,
56
+ "config": dwidenoise_config_cargs,
57
+ }.get(t)
58
+
59
+
60
+ def dyn_outputs(
61
+ t: str,
62
+ ) -> typing.Any:
63
+ """
64
+ Get build outputs function by command type.
65
+
66
+ Args:
67
+ t: Command type.
68
+ Returns:
69
+ Build outputs function.
70
+ """
71
+ return {
72
+ "dwidenoise": dwidenoise_outputs,
73
+ }.get(t)
74
+
75
+
76
+ def dwidenoise_config_params(
77
+ key: str,
78
+ value: str,
79
+ ) -> DwidenoiseConfigParameters:
80
+ """
81
+ Build parameters.
82
+
83
+ Args:
84
+ key: temporarily set the value of an MRtrix config file entry.
85
+ value: temporarily set the value of an MRtrix config file entry.
86
+ Returns:
87
+ Parameter dictionary
88
+ """
89
+ params = {
90
+ "__STYXTYPE__": "config",
91
+ "key": key,
92
+ "value": value,
93
+ }
94
+ return params
95
+
96
+
97
+ def dwidenoise_config_cargs(
98
+ params: DwidenoiseConfigParameters,
99
+ execution: Execution,
100
+ ) -> list[str]:
101
+ """
102
+ Build command-line arguments from parameters.
103
+
104
+ Args:
105
+ params: The parameters.
106
+ execution: The execution object for resolving input paths.
107
+ Returns:
108
+ Command-line arguments.
109
+ """
110
+ cargs = []
111
+ cargs.append("-config")
112
+ cargs.append(params.get("key"))
113
+ cargs.append(params.get("value"))
114
+ return cargs
115
+
116
+
117
+ class DwidenoiseOutputs(typing.NamedTuple):
118
+ """
119
+ Output object returned when calling `dwidenoise(...)`.
120
+ """
121
+ root: OutputPathType
122
+ """Output root folder. This is the root folder for all outputs."""
123
+ out: OutputPathType
124
+ """the output denoised DWI image."""
125
+ noise: OutputPathType | None
126
+ """The output noise map, i.e., the estimated noise level 'sigma' in the
127
+ data. Note that on complex input data, this will be the total noise level
128
+ across real and imaginary channels, so a scale factor sqrt(2) applies. """
129
+
130
+
131
+ def dwidenoise_params(
132
+ dwi: InputPathType,
133
+ out: str,
134
+ mask: InputPathType | None = None,
135
+ extent: list[int] | None = None,
136
+ noise: str | None = None,
137
+ datatype: str | None = None,
138
+ estimator: str | None = None,
139
+ info: bool = False,
140
+ quiet: bool = False,
141
+ debug: bool = False,
142
+ force: bool = False,
143
+ nthreads: int | None = None,
144
+ config: list[DwidenoiseConfigParameters] | None = None,
145
+ help_: bool = False,
146
+ version: bool = False,
147
+ ) -> DwidenoiseParameters:
148
+ """
149
+ Build parameters.
150
+
151
+ Args:
152
+ dwi: the input diffusion-weighted image.
153
+ out: the output denoised DWI image.
154
+ mask: Only process voxels within the specified binary brain mask image.
155
+ extent: Set the patch size of the denoising filter. By default, the\
156
+ command will select the smallest isotropic patch size that exceeds the\
157
+ number of DW images in the input data, e.g., 5x5x5 for data with <= 125\
158
+ DWI volumes, 7x7x7 for data with <= 343 DWI volumes, etc.
159
+ noise: The output noise map, i.e., the estimated noise level 'sigma' in\
160
+ the data. Note that on complex input data, this will be the total noise\
161
+ level across real and imaginary channels, so a scale factor sqrt(2)\
162
+ applies.
163
+ datatype: Datatype for the eigenvalue decomposition (single or double\
164
+ precision). For complex input data, this will select complex float32 or\
165
+ complex float64 datatypes.
166
+ estimator: Select the noise level estimator (default = Exp2), either:\
167
+ * Exp1: the original estimator used in Veraart et al. (2016), or\
168
+ * Exp2: the improved estimator introduced in Cordero-Grande et al.\
169
+ (2019).
170
+ info: display information messages.
171
+ quiet: do not display information messages or progress status;\
172
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
173
+ environment variable to a non-empty string.
174
+ debug: display debugging messages.
175
+ force: force overwrite of output files (caution: using the same file as\
176
+ input and output might cause unexpected behaviour).
177
+ nthreads: use this number of threads in multi-threaded applications\
178
+ (set to 0 to disable multi-threading).
179
+ config: temporarily set the value of an MRtrix config file entry.
180
+ help_: display this information page and exit.
181
+ version: display version information and exit.
182
+ Returns:
183
+ Parameter dictionary
184
+ """
185
+ params = {
186
+ "__STYXTYPE__": "dwidenoise",
187
+ "info": info,
188
+ "quiet": quiet,
189
+ "debug": debug,
190
+ "force": force,
191
+ "help": help_,
192
+ "version": version,
193
+ "dwi": dwi,
194
+ "out": out,
195
+ }
196
+ if mask is not None:
197
+ params["mask"] = mask
198
+ if extent is not None:
199
+ params["extent"] = extent
200
+ if noise is not None:
201
+ params["noise"] = noise
202
+ if datatype is not None:
203
+ params["datatype"] = datatype
204
+ if estimator is not None:
205
+ params["estimator"] = estimator
206
+ if nthreads is not None:
207
+ params["nthreads"] = nthreads
208
+ if config is not None:
209
+ params["config"] = config
210
+ return params
211
+
212
+
213
+ def dwidenoise_cargs(
214
+ params: DwidenoiseParameters,
215
+ execution: Execution,
216
+ ) -> list[str]:
217
+ """
218
+ Build command-line arguments from parameters.
219
+
220
+ Args:
221
+ params: The parameters.
222
+ execution: The execution object for resolving input paths.
223
+ Returns:
224
+ Command-line arguments.
225
+ """
226
+ cargs = []
227
+ cargs.append("dwidenoise")
228
+ if params.get("mask") is not None:
229
+ cargs.extend([
230
+ "-mask",
231
+ execution.input_file(params.get("mask"))
232
+ ])
233
+ if params.get("extent") is not None:
234
+ cargs.extend([
235
+ "-extent",
236
+ *map(str, params.get("extent"))
237
+ ])
238
+ if params.get("noise") is not None:
239
+ cargs.extend([
240
+ "-noise",
241
+ params.get("noise")
242
+ ])
243
+ if params.get("datatype") is not None:
244
+ cargs.extend([
245
+ "-datatype",
246
+ params.get("datatype")
247
+ ])
248
+ if params.get("estimator") is not None:
249
+ cargs.extend([
250
+ "-estimator",
251
+ params.get("estimator")
252
+ ])
253
+ if params.get("info"):
254
+ cargs.append("-info")
255
+ if params.get("quiet"):
256
+ cargs.append("-quiet")
257
+ if params.get("debug"):
258
+ cargs.append("-debug")
259
+ if params.get("force"):
260
+ cargs.append("-force")
261
+ if params.get("nthreads") is not None:
262
+ cargs.extend([
263
+ "-nthreads",
264
+ str(params.get("nthreads"))
265
+ ])
266
+ if params.get("config") is not None:
267
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
268
+ if params.get("help"):
269
+ cargs.append("-help")
270
+ if params.get("version"):
271
+ cargs.append("-version")
272
+ cargs.append(execution.input_file(params.get("dwi")))
273
+ cargs.append(params.get("out"))
274
+ return cargs
275
+
276
+
277
+ def dwidenoise_outputs(
278
+ params: DwidenoiseParameters,
279
+ execution: Execution,
280
+ ) -> DwidenoiseOutputs:
281
+ """
282
+ Build outputs object containing output file paths and possibly stdout/stderr.
283
+
284
+ Args:
285
+ params: The parameters.
286
+ execution: The execution object for resolving input paths.
287
+ Returns:
288
+ Outputs object.
289
+ """
290
+ ret = DwidenoiseOutputs(
291
+ root=execution.output_file("."),
292
+ out=execution.output_file(params.get("out")),
293
+ noise=execution.output_file(params.get("noise")) if (params.get("noise") is not None) else None,
294
+ )
295
+ return ret
296
+
297
+
298
+ def dwidenoise_execute(
299
+ params: DwidenoiseParameters,
300
+ execution: Execution,
301
+ ) -> DwidenoiseOutputs:
302
+ """
303
+ dMRI noise level estimation and denoising using Marchenko-Pastur PCA.
304
+
305
+ DWI data denoising and noise map estimation by exploiting data redundancy in
306
+ the PCA domain using the prior knowledge that the eigenspectrum of random
307
+ covariance matrices is described by the universal Marchenko-Pastur (MP)
308
+ distribution. Fitting the MP distribution to the spectrum of patch-wise
309
+ signal matrices hence provides an estimator of the noise level 'sigma', as
310
+ was first shown in Veraart et al. (2016) and later improved in
311
+ Cordero-Grande et al. (2019). This noise level estimate then determines the
312
+ optimal cut-off for PCA denoising.
313
+
314
+ Important note: image denoising must be performed as the first step of the
315
+ image processing pipeline. The routine will fail if interpolation or
316
+ smoothing has been applied to the data prior to denoising.
317
+
318
+ Note that this function does not correct for non-Gaussian noise biases
319
+ present in magnitude-reconstructed MRI images. If available, including the
320
+ MRI phase data can reduce such non-Gaussian biases, and the command now
321
+ supports complex input data.
322
+
323
+ References:
324
+
325
+ Veraart, J.; Novikov, D.S.; Christiaens, D.; Ades-aron, B.; Sijbers, J. &
326
+ Fieremans, E. Denoising of diffusion MRI using random matrix theory.
327
+ NeuroImage, 2016, 142, 394-406, doi: 10.1016/j.neuroimage.2016.08.016
328
+
329
+ Veraart, J.; Fieremans, E. & Novikov, D.S. Diffusion MRI noise mapping using
330
+ random matrix theory. Magn. Res. Med., 2016, 76(5), 1582-1593, doi:
331
+ 10.1002/mrm.26059
332
+
333
+ Cordero-Grande, L.; Christiaens, D.; Hutter, J.; Price, A.N.; Hajnal, J.V.
334
+ Complex diffusion-weighted image estimation via matrix recovery under
335
+ general noise models. NeuroImage, 2019, 200, 391-404, doi:
336
+ 10.1016/j.neuroimage.2019.06.039.
337
+
338
+ Author: MRTrix3 Developers
339
+
340
+ URL: https://www.mrtrix.org/
341
+
342
+ Args:
343
+ params: The parameters.
344
+ execution: The execution object.
345
+ Returns:
346
+ NamedTuple of outputs (described in `DwidenoiseOutputs`).
347
+ """
348
+ params = execution.params(params)
349
+ cargs = dwidenoise_cargs(params, execution)
350
+ ret = dwidenoise_outputs(params, execution)
351
+ execution.run(cargs)
352
+ return ret
353
+
354
+
355
+ def dwidenoise(
356
+ dwi: InputPathType,
357
+ out: str,
358
+ mask: InputPathType | None = None,
359
+ extent: list[int] | None = None,
360
+ noise: str | None = None,
361
+ datatype: str | None = None,
362
+ estimator: str | None = None,
363
+ info: bool = False,
364
+ quiet: bool = False,
365
+ debug: bool = False,
366
+ force: bool = False,
367
+ nthreads: int | None = None,
368
+ config: list[DwidenoiseConfigParameters] | None = None,
369
+ help_: bool = False,
370
+ version: bool = False,
371
+ runner: Runner | None = None,
372
+ ) -> DwidenoiseOutputs:
373
+ """
374
+ dMRI noise level estimation and denoising using Marchenko-Pastur PCA.
375
+
376
+ DWI data denoising and noise map estimation by exploiting data redundancy in
377
+ the PCA domain using the prior knowledge that the eigenspectrum of random
378
+ covariance matrices is described by the universal Marchenko-Pastur (MP)
379
+ distribution. Fitting the MP distribution to the spectrum of patch-wise
380
+ signal matrices hence provides an estimator of the noise level 'sigma', as
381
+ was first shown in Veraart et al. (2016) and later improved in
382
+ Cordero-Grande et al. (2019). This noise level estimate then determines the
383
+ optimal cut-off for PCA denoising.
384
+
385
+ Important note: image denoising must be performed as the first step of the
386
+ image processing pipeline. The routine will fail if interpolation or
387
+ smoothing has been applied to the data prior to denoising.
388
+
389
+ Note that this function does not correct for non-Gaussian noise biases
390
+ present in magnitude-reconstructed MRI images. If available, including the
391
+ MRI phase data can reduce such non-Gaussian biases, and the command now
392
+ supports complex input data.
393
+
394
+ References:
395
+
396
+ Veraart, J.; Novikov, D.S.; Christiaens, D.; Ades-aron, B.; Sijbers, J. &
397
+ Fieremans, E. Denoising of diffusion MRI using random matrix theory.
398
+ NeuroImage, 2016, 142, 394-406, doi: 10.1016/j.neuroimage.2016.08.016
399
+
400
+ Veraart, J.; Fieremans, E. & Novikov, D.S. Diffusion MRI noise mapping using
401
+ random matrix theory. Magn. Res. Med., 2016, 76(5), 1582-1593, doi:
402
+ 10.1002/mrm.26059
403
+
404
+ Cordero-Grande, L.; Christiaens, D.; Hutter, J.; Price, A.N.; Hajnal, J.V.
405
+ Complex diffusion-weighted image estimation via matrix recovery under
406
+ general noise models. NeuroImage, 2019, 200, 391-404, doi:
407
+ 10.1016/j.neuroimage.2019.06.039.
408
+
409
+ Author: MRTrix3 Developers
410
+
411
+ URL: https://www.mrtrix.org/
412
+
413
+ Args:
414
+ dwi: the input diffusion-weighted image.
415
+ out: the output denoised DWI image.
416
+ mask: Only process voxels within the specified binary brain mask image.
417
+ extent: Set the patch size of the denoising filter. By default, the\
418
+ command will select the smallest isotropic patch size that exceeds the\
419
+ number of DW images in the input data, e.g., 5x5x5 for data with <= 125\
420
+ DWI volumes, 7x7x7 for data with <= 343 DWI volumes, etc.
421
+ noise: The output noise map, i.e., the estimated noise level 'sigma' in\
422
+ the data. Note that on complex input data, this will be the total noise\
423
+ level across real and imaginary channels, so a scale factor sqrt(2)\
424
+ applies.
425
+ datatype: Datatype for the eigenvalue decomposition (single or double\
426
+ precision). For complex input data, this will select complex float32 or\
427
+ complex float64 datatypes.
428
+ estimator: Select the noise level estimator (default = Exp2), either:\
429
+ * Exp1: the original estimator used in Veraart et al. (2016), or\
430
+ * Exp2: the improved estimator introduced in Cordero-Grande et al.\
431
+ (2019).
432
+ info: display information messages.
433
+ quiet: do not display information messages or progress status;\
434
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
435
+ environment variable to a non-empty string.
436
+ debug: display debugging messages.
437
+ force: force overwrite of output files (caution: using the same file as\
438
+ input and output might cause unexpected behaviour).
439
+ nthreads: use this number of threads in multi-threaded applications\
440
+ (set to 0 to disable multi-threading).
441
+ config: temporarily set the value of an MRtrix config file entry.
442
+ help_: display this information page and exit.
443
+ version: display version information and exit.
444
+ runner: Command runner.
445
+ Returns:
446
+ NamedTuple of outputs (described in `DwidenoiseOutputs`).
447
+ """
448
+ runner = runner or get_global_runner()
449
+ execution = runner.start_execution(DWIDENOISE_METADATA)
450
+ params = dwidenoise_params(
451
+ mask=mask,
452
+ extent=extent,
453
+ noise=noise,
454
+ datatype=datatype,
455
+ estimator=estimator,
456
+ info=info,
457
+ quiet=quiet,
458
+ debug=debug,
459
+ force=force,
460
+ nthreads=nthreads,
461
+ config=config,
462
+ help_=help_,
463
+ version=version,
464
+ dwi=dwi,
465
+ out=out,
466
+ )
467
+ return dwidenoise_execute(params, execution)
468
+
469
+
470
+ __all__ = [
471
+ "DWIDENOISE_METADATA",
472
+ "DwidenoiseConfigParameters",
473
+ "DwidenoiseOutputs",
474
+ "DwidenoiseParameters",
475
+ "dwidenoise",
476
+ "dwidenoise_config_params",
477
+ "dwidenoise_params",
478
+ ]