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,445 @@
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
+ SHBASIS_METADATA = Metadata(
9
+ id="8d1c3a9e142d8ac3b0cfbca9e0fcd6b3d41e317e.boutiques",
10
+ name="shbasis",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _ShbasisConfigParamsDictNoTag = typing.TypedDict('_ShbasisConfigParamsDictNoTag', {
17
+ "key": str,
18
+ "value": str,
19
+ })
20
+ ShbasisConfigParamsDictTagged = typing.TypedDict('ShbasisConfigParamsDictTagged', {
21
+ "@type": typing.Literal["config"],
22
+ "key": str,
23
+ "value": str,
24
+ })
25
+ ShbasisConfigParamsDict = _ShbasisConfigParamsDictNoTag | ShbasisConfigParamsDictTagged
26
+
27
+
28
+ _ShbasisParamsDictNoTag = typing.TypedDict('_ShbasisParamsDictNoTag', {
29
+ "convert": 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[ShbasisConfigParamsDict] | None],
36
+ "help": bool,
37
+ "version": bool,
38
+ "SH": list[InputPathType],
39
+ })
40
+ ShbasisParamsDictTagged = typing.TypedDict('ShbasisParamsDictTagged', {
41
+ "@type": typing.Literal["mrtrix/shbasis"],
42
+ "convert": typing.NotRequired[str | None],
43
+ "info": bool,
44
+ "quiet": bool,
45
+ "debug": bool,
46
+ "force": bool,
47
+ "nthreads": typing.NotRequired[int | None],
48
+ "config": typing.NotRequired[list[ShbasisConfigParamsDict] | None],
49
+ "help": bool,
50
+ "version": bool,
51
+ "SH": list[InputPathType],
52
+ })
53
+ ShbasisParamsDict = _ShbasisParamsDictNoTag | ShbasisParamsDictTagged
54
+
55
+
56
+ def shbasis_config(
57
+ key: str,
58
+ value: str,
59
+ ) -> ShbasisConfigParamsDictTagged:
60
+ """
61
+ Build parameters.
62
+
63
+ Args:
64
+ key: temporarily set the value of an MRtrix config file entry.
65
+ value: temporarily set the value of an MRtrix config file entry.
66
+ Returns:
67
+ Parameter dictionary
68
+ """
69
+ params = {
70
+ "@type": "config",
71
+ "key": key,
72
+ "value": value,
73
+ }
74
+ return params
75
+
76
+
77
+ def shbasis_config_validate(
78
+ params: typing.Any,
79
+ ) -> None:
80
+ """
81
+ Validate parameters. Throws an error if `params` is not a valid
82
+ `ShbasisConfigParamsDict` object.
83
+
84
+ Args:
85
+ params: The parameters object to validate.
86
+ """
87
+ if params is None or not isinstance(params, dict):
88
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
89
+ if params.get("key", None) is None:
90
+ raise StyxValidationError("`key` must not be None")
91
+ if not isinstance(params["key"], str):
92
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
93
+ if params.get("value", None) is None:
94
+ raise StyxValidationError("`value` must not be None")
95
+ if not isinstance(params["value"], str):
96
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
97
+
98
+
99
+ def shbasis_config_cargs(
100
+ params: ShbasisConfigParamsDict,
101
+ execution: Execution,
102
+ ) -> list[str]:
103
+ """
104
+ Build command-line arguments from parameters.
105
+
106
+ Args:
107
+ params: The parameters.
108
+ execution: The execution object for resolving input paths.
109
+ Returns:
110
+ Command-line arguments.
111
+ """
112
+ cargs = []
113
+ cargs.append("-config")
114
+ cargs.append(params.get("key", None))
115
+ cargs.append(params.get("value", None))
116
+ return cargs
117
+
118
+
119
+ class ShbasisOutputs(typing.NamedTuple):
120
+ """
121
+ Output object returned when calling `ShbasisParamsDict(...)`.
122
+ """
123
+ root: OutputPathType
124
+ """Output root folder. This is the root folder for all outputs."""
125
+
126
+
127
+ def shbasis_params(
128
+ sh: list[InputPathType],
129
+ convert: str | None = None,
130
+ info: bool = False,
131
+ quiet: bool = False,
132
+ debug: bool = False,
133
+ force: bool = False,
134
+ nthreads: int | None = None,
135
+ config: list[ShbasisConfigParamsDict] | None = None,
136
+ help_: bool = False,
137
+ version: bool = False,
138
+ ) -> ShbasisParamsDictTagged:
139
+ """
140
+ Build parameters.
141
+
142
+ Args:
143
+ sh: the input image(s) of SH coefficients.
144
+ convert: convert the image data in-place to the desired basis; options\
145
+ are: old,new,force_oldtonew,force_newtoold.
146
+ info: display information messages.
147
+ quiet: do not display information messages or progress status;\
148
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
149
+ environment variable to a non-empty string.
150
+ debug: display debugging messages.
151
+ force: force overwrite of output files (caution: using the same file as\
152
+ input and output might cause unexpected behaviour).
153
+ nthreads: use this number of threads in multi-threaded applications\
154
+ (set to 0 to disable multi-threading).
155
+ config: temporarily set the value of an MRtrix config file entry.
156
+ help_: display this information page and exit.
157
+ version: display version information and exit.
158
+ Returns:
159
+ Parameter dictionary
160
+ """
161
+ params = {
162
+ "@type": "mrtrix/shbasis",
163
+ "info": info,
164
+ "quiet": quiet,
165
+ "debug": debug,
166
+ "force": force,
167
+ "help": help_,
168
+ "version": version,
169
+ "SH": sh,
170
+ }
171
+ if convert is not None:
172
+ params["convert"] = convert
173
+ if nthreads is not None:
174
+ params["nthreads"] = nthreads
175
+ if config is not None:
176
+ params["config"] = config
177
+ return params
178
+
179
+
180
+ def shbasis_validate(
181
+ params: typing.Any,
182
+ ) -> None:
183
+ """
184
+ Validate parameters. Throws an error if `params` is not a valid
185
+ `ShbasisParamsDict` object.
186
+
187
+ Args:
188
+ params: The parameters object to validate.
189
+ """
190
+ if params is None or not isinstance(params, dict):
191
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
192
+ if params.get("convert", None) is not None:
193
+ if not isinstance(params["convert"], str):
194
+ raise StyxValidationError(f'`convert` has the wrong type: Received `{type(params.get("convert", None))}` expected `str | None`')
195
+ if params.get("info", False) is None:
196
+ raise StyxValidationError("`info` must not be None")
197
+ if not isinstance(params["info"], bool):
198
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
199
+ if params.get("quiet", False) is None:
200
+ raise StyxValidationError("`quiet` must not be None")
201
+ if not isinstance(params["quiet"], bool):
202
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
203
+ if params.get("debug", False) is None:
204
+ raise StyxValidationError("`debug` must not be None")
205
+ if not isinstance(params["debug"], bool):
206
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
207
+ if params.get("force", False) is None:
208
+ raise StyxValidationError("`force` must not be None")
209
+ if not isinstance(params["force"], bool):
210
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
211
+ if params.get("nthreads", None) is not None:
212
+ if not isinstance(params["nthreads"], int):
213
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
214
+ if params.get("config", None) is not None:
215
+ if not isinstance(params["config"], list):
216
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[ShbasisConfigParamsDict] | None`')
217
+ for e in params["config"]:
218
+ shbasis_config_validate(e)
219
+ if params.get("help", False) is None:
220
+ raise StyxValidationError("`help` must not be None")
221
+ if not isinstance(params["help"], bool):
222
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
223
+ if params.get("version", False) is None:
224
+ raise StyxValidationError("`version` must not be None")
225
+ if not isinstance(params["version"], bool):
226
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
227
+ if params.get("SH", None) is None:
228
+ raise StyxValidationError("`SH` must not be None")
229
+ if not isinstance(params["SH"], list):
230
+ raise StyxValidationError(f'`SH` has the wrong type: Received `{type(params.get("SH", None))}` expected `list[InputPathType]`')
231
+ for e in params["SH"]:
232
+ if not isinstance(e, (pathlib.Path, str)):
233
+ raise StyxValidationError(f'`SH` has the wrong type: Received `{type(params.get("SH", None))}` expected `list[InputPathType]`')
234
+
235
+
236
+ def shbasis_cargs(
237
+ params: ShbasisParamsDict,
238
+ execution: Execution,
239
+ ) -> list[str]:
240
+ """
241
+ Build command-line arguments from parameters.
242
+
243
+ Args:
244
+ params: The parameters.
245
+ execution: The execution object for resolving input paths.
246
+ Returns:
247
+ Command-line arguments.
248
+ """
249
+ cargs = []
250
+ cargs.append("shbasis")
251
+ if params.get("convert", None) is not None:
252
+ cargs.extend([
253
+ "-convert",
254
+ params.get("convert", None)
255
+ ])
256
+ if params.get("info", False):
257
+ cargs.append("-info")
258
+ if params.get("quiet", False):
259
+ cargs.append("-quiet")
260
+ if params.get("debug", False):
261
+ cargs.append("-debug")
262
+ if params.get("force", False):
263
+ cargs.append("-force")
264
+ if params.get("nthreads", None) is not None:
265
+ cargs.extend([
266
+ "-nthreads",
267
+ str(params.get("nthreads", None))
268
+ ])
269
+ if params.get("config", None) is not None:
270
+ cargs.extend([a for c in [shbasis_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
271
+ if params.get("help", False):
272
+ cargs.append("-help")
273
+ if params.get("version", False):
274
+ cargs.append("-version")
275
+ cargs.extend([execution.input_file(f) for f in params.get("SH", None)])
276
+ return cargs
277
+
278
+
279
+ def shbasis_outputs(
280
+ params: ShbasisParamsDict,
281
+ execution: Execution,
282
+ ) -> ShbasisOutputs:
283
+ """
284
+ Build outputs object containing output file paths and possibly stdout/stderr.
285
+
286
+ Args:
287
+ params: The parameters.
288
+ execution: The execution object for resolving input paths.
289
+ Returns:
290
+ Outputs object.
291
+ """
292
+ ret = ShbasisOutputs(
293
+ root=execution.output_file("."),
294
+ )
295
+ return ret
296
+
297
+
298
+ def shbasis_execute(
299
+ params: ShbasisParamsDict,
300
+ runner: Runner | None = None,
301
+ ) -> ShbasisOutputs:
302
+ """
303
+ shbasis
304
+
305
+ Examine the values in spherical harmonic images to estimate (and optionally
306
+ change) the SH basis used.
307
+
308
+ In previous versions of MRtrix, the convention used for storing spherical
309
+ harmonic coefficients was a non-orthonormal basis (the m!=0 coefficients
310
+ were a factor of sqrt(2) too large). This error has been rectified in newer
311
+ versions of MRtrix, but will cause issues if processing SH data that was
312
+ generated using an older version of MRtrix (or vice-versa).
313
+
314
+ This command provides a mechanism for testing the basis used in storage of
315
+ image data representing a spherical harmonic series per voxel, and allows
316
+ the user to forcibly modify the raw image data to conform to the desired
317
+ basis.
318
+
319
+ Note that the "force_*" conversion choices should only be used in cases
320
+ where this command has previously been unable to automatically determine the
321
+ SH basis from the image data, but the user themselves are confident of the
322
+ SH basis of the data.
323
+
324
+ The spherical harmonic coefficients are stored according the conventions
325
+ described the main documentation, which can be found at the following link:
326
+ https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
327
+
328
+ References:
329
+
330
+ .
331
+
332
+ Author: MRTrix3 Developers
333
+
334
+ URL: https://www.mrtrix.org/
335
+
336
+ Args:
337
+ params: The parameters.
338
+ runner: Command runner.
339
+ Returns:
340
+ NamedTuple of outputs (described in `ShbasisOutputs`).
341
+ """
342
+ shbasis_validate(params)
343
+ runner = runner or get_global_runner()
344
+ execution = runner.start_execution(SHBASIS_METADATA)
345
+ params = execution.params(params)
346
+ cargs = shbasis_cargs(params, execution)
347
+ ret = shbasis_outputs(params, execution)
348
+ execution.run(cargs)
349
+ return ret
350
+
351
+
352
+ def shbasis(
353
+ sh: list[InputPathType],
354
+ convert: str | None = None,
355
+ info: bool = False,
356
+ quiet: bool = False,
357
+ debug: bool = False,
358
+ force: bool = False,
359
+ nthreads: int | None = None,
360
+ config: list[ShbasisConfigParamsDict] | None = None,
361
+ help_: bool = False,
362
+ version: bool = False,
363
+ runner: Runner | None = None,
364
+ ) -> ShbasisOutputs:
365
+ """
366
+ shbasis
367
+
368
+ Examine the values in spherical harmonic images to estimate (and optionally
369
+ change) the SH basis used.
370
+
371
+ In previous versions of MRtrix, the convention used for storing spherical
372
+ harmonic coefficients was a non-orthonormal basis (the m!=0 coefficients
373
+ were a factor of sqrt(2) too large). This error has been rectified in newer
374
+ versions of MRtrix, but will cause issues if processing SH data that was
375
+ generated using an older version of MRtrix (or vice-versa).
376
+
377
+ This command provides a mechanism for testing the basis used in storage of
378
+ image data representing a spherical harmonic series per voxel, and allows
379
+ the user to forcibly modify the raw image data to conform to the desired
380
+ basis.
381
+
382
+ Note that the "force_*" conversion choices should only be used in cases
383
+ where this command has previously been unable to automatically determine the
384
+ SH basis from the image data, but the user themselves are confident of the
385
+ SH basis of the data.
386
+
387
+ The spherical harmonic coefficients are stored according the conventions
388
+ described the main documentation, which can be found at the following link:
389
+ https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
390
+
391
+ References:
392
+
393
+ .
394
+
395
+ Author: MRTrix3 Developers
396
+
397
+ URL: https://www.mrtrix.org/
398
+
399
+ Args:
400
+ sh: the input image(s) of SH coefficients.
401
+ convert: convert the image data in-place to the desired basis; options\
402
+ are: old,new,force_oldtonew,force_newtoold.
403
+ info: display information messages.
404
+ quiet: do not display information messages or progress status;\
405
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
406
+ environment variable to a non-empty string.
407
+ debug: display debugging messages.
408
+ force: force overwrite of output files (caution: using the same file as\
409
+ input and output might cause unexpected behaviour).
410
+ nthreads: use this number of threads in multi-threaded applications\
411
+ (set to 0 to disable multi-threading).
412
+ config: temporarily set the value of an MRtrix config file entry.
413
+ help_: display this information page and exit.
414
+ version: display version information and exit.
415
+ runner: Command runner.
416
+ Returns:
417
+ NamedTuple of outputs (described in `ShbasisOutputs`).
418
+ """
419
+ params = shbasis_params(
420
+ convert=convert,
421
+ info=info,
422
+ quiet=quiet,
423
+ debug=debug,
424
+ force=force,
425
+ nthreads=nthreads,
426
+ config=config,
427
+ help_=help_,
428
+ version=version,
429
+ sh=sh,
430
+ )
431
+ return shbasis_execute(params, runner)
432
+
433
+
434
+ __all__ = [
435
+ "SHBASIS_METADATA",
436
+ "ShbasisConfigParamsDict",
437
+ "ShbasisConfigParamsDictTagged",
438
+ "ShbasisOutputs",
439
+ "ShbasisParamsDict",
440
+ "ShbasisParamsDictTagged",
441
+ "shbasis",
442
+ "shbasis_config",
443
+ "shbasis_execute",
444
+ "shbasis_params",
445
+ ]