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,130 @@
1
+ """
2
+ MRTrix3
3
+
4
+ MRtrix3 provides a set of tools to perform various types of diffusion MRI
5
+ analyses, from various forms of tractography through to next-generation
6
+ group-level analyses. It is designed with consistency, performance, and
7
+ stability in mind, and is freely available under an open-source license. It is
8
+ developed and maintained by a team of experts in the field, fostering an active
9
+ community of users from diverse backgrounds.
10
+
11
+ URL: https://www.mrtrix.org/
12
+ """
13
+ # This file was auto generated by Styx.
14
+ # Do not edit this file directly.
15
+
16
+ from .afdconnectivity import *
17
+ from .amp2response import *
18
+ from .amp2sh import *
19
+ from .connectome2tck import *
20
+ from .connectomeedit import *
21
+ from .connectomestats import *
22
+ from .dcmedit import *
23
+ from .dcminfo import *
24
+ from .dirflip import *
25
+ from .dirgen import *
26
+ from .dirmerge import *
27
+ from .dirorder import *
28
+ from .dirsplit import *
29
+ from .dirstat import *
30
+ from .dwi2adc import *
31
+ from .dwi2fod import *
32
+ from .dwi2mask import *
33
+ from .dwi2response import *
34
+ from .dwi2tensor import *
35
+ from .dwibiascorrect import *
36
+ from .dwidenoise import *
37
+ from .dwiextract import *
38
+ from .dwigradcheck import *
39
+ from .fixel2peaks import *
40
+ from .fixel2sh import *
41
+ from .fixel2tsf import *
42
+ from .fixel2voxel import *
43
+ from .fixelcfestats import *
44
+ from .fixelconnectivity import *
45
+ from .fixelconvert import *
46
+ from .fixelcorrespondence import *
47
+ from .fixelcrop import *
48
+ from .fixelfilter import *
49
+ from .fixelreorient import *
50
+ from .fod2dec import *
51
+ from .fod2fixel import *
52
+ from .label2colour import *
53
+ from .label2mesh import *
54
+ from .labelconvert import *
55
+ from .labelstats import *
56
+ from .maskdump import *
57
+ from .maskfilter import *
58
+ from .mesh2voxel import *
59
+ from .meshconvert import *
60
+ from .meshfilter import *
61
+ from .mraverageheader import *
62
+ from .mrcalc import *
63
+ from .mrcat import *
64
+ from .mrcentroid import *
65
+ from .mrcheckerboardmask import *
66
+ from .mrclusterstats import *
67
+ from .mrcolour import *
68
+ from .mrconvert import *
69
+ from .mrdegibbs import *
70
+ from .mrdump import *
71
+ from .mredit import *
72
+ from .mrfilter import *
73
+ from .mrgrid import *
74
+ from .mrhistmatch import *
75
+ from .mrhistogram import *
76
+ from .mrinfo import *
77
+ from .mrmath import *
78
+ from .mrmetric import *
79
+ from .mrregister import *
80
+ from .mrstats import *
81
+ from .mrthreshold import *
82
+ from .mrtransform import *
83
+ from .mtnormalise import *
84
+ from .peaks2amp import *
85
+ from .peaks2fixel import *
86
+ from .responsemean import *
87
+ from .sh2amp import *
88
+ from .sh2peaks import *
89
+ from .sh2power import *
90
+ from .sh2response import *
91
+ from .shbasis import *
92
+ from .shconv import *
93
+ from .tck2connectome import *
94
+ from .tck2fixel import *
95
+ from .tckconvert import *
96
+ from .tckdfc import *
97
+ from .tckedit import *
98
+ from .tckgen import *
99
+ from .tckglobal import *
100
+ from .tckinfo import *
101
+ from .tckmap import *
102
+ from .tckresample import *
103
+ from .tcksample import *
104
+ from .tcksift import *
105
+ from .tcksift2 import *
106
+ from .tckstats import *
107
+ from .tcktransform import *
108
+ from .tensor2metric import *
109
+ from .transformcalc import *
110
+ from .transformcompose import *
111
+ from .transformconvert import *
112
+ from .tsfdivide import *
113
+ from .tsfinfo import *
114
+ from .tsfmult import *
115
+ from .tsfsmooth import *
116
+ from .tsfthreshold import *
117
+ from .tsfvalidate import *
118
+ from .v_5tt2gmwmi import *
119
+ from .v_5tt2vis import *
120
+ from .v_5ttcheck import *
121
+ from .v_5ttedit import *
122
+ from .v_5ttgen import *
123
+ from .vectorstats import *
124
+ from .voxel2fixel import *
125
+ from .voxel2mesh import *
126
+ from .warp2metric import *
127
+ from .warpconvert import *
128
+ from .warpcorrect import *
129
+ from .warpinit import *
130
+ from .warpinvert import *
@@ -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
+ AFDCONNECTIVITY_METADATA = Metadata(
9
+ id="3290302704162d6eadb785f29be4535da532166f.boutiques",
10
+ name="afdconnectivity",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ AfdconnectivityConfigParameters = typing.TypedDict('AfdconnectivityConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ AfdconnectivityParameters = typing.TypedDict('AfdconnectivityParameters', {
24
+ "__STYX_TYPE__": typing.Literal["afdconnectivity"],
25
+ "wbft": typing.NotRequired[InputPathType | None],
26
+ "afd_map": typing.NotRequired[str | None],
27
+ "all_fixels": bool,
28
+ "info": bool,
29
+ "quiet": bool,
30
+ "debug": bool,
31
+ "force": bool,
32
+ "nthreads": typing.NotRequired[int | None],
33
+ "config": typing.NotRequired[list[AfdconnectivityConfigParameters] | None],
34
+ "help": bool,
35
+ "version": bool,
36
+ "image": InputPathType,
37
+ "tracks": InputPathType,
38
+ })
39
+
40
+
41
+ def dyn_cargs(
42
+ t: str,
43
+ ) -> typing.Any:
44
+ """
45
+ Get build cargs function by command type.
46
+
47
+ Args:
48
+ t: Command type.
49
+ Returns:
50
+ Build cargs function.
51
+ """
52
+ return {
53
+ "afdconnectivity": afdconnectivity_cargs,
54
+ "config": afdconnectivity_config_cargs,
55
+ }.get(t)
56
+
57
+
58
+ def dyn_outputs(
59
+ t: str,
60
+ ) -> typing.Any:
61
+ """
62
+ Get build outputs function by command type.
63
+
64
+ Args:
65
+ t: Command type.
66
+ Returns:
67
+ Build outputs function.
68
+ """
69
+ return {
70
+ "afdconnectivity": afdconnectivity_outputs,
71
+ }.get(t)
72
+
73
+
74
+ def afdconnectivity_config_params(
75
+ key: str,
76
+ value: str,
77
+ ) -> AfdconnectivityConfigParameters:
78
+ """
79
+ Build parameters.
80
+
81
+ Args:
82
+ key: temporarily set the value of an MRtrix config file entry.
83
+ value: temporarily set the value of an MRtrix config file entry.
84
+ Returns:
85
+ Parameter dictionary
86
+ """
87
+ params = {
88
+ "__STYXTYPE__": "config",
89
+ "key": key,
90
+ "value": value,
91
+ }
92
+ return params
93
+
94
+
95
+ def afdconnectivity_config_cargs(
96
+ params: AfdconnectivityConfigParameters,
97
+ execution: Execution,
98
+ ) -> list[str]:
99
+ """
100
+ Build command-line arguments from parameters.
101
+
102
+ Args:
103
+ params: The parameters.
104
+ execution: The execution object for resolving input paths.
105
+ Returns:
106
+ Command-line arguments.
107
+ """
108
+ cargs = []
109
+ cargs.append("-config")
110
+ cargs.append(params.get("key"))
111
+ cargs.append(params.get("value"))
112
+ return cargs
113
+
114
+
115
+ class AfdconnectivityOutputs(typing.NamedTuple):
116
+ """
117
+ Output object returned when calling `afdconnectivity(...)`.
118
+ """
119
+ root: OutputPathType
120
+ """Output root folder. This is the root folder for all outputs."""
121
+ afd_map: OutputPathType | None
122
+ """output a 3D image containing the AFD estimated for each voxel. """
123
+
124
+
125
+ def afdconnectivity_params(
126
+ image: InputPathType,
127
+ tracks: InputPathType,
128
+ wbft: InputPathType | None = None,
129
+ afd_map: str | None = None,
130
+ all_fixels: bool = False,
131
+ info: bool = False,
132
+ quiet: bool = False,
133
+ debug: bool = False,
134
+ force: bool = False,
135
+ nthreads: int | None = None,
136
+ config: list[AfdconnectivityConfigParameters] | None = None,
137
+ help_: bool = False,
138
+ version: bool = False,
139
+ ) -> AfdconnectivityParameters:
140
+ """
141
+ Build parameters.
142
+
143
+ Args:
144
+ image: the input FOD image.
145
+ tracks: the input track file defining the bundle of interest.
146
+ wbft: provide a whole-brain fibre-tracking data set (of which the input\
147
+ track file should be a subset), to improve the estimate of fibre bundle\
148
+ volume in the presence of partial volume.
149
+ afd_map: output a 3D image containing the AFD estimated for each voxel.
150
+ all_fixels: if whole-brain fibre-tracking is NOT provided, then if\
151
+ multiple fixels within a voxel are traversed by the pathway of\
152
+ interest, by default the fixel with the greatest streamlines density is\
153
+ selected to contribute to the AFD in that voxel. If this option is\
154
+ provided, then ALL fixels with non-zero streamlines density will\
155
+ contribute to the result, even if multiple fixels per voxel are\
156
+ selected.
157
+ info: display information messages.
158
+ quiet: do not display information messages or progress status;\
159
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
160
+ environment variable to a non-empty string.
161
+ debug: display debugging messages.
162
+ force: force overwrite of output files (caution: using the same file as\
163
+ input and output might cause unexpected behaviour).
164
+ nthreads: use this number of threads in multi-threaded applications\
165
+ (set to 0 to disable multi-threading).
166
+ config: temporarily set the value of an MRtrix config file entry.
167
+ help_: display this information page and exit.
168
+ version: display version information and exit.
169
+ Returns:
170
+ Parameter dictionary
171
+ """
172
+ params = {
173
+ "__STYXTYPE__": "afdconnectivity",
174
+ "all_fixels": all_fixels,
175
+ "info": info,
176
+ "quiet": quiet,
177
+ "debug": debug,
178
+ "force": force,
179
+ "help": help_,
180
+ "version": version,
181
+ "image": image,
182
+ "tracks": tracks,
183
+ }
184
+ if wbft is not None:
185
+ params["wbft"] = wbft
186
+ if afd_map is not None:
187
+ params["afd_map"] = afd_map
188
+ if nthreads is not None:
189
+ params["nthreads"] = nthreads
190
+ if config is not None:
191
+ params["config"] = config
192
+ return params
193
+
194
+
195
+ def afdconnectivity_cargs(
196
+ params: AfdconnectivityParameters,
197
+ execution: Execution,
198
+ ) -> list[str]:
199
+ """
200
+ Build command-line arguments from parameters.
201
+
202
+ Args:
203
+ params: The parameters.
204
+ execution: The execution object for resolving input paths.
205
+ Returns:
206
+ Command-line arguments.
207
+ """
208
+ cargs = []
209
+ cargs.append("afdconnectivity")
210
+ if params.get("wbft") is not None:
211
+ cargs.extend([
212
+ "-wbft",
213
+ execution.input_file(params.get("wbft"))
214
+ ])
215
+ if params.get("afd_map") is not None:
216
+ cargs.extend([
217
+ "-afd_map",
218
+ params.get("afd_map")
219
+ ])
220
+ if params.get("all_fixels"):
221
+ cargs.append("-all_fixels")
222
+ if params.get("info"):
223
+ cargs.append("-info")
224
+ if params.get("quiet"):
225
+ cargs.append("-quiet")
226
+ if params.get("debug"):
227
+ cargs.append("-debug")
228
+ if params.get("force"):
229
+ cargs.append("-force")
230
+ if params.get("nthreads") is not None:
231
+ cargs.extend([
232
+ "-nthreads",
233
+ str(params.get("nthreads"))
234
+ ])
235
+ if params.get("config") is not None:
236
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
237
+ if params.get("help"):
238
+ cargs.append("-help")
239
+ if params.get("version"):
240
+ cargs.append("-version")
241
+ cargs.append(execution.input_file(params.get("image")))
242
+ cargs.append(execution.input_file(params.get("tracks")))
243
+ return cargs
244
+
245
+
246
+ def afdconnectivity_outputs(
247
+ params: AfdconnectivityParameters,
248
+ execution: Execution,
249
+ ) -> AfdconnectivityOutputs:
250
+ """
251
+ Build outputs object containing output file paths and possibly stdout/stderr.
252
+
253
+ Args:
254
+ params: The parameters.
255
+ execution: The execution object for resolving input paths.
256
+ Returns:
257
+ Outputs object.
258
+ """
259
+ ret = AfdconnectivityOutputs(
260
+ root=execution.output_file("."),
261
+ afd_map=execution.output_file(params.get("afd_map")) if (params.get("afd_map") is not None) else None,
262
+ )
263
+ return ret
264
+
265
+
266
+ def afdconnectivity_execute(
267
+ params: AfdconnectivityParameters,
268
+ execution: Execution,
269
+ ) -> AfdconnectivityOutputs:
270
+ """
271
+ Obtain an estimate of fibre connectivity between two regions using AFD and
272
+ streamlines tractography.
273
+
274
+ This estimate is obtained by determining a fibre volume (AFD) occupied by
275
+ the pathway of interest, and dividing by the streamline length.
276
+
277
+ If only the streamlines belonging to the pathway of interest are provided,
278
+ then ALL of the fibre volume within each fixel selected will contribute to
279
+ the result. If the -wbft option is used to provide whole-brain
280
+ fibre-tracking (of which the pathway of interest should contain a subset),
281
+ only the fraction of the fibre volume in each fixel estimated to belong to
282
+ the pathway of interest will contribute to the result.
283
+
284
+ Use -quiet to suppress progress messages and output fibre connectivity value
285
+ only.
286
+
287
+ For valid comparisons of AFD connectivity across scans, images MUST be
288
+ intensity normalised and bias field corrected, and a common response
289
+ function for all subjects must be used.
290
+
291
+ Note that the sum of the AFD is normalised by streamline length to account
292
+ for subject differences in fibre bundle length. This normalisation results
293
+ in a measure that is more related to the cross-sectional volume of the tract
294
+ (and therefore 'connectivity'). Note that SIFT-ed tract count is a superior
295
+ measure because it is unaffected by tangential yet unrelated fibres.
296
+ However, AFD connectivity may be used as a substitute when Anatomically
297
+ Constrained Tractography is not possible due to uncorrectable EPI
298
+ distortions, and SIFT may therefore not be as effective.
299
+
300
+ Longer discussion regarding this command can additionally be found at:
301
+ https://mrtrix.readthedocs.io/en/3.0.4/concepts/afd_connectivity.html (as
302
+ well as in the relevant reference).
303
+
304
+ References:
305
+
306
+ Smith, R. E.; Raffelt, D.; Tournier, J.-D.; Connelly, A. Quantitative
307
+ Streamlines Tractography: Methods and Inter-Subject Normalisation. Open
308
+ Science Framework, https://doi.org/10.31219/osf.io/c67kn.
309
+
310
+ Author: MRTrix3 Developers
311
+
312
+ URL: https://www.mrtrix.org/
313
+
314
+ Args:
315
+ params: The parameters.
316
+ execution: The execution object.
317
+ Returns:
318
+ NamedTuple of outputs (described in `AfdconnectivityOutputs`).
319
+ """
320
+ params = execution.params(params)
321
+ cargs = afdconnectivity_cargs(params, execution)
322
+ ret = afdconnectivity_outputs(params, execution)
323
+ execution.run(cargs)
324
+ return ret
325
+
326
+
327
+ def afdconnectivity(
328
+ image: InputPathType,
329
+ tracks: InputPathType,
330
+ wbft: InputPathType | None = None,
331
+ afd_map: str | None = None,
332
+ all_fixels: bool = False,
333
+ info: bool = False,
334
+ quiet: bool = False,
335
+ debug: bool = False,
336
+ force: bool = False,
337
+ nthreads: int | None = None,
338
+ config: list[AfdconnectivityConfigParameters] | None = None,
339
+ help_: bool = False,
340
+ version: bool = False,
341
+ runner: Runner | None = None,
342
+ ) -> AfdconnectivityOutputs:
343
+ """
344
+ Obtain an estimate of fibre connectivity between two regions using AFD and
345
+ streamlines tractography.
346
+
347
+ This estimate is obtained by determining a fibre volume (AFD) occupied by
348
+ the pathway of interest, and dividing by the streamline length.
349
+
350
+ If only the streamlines belonging to the pathway of interest are provided,
351
+ then ALL of the fibre volume within each fixel selected will contribute to
352
+ the result. If the -wbft option is used to provide whole-brain
353
+ fibre-tracking (of which the pathway of interest should contain a subset),
354
+ only the fraction of the fibre volume in each fixel estimated to belong to
355
+ the pathway of interest will contribute to the result.
356
+
357
+ Use -quiet to suppress progress messages and output fibre connectivity value
358
+ only.
359
+
360
+ For valid comparisons of AFD connectivity across scans, images MUST be
361
+ intensity normalised and bias field corrected, and a common response
362
+ function for all subjects must be used.
363
+
364
+ Note that the sum of the AFD is normalised by streamline length to account
365
+ for subject differences in fibre bundle length. This normalisation results
366
+ in a measure that is more related to the cross-sectional volume of the tract
367
+ (and therefore 'connectivity'). Note that SIFT-ed tract count is a superior
368
+ measure because it is unaffected by tangential yet unrelated fibres.
369
+ However, AFD connectivity may be used as a substitute when Anatomically
370
+ Constrained Tractography is not possible due to uncorrectable EPI
371
+ distortions, and SIFT may therefore not be as effective.
372
+
373
+ Longer discussion regarding this command can additionally be found at:
374
+ https://mrtrix.readthedocs.io/en/3.0.4/concepts/afd_connectivity.html (as
375
+ well as in the relevant reference).
376
+
377
+ References:
378
+
379
+ Smith, R. E.; Raffelt, D.; Tournier, J.-D.; Connelly, A. Quantitative
380
+ Streamlines Tractography: Methods and Inter-Subject Normalisation. Open
381
+ Science Framework, https://doi.org/10.31219/osf.io/c67kn.
382
+
383
+ Author: MRTrix3 Developers
384
+
385
+ URL: https://www.mrtrix.org/
386
+
387
+ Args:
388
+ image: the input FOD image.
389
+ tracks: the input track file defining the bundle of interest.
390
+ wbft: provide a whole-brain fibre-tracking data set (of which the input\
391
+ track file should be a subset), to improve the estimate of fibre bundle\
392
+ volume in the presence of partial volume.
393
+ afd_map: output a 3D image containing the AFD estimated for each voxel.
394
+ all_fixels: if whole-brain fibre-tracking is NOT provided, then if\
395
+ multiple fixels within a voxel are traversed by the pathway of\
396
+ interest, by default the fixel with the greatest streamlines density is\
397
+ selected to contribute to the AFD in that voxel. If this option is\
398
+ provided, then ALL fixels with non-zero streamlines density will\
399
+ contribute to the result, even if multiple fixels per voxel are\
400
+ selected.
401
+ info: display information messages.
402
+ quiet: do not display information messages or progress status;\
403
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
404
+ environment variable to a non-empty string.
405
+ debug: display debugging messages.
406
+ force: force overwrite of output files (caution: using the same file as\
407
+ input and output might cause unexpected behaviour).
408
+ nthreads: use this number of threads in multi-threaded applications\
409
+ (set to 0 to disable multi-threading).
410
+ config: temporarily set the value of an MRtrix config file entry.
411
+ help_: display this information page and exit.
412
+ version: display version information and exit.
413
+ runner: Command runner.
414
+ Returns:
415
+ NamedTuple of outputs (described in `AfdconnectivityOutputs`).
416
+ """
417
+ runner = runner or get_global_runner()
418
+ execution = runner.start_execution(AFDCONNECTIVITY_METADATA)
419
+ params = afdconnectivity_params(
420
+ wbft=wbft,
421
+ afd_map=afd_map,
422
+ all_fixels=all_fixels,
423
+ info=info,
424
+ quiet=quiet,
425
+ debug=debug,
426
+ force=force,
427
+ nthreads=nthreads,
428
+ config=config,
429
+ help_=help_,
430
+ version=version,
431
+ image=image,
432
+ tracks=tracks,
433
+ )
434
+ return afdconnectivity_execute(params, execution)
435
+
436
+
437
+ __all__ = [
438
+ "AFDCONNECTIVITY_METADATA",
439
+ "AfdconnectivityConfigParameters",
440
+ "AfdconnectivityOutputs",
441
+ "AfdconnectivityParameters",
442
+ "afdconnectivity",
443
+ "afdconnectivity_config_params",
444
+ "afdconnectivity_params",
445
+ ]