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,527 @@
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
+ AFDCONNECTIVITY_METADATA = Metadata(
9
+ id="a6fb5580a7faf6e50bbcf57a2c6385623c779645.boutiques",
10
+ name="afdconnectivity",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _AfdconnectivityConfigParamsDictNoTag = typing.TypedDict('_AfdconnectivityConfigParamsDictNoTag', {
17
+ "key": str,
18
+ "value": str,
19
+ })
20
+ AfdconnectivityConfigParamsDictTagged = typing.TypedDict('AfdconnectivityConfigParamsDictTagged', {
21
+ "@type": typing.Literal["config"],
22
+ "key": str,
23
+ "value": str,
24
+ })
25
+ AfdconnectivityConfigParamsDict = _AfdconnectivityConfigParamsDictNoTag | AfdconnectivityConfigParamsDictTagged
26
+
27
+
28
+ _AfdconnectivityParamsDictNoTag = typing.TypedDict('_AfdconnectivityParamsDictNoTag', {
29
+ "wbft": typing.NotRequired[InputPathType | None],
30
+ "afd_map": typing.NotRequired[str | None],
31
+ "all_fixels": bool,
32
+ "info": bool,
33
+ "quiet": bool,
34
+ "debug": bool,
35
+ "force": bool,
36
+ "nthreads": typing.NotRequired[int | None],
37
+ "config": typing.NotRequired[list[AfdconnectivityConfigParamsDict] | None],
38
+ "help": bool,
39
+ "version": bool,
40
+ "image": InputPathType,
41
+ "tracks": InputPathType,
42
+ })
43
+ AfdconnectivityParamsDictTagged = typing.TypedDict('AfdconnectivityParamsDictTagged', {
44
+ "@type": typing.Literal["mrtrix/afdconnectivity"],
45
+ "wbft": typing.NotRequired[InputPathType | None],
46
+ "afd_map": typing.NotRequired[str | None],
47
+ "all_fixels": bool,
48
+ "info": bool,
49
+ "quiet": bool,
50
+ "debug": bool,
51
+ "force": bool,
52
+ "nthreads": typing.NotRequired[int | None],
53
+ "config": typing.NotRequired[list[AfdconnectivityConfigParamsDict] | None],
54
+ "help": bool,
55
+ "version": bool,
56
+ "image": InputPathType,
57
+ "tracks": InputPathType,
58
+ })
59
+ AfdconnectivityParamsDict = _AfdconnectivityParamsDictNoTag | AfdconnectivityParamsDictTagged
60
+
61
+
62
+ def afdconnectivity_config(
63
+ key: str,
64
+ value: str,
65
+ ) -> AfdconnectivityConfigParamsDictTagged:
66
+ """
67
+ Build parameters.
68
+
69
+ Args:
70
+ key: temporarily set the value of an MRtrix config file entry.
71
+ value: temporarily set the value of an MRtrix config file entry.
72
+ Returns:
73
+ Parameter dictionary
74
+ """
75
+ params = {
76
+ "@type": "config",
77
+ "key": key,
78
+ "value": value,
79
+ }
80
+ return params
81
+
82
+
83
+ def afdconnectivity_config_validate(
84
+ params: typing.Any,
85
+ ) -> None:
86
+ """
87
+ Validate parameters. Throws an error if `params` is not a valid
88
+ `AfdconnectivityConfigParamsDict` object.
89
+
90
+ Args:
91
+ params: The parameters object to validate.
92
+ """
93
+ if params is None or not isinstance(params, dict):
94
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
95
+ if params.get("key", None) is None:
96
+ raise StyxValidationError("`key` must not be None")
97
+ if not isinstance(params["key"], str):
98
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
99
+ if params.get("value", None) is None:
100
+ raise StyxValidationError("`value` must not be None")
101
+ if not isinstance(params["value"], str):
102
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
103
+
104
+
105
+ def afdconnectivity_config_cargs(
106
+ params: AfdconnectivityConfigParamsDict,
107
+ execution: Execution,
108
+ ) -> list[str]:
109
+ """
110
+ Build command-line arguments from parameters.
111
+
112
+ Args:
113
+ params: The parameters.
114
+ execution: The execution object for resolving input paths.
115
+ Returns:
116
+ Command-line arguments.
117
+ """
118
+ cargs = []
119
+ cargs.append("-config")
120
+ cargs.append(params.get("key", None))
121
+ cargs.append(params.get("value", None))
122
+ return cargs
123
+
124
+
125
+ class AfdconnectivityOutputs(typing.NamedTuple):
126
+ """
127
+ Output object returned when calling `AfdconnectivityParamsDict(...)`.
128
+ """
129
+ root: OutputPathType
130
+ """Output root folder. This is the root folder for all outputs."""
131
+ afd_map: OutputPathType | None
132
+ """output a 3D image containing the AFD estimated for each voxel. """
133
+
134
+
135
+ def afdconnectivity_params(
136
+ image: InputPathType,
137
+ tracks: InputPathType,
138
+ wbft: InputPathType | None = None,
139
+ afd_map: str | None = None,
140
+ all_fixels: bool = False,
141
+ info: bool = False,
142
+ quiet: bool = False,
143
+ debug: bool = False,
144
+ force: bool = False,
145
+ nthreads: int | None = None,
146
+ config: list[AfdconnectivityConfigParamsDict] | None = None,
147
+ help_: bool = False,
148
+ version: bool = False,
149
+ ) -> AfdconnectivityParamsDictTagged:
150
+ """
151
+ Build parameters.
152
+
153
+ Args:
154
+ image: the input FOD image.
155
+ tracks: the input track file defining the bundle of interest.
156
+ wbft: provide a whole-brain fibre-tracking data set (of which the input\
157
+ track file should be a subset), to improve the estimate of fibre bundle\
158
+ volume in the presence of partial volume.
159
+ afd_map: output a 3D image containing the AFD estimated for each voxel.
160
+ all_fixels: if whole-brain fibre-tracking is NOT provided, then if\
161
+ multiple fixels within a voxel are traversed by the pathway of\
162
+ interest, by default the fixel with the greatest streamlines density is\
163
+ selected to contribute to the AFD in that voxel. If this option is\
164
+ provided, then ALL fixels with non-zero streamlines density will\
165
+ contribute to the result, even if multiple fixels per voxel are\
166
+ selected.
167
+ info: display information messages.
168
+ quiet: do not display information messages or progress status;\
169
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
170
+ environment variable to a non-empty string.
171
+ debug: display debugging messages.
172
+ force: force overwrite of output files (caution: using the same file as\
173
+ input and output might cause unexpected behaviour).
174
+ nthreads: use this number of threads in multi-threaded applications\
175
+ (set to 0 to disable multi-threading).
176
+ config: temporarily set the value of an MRtrix config file entry.
177
+ help_: display this information page and exit.
178
+ version: display version information and exit.
179
+ Returns:
180
+ Parameter dictionary
181
+ """
182
+ params = {
183
+ "@type": "mrtrix/afdconnectivity",
184
+ "all_fixels": all_fixels,
185
+ "info": info,
186
+ "quiet": quiet,
187
+ "debug": debug,
188
+ "force": force,
189
+ "help": help_,
190
+ "version": version,
191
+ "image": image,
192
+ "tracks": tracks,
193
+ }
194
+ if wbft is not None:
195
+ params["wbft"] = wbft
196
+ if afd_map is not None:
197
+ params["afd_map"] = afd_map
198
+ if nthreads is not None:
199
+ params["nthreads"] = nthreads
200
+ if config is not None:
201
+ params["config"] = config
202
+ return params
203
+
204
+
205
+ def afdconnectivity_validate(
206
+ params: typing.Any,
207
+ ) -> None:
208
+ """
209
+ Validate parameters. Throws an error if `params` is not a valid
210
+ `AfdconnectivityParamsDict` object.
211
+
212
+ Args:
213
+ params: The parameters object to validate.
214
+ """
215
+ if params is None or not isinstance(params, dict):
216
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
217
+ if params.get("wbft", None) is not None:
218
+ if not isinstance(params["wbft"], (pathlib.Path, str)):
219
+ raise StyxValidationError(f'`wbft` has the wrong type: Received `{type(params.get("wbft", None))}` expected `InputPathType | None`')
220
+ if params.get("afd_map", None) is not None:
221
+ if not isinstance(params["afd_map"], str):
222
+ raise StyxValidationError(f'`afd_map` has the wrong type: Received `{type(params.get("afd_map", None))}` expected `str | None`')
223
+ if params.get("all_fixels", False) is None:
224
+ raise StyxValidationError("`all_fixels` must not be None")
225
+ if not isinstance(params["all_fixels"], bool):
226
+ raise StyxValidationError(f'`all_fixels` has the wrong type: Received `{type(params.get("all_fixels", False))}` expected `bool`')
227
+ if params.get("info", False) is None:
228
+ raise StyxValidationError("`info` must not be None")
229
+ if not isinstance(params["info"], bool):
230
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
231
+ if params.get("quiet", False) is None:
232
+ raise StyxValidationError("`quiet` must not be None")
233
+ if not isinstance(params["quiet"], bool):
234
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
235
+ if params.get("debug", False) is None:
236
+ raise StyxValidationError("`debug` must not be None")
237
+ if not isinstance(params["debug"], bool):
238
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
239
+ if params.get("force", False) is None:
240
+ raise StyxValidationError("`force` must not be None")
241
+ if not isinstance(params["force"], bool):
242
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
243
+ if params.get("nthreads", None) is not None:
244
+ if not isinstance(params["nthreads"], int):
245
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
246
+ if params.get("config", None) is not None:
247
+ if not isinstance(params["config"], list):
248
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[AfdconnectivityConfigParamsDict] | None`')
249
+ for e in params["config"]:
250
+ afdconnectivity_config_validate(e)
251
+ if params.get("help", False) is None:
252
+ raise StyxValidationError("`help` must not be None")
253
+ if not isinstance(params["help"], bool):
254
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
255
+ if params.get("version", False) is None:
256
+ raise StyxValidationError("`version` must not be None")
257
+ if not isinstance(params["version"], bool):
258
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
259
+ if params.get("image", None) is None:
260
+ raise StyxValidationError("`image` must not be None")
261
+ if not isinstance(params["image"], (pathlib.Path, str)):
262
+ raise StyxValidationError(f'`image` has the wrong type: Received `{type(params.get("image", None))}` expected `InputPathType`')
263
+ if params.get("tracks", None) is None:
264
+ raise StyxValidationError("`tracks` must not be None")
265
+ if not isinstance(params["tracks"], (pathlib.Path, str)):
266
+ raise StyxValidationError(f'`tracks` has the wrong type: Received `{type(params.get("tracks", None))}` expected `InputPathType`')
267
+
268
+
269
+ def afdconnectivity_cargs(
270
+ params: AfdconnectivityParamsDict,
271
+ execution: Execution,
272
+ ) -> list[str]:
273
+ """
274
+ Build command-line arguments from parameters.
275
+
276
+ Args:
277
+ params: The parameters.
278
+ execution: The execution object for resolving input paths.
279
+ Returns:
280
+ Command-line arguments.
281
+ """
282
+ cargs = []
283
+ cargs.append("afdconnectivity")
284
+ if params.get("wbft", None) is not None:
285
+ cargs.extend([
286
+ "-wbft",
287
+ execution.input_file(params.get("wbft", None))
288
+ ])
289
+ if params.get("afd_map", None) is not None:
290
+ cargs.extend([
291
+ "-afd_map",
292
+ params.get("afd_map", None)
293
+ ])
294
+ if params.get("all_fixels", False):
295
+ cargs.append("-all_fixels")
296
+ if params.get("info", False):
297
+ cargs.append("-info")
298
+ if params.get("quiet", False):
299
+ cargs.append("-quiet")
300
+ if params.get("debug", False):
301
+ cargs.append("-debug")
302
+ if params.get("force", False):
303
+ cargs.append("-force")
304
+ if params.get("nthreads", None) is not None:
305
+ cargs.extend([
306
+ "-nthreads",
307
+ str(params.get("nthreads", None))
308
+ ])
309
+ if params.get("config", None) is not None:
310
+ cargs.extend([a for c in [afdconnectivity_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
311
+ if params.get("help", False):
312
+ cargs.append("-help")
313
+ if params.get("version", False):
314
+ cargs.append("-version")
315
+ cargs.append(execution.input_file(params.get("image", None)))
316
+ cargs.append(execution.input_file(params.get("tracks", None)))
317
+ return cargs
318
+
319
+
320
+ def afdconnectivity_outputs(
321
+ params: AfdconnectivityParamsDict,
322
+ execution: Execution,
323
+ ) -> AfdconnectivityOutputs:
324
+ """
325
+ Build outputs object containing output file paths and possibly stdout/stderr.
326
+
327
+ Args:
328
+ params: The parameters.
329
+ execution: The execution object for resolving input paths.
330
+ Returns:
331
+ Outputs object.
332
+ """
333
+ ret = AfdconnectivityOutputs(
334
+ root=execution.output_file("."),
335
+ afd_map=execution.output_file(params.get("afd_map", None)) if (params.get("afd_map") is not None) else None,
336
+ )
337
+ return ret
338
+
339
+
340
+ def afdconnectivity_execute(
341
+ params: AfdconnectivityParamsDict,
342
+ runner: Runner | None = None,
343
+ ) -> AfdconnectivityOutputs:
344
+ """
345
+ afdconnectivity
346
+
347
+ Obtain an estimate of fibre connectivity between two regions using AFD and
348
+ streamlines tractography.
349
+
350
+ This estimate is obtained by determining a fibre volume (AFD) occupied by
351
+ the pathway of interest, and dividing by the streamline length.
352
+
353
+ If only the streamlines belonging to the pathway of interest are provided,
354
+ then ALL of the fibre volume within each fixel selected will contribute to
355
+ the result. If the -wbft option is used to provide whole-brain
356
+ fibre-tracking (of which the pathway of interest should contain a subset),
357
+ only the fraction of the fibre volume in each fixel estimated to belong to
358
+ the pathway of interest will contribute to the result.
359
+
360
+ Use -quiet to suppress progress messages and output fibre connectivity value
361
+ only.
362
+
363
+ For valid comparisons of AFD connectivity across scans, images MUST be
364
+ intensity normalised and bias field corrected, and a common response
365
+ function for all subjects must be used.
366
+
367
+ Note that the sum of the AFD is normalised by streamline length to account
368
+ for subject differences in fibre bundle length. This normalisation results
369
+ in a measure that is more related to the cross-sectional volume of the tract
370
+ (and therefore 'connectivity'). Note that SIFT-ed tract count is a superior
371
+ measure because it is unaffected by tangential yet unrelated fibres.
372
+ However, AFD connectivity may be used as a substitute when Anatomically
373
+ Constrained Tractography is not possible due to uncorrectable EPI
374
+ distortions, and SIFT may therefore not be as effective.
375
+
376
+ Longer discussion regarding this command can additionally be found at:
377
+ https://mrtrix.readthedocs.io/en/3.0.4/concepts/afd_connectivity.html (as
378
+ well as in the relevant reference).
379
+
380
+ References:
381
+
382
+ Smith, R. E.; Raffelt, D.; Tournier, J.-D.; Connelly, A. Quantitative
383
+ Streamlines Tractography: Methods and Inter-Subject Normalisation. Open
384
+ Science Framework, https://doi.org/10.31219/osf.io/c67kn.
385
+
386
+ Author: MRTrix3 Developers
387
+
388
+ URL: https://www.mrtrix.org/
389
+
390
+ Args:
391
+ params: The parameters.
392
+ runner: Command runner.
393
+ Returns:
394
+ NamedTuple of outputs (described in `AfdconnectivityOutputs`).
395
+ """
396
+ afdconnectivity_validate(params)
397
+ runner = runner or get_global_runner()
398
+ execution = runner.start_execution(AFDCONNECTIVITY_METADATA)
399
+ params = execution.params(params)
400
+ cargs = afdconnectivity_cargs(params, execution)
401
+ ret = afdconnectivity_outputs(params, execution)
402
+ execution.run(cargs)
403
+ return ret
404
+
405
+
406
+ def afdconnectivity(
407
+ image: InputPathType,
408
+ tracks: InputPathType,
409
+ wbft: InputPathType | None = None,
410
+ afd_map: str | None = None,
411
+ all_fixels: bool = False,
412
+ info: bool = False,
413
+ quiet: bool = False,
414
+ debug: bool = False,
415
+ force: bool = False,
416
+ nthreads: int | None = None,
417
+ config: list[AfdconnectivityConfigParamsDict] | None = None,
418
+ help_: bool = False,
419
+ version: bool = False,
420
+ runner: Runner | None = None,
421
+ ) -> AfdconnectivityOutputs:
422
+ """
423
+ afdconnectivity
424
+
425
+ Obtain an estimate of fibre connectivity between two regions using AFD and
426
+ streamlines tractography.
427
+
428
+ This estimate is obtained by determining a fibre volume (AFD) occupied by
429
+ the pathway of interest, and dividing by the streamline length.
430
+
431
+ If only the streamlines belonging to the pathway of interest are provided,
432
+ then ALL of the fibre volume within each fixel selected will contribute to
433
+ the result. If the -wbft option is used to provide whole-brain
434
+ fibre-tracking (of which the pathway of interest should contain a subset),
435
+ only the fraction of the fibre volume in each fixel estimated to belong to
436
+ the pathway of interest will contribute to the result.
437
+
438
+ Use -quiet to suppress progress messages and output fibre connectivity value
439
+ only.
440
+
441
+ For valid comparisons of AFD connectivity across scans, images MUST be
442
+ intensity normalised and bias field corrected, and a common response
443
+ function for all subjects must be used.
444
+
445
+ Note that the sum of the AFD is normalised by streamline length to account
446
+ for subject differences in fibre bundle length. This normalisation results
447
+ in a measure that is more related to the cross-sectional volume of the tract
448
+ (and therefore 'connectivity'). Note that SIFT-ed tract count is a superior
449
+ measure because it is unaffected by tangential yet unrelated fibres.
450
+ However, AFD connectivity may be used as a substitute when Anatomically
451
+ Constrained Tractography is not possible due to uncorrectable EPI
452
+ distortions, and SIFT may therefore not be as effective.
453
+
454
+ Longer discussion regarding this command can additionally be found at:
455
+ https://mrtrix.readthedocs.io/en/3.0.4/concepts/afd_connectivity.html (as
456
+ well as in the relevant reference).
457
+
458
+ References:
459
+
460
+ Smith, R. E.; Raffelt, D.; Tournier, J.-D.; Connelly, A. Quantitative
461
+ Streamlines Tractography: Methods and Inter-Subject Normalisation. Open
462
+ Science Framework, https://doi.org/10.31219/osf.io/c67kn.
463
+
464
+ Author: MRTrix3 Developers
465
+
466
+ URL: https://www.mrtrix.org/
467
+
468
+ Args:
469
+ image: the input FOD image.
470
+ tracks: the input track file defining the bundle of interest.
471
+ wbft: provide a whole-brain fibre-tracking data set (of which the input\
472
+ track file should be a subset), to improve the estimate of fibre bundle\
473
+ volume in the presence of partial volume.
474
+ afd_map: output a 3D image containing the AFD estimated for each voxel.
475
+ all_fixels: if whole-brain fibre-tracking is NOT provided, then if\
476
+ multiple fixels within a voxel are traversed by the pathway of\
477
+ interest, by default the fixel with the greatest streamlines density is\
478
+ selected to contribute to the AFD in that voxel. If this option is\
479
+ provided, then ALL fixels with non-zero streamlines density will\
480
+ contribute to the result, even if multiple fixels per voxel are\
481
+ selected.
482
+ info: display information messages.
483
+ quiet: do not display information messages or progress status;\
484
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
485
+ environment variable to a non-empty string.
486
+ debug: display debugging messages.
487
+ force: force overwrite of output files (caution: using the same file as\
488
+ input and output might cause unexpected behaviour).
489
+ nthreads: use this number of threads in multi-threaded applications\
490
+ (set to 0 to disable multi-threading).
491
+ config: temporarily set the value of an MRtrix config file entry.
492
+ help_: display this information page and exit.
493
+ version: display version information and exit.
494
+ runner: Command runner.
495
+ Returns:
496
+ NamedTuple of outputs (described in `AfdconnectivityOutputs`).
497
+ """
498
+ params = afdconnectivity_params(
499
+ wbft=wbft,
500
+ afd_map=afd_map,
501
+ all_fixels=all_fixels,
502
+ info=info,
503
+ quiet=quiet,
504
+ debug=debug,
505
+ force=force,
506
+ nthreads=nthreads,
507
+ config=config,
508
+ help_=help_,
509
+ version=version,
510
+ image=image,
511
+ tracks=tracks,
512
+ )
513
+ return afdconnectivity_execute(params, runner)
514
+
515
+
516
+ __all__ = [
517
+ "AFDCONNECTIVITY_METADATA",
518
+ "AfdconnectivityConfigParamsDict",
519
+ "AfdconnectivityConfigParamsDictTagged",
520
+ "AfdconnectivityOutputs",
521
+ "AfdconnectivityParamsDict",
522
+ "AfdconnectivityParamsDictTagged",
523
+ "afdconnectivity",
524
+ "afdconnectivity_config",
525
+ "afdconnectivity_execute",
526
+ "afdconnectivity_params",
527
+ ]