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,930 @@
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
+ MRCLUSTERSTATS_METADATA = Metadata(
9
+ id="3cccb6a587fcc1d359cee16156cb510a9fec0521.boutiques",
10
+ name="mrclusterstats",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _MrclusterstatsColumnParamsDictNoTag = typing.TypedDict('_MrclusterstatsColumnParamsDictNoTag', {
17
+ "path": InputPathType,
18
+ })
19
+ MrclusterstatsColumnParamsDictTagged = typing.TypedDict('MrclusterstatsColumnParamsDictTagged', {
20
+ "@type": typing.Literal["column"],
21
+ "path": InputPathType,
22
+ })
23
+ MrclusterstatsColumnParamsDict = _MrclusterstatsColumnParamsDictNoTag | MrclusterstatsColumnParamsDictTagged
24
+
25
+
26
+ _MrclusterstatsConfigParamsDictNoTag = typing.TypedDict('_MrclusterstatsConfigParamsDictNoTag', {
27
+ "key": str,
28
+ "value": str,
29
+ })
30
+ MrclusterstatsConfigParamsDictTagged = typing.TypedDict('MrclusterstatsConfigParamsDictTagged', {
31
+ "@type": typing.Literal["config"],
32
+ "key": str,
33
+ "value": str,
34
+ })
35
+ MrclusterstatsConfigParamsDict = _MrclusterstatsConfigParamsDictNoTag | MrclusterstatsConfigParamsDictTagged
36
+
37
+
38
+ _MrclusterstatsParamsDictNoTag = typing.TypedDict('_MrclusterstatsParamsDictNoTag', {
39
+ "notest": bool,
40
+ "errors": typing.NotRequired[str | None],
41
+ "exchange_within": typing.NotRequired[InputPathType | None],
42
+ "exchange_whole": typing.NotRequired[InputPathType | None],
43
+ "strong": bool,
44
+ "nshuffles": typing.NotRequired[int | None],
45
+ "permutations": typing.NotRequired[InputPathType | None],
46
+ "nonstationarity": bool,
47
+ "skew_nonstationarity": typing.NotRequired[float | None],
48
+ "nshuffles_nonstationarity": typing.NotRequired[int | None],
49
+ "permutations_nonstationarity": typing.NotRequired[InputPathType | None],
50
+ "tfce_dh": typing.NotRequired[float | None],
51
+ "tfce_e": typing.NotRequired[float | None],
52
+ "tfce_h": typing.NotRequired[float | None],
53
+ "variance": typing.NotRequired[InputPathType | None],
54
+ "ftests": typing.NotRequired[InputPathType | None],
55
+ "fonly": bool,
56
+ "column": typing.NotRequired[list[MrclusterstatsColumnParamsDict] | None],
57
+ "threshold": typing.NotRequired[float | None],
58
+ "connectivity": bool,
59
+ "info": bool,
60
+ "quiet": bool,
61
+ "debug": bool,
62
+ "force": bool,
63
+ "nthreads": typing.NotRequired[int | None],
64
+ "config": typing.NotRequired[list[MrclusterstatsConfigParamsDict] | None],
65
+ "help": bool,
66
+ "version": bool,
67
+ "input": InputPathType,
68
+ "design": InputPathType,
69
+ "contrast": InputPathType,
70
+ "mask": InputPathType,
71
+ "output": str,
72
+ })
73
+ MrclusterstatsParamsDictTagged = typing.TypedDict('MrclusterstatsParamsDictTagged', {
74
+ "@type": typing.Literal["mrtrix/mrclusterstats"],
75
+ "notest": bool,
76
+ "errors": typing.NotRequired[str | None],
77
+ "exchange_within": typing.NotRequired[InputPathType | None],
78
+ "exchange_whole": typing.NotRequired[InputPathType | None],
79
+ "strong": bool,
80
+ "nshuffles": typing.NotRequired[int | None],
81
+ "permutations": typing.NotRequired[InputPathType | None],
82
+ "nonstationarity": bool,
83
+ "skew_nonstationarity": typing.NotRequired[float | None],
84
+ "nshuffles_nonstationarity": typing.NotRequired[int | None],
85
+ "permutations_nonstationarity": typing.NotRequired[InputPathType | None],
86
+ "tfce_dh": typing.NotRequired[float | None],
87
+ "tfce_e": typing.NotRequired[float | None],
88
+ "tfce_h": typing.NotRequired[float | None],
89
+ "variance": typing.NotRequired[InputPathType | None],
90
+ "ftests": typing.NotRequired[InputPathType | None],
91
+ "fonly": bool,
92
+ "column": typing.NotRequired[list[MrclusterstatsColumnParamsDict] | None],
93
+ "threshold": typing.NotRequired[float | None],
94
+ "connectivity": bool,
95
+ "info": bool,
96
+ "quiet": bool,
97
+ "debug": bool,
98
+ "force": bool,
99
+ "nthreads": typing.NotRequired[int | None],
100
+ "config": typing.NotRequired[list[MrclusterstatsConfigParamsDict] | None],
101
+ "help": bool,
102
+ "version": bool,
103
+ "input": InputPathType,
104
+ "design": InputPathType,
105
+ "contrast": InputPathType,
106
+ "mask": InputPathType,
107
+ "output": str,
108
+ })
109
+ MrclusterstatsParamsDict = _MrclusterstatsParamsDictNoTag | MrclusterstatsParamsDictTagged
110
+
111
+
112
+ def mrclusterstats_column(
113
+ path: InputPathType,
114
+ ) -> MrclusterstatsColumnParamsDictTagged:
115
+ """
116
+ Build parameters.
117
+
118
+ Args:
119
+ path: add a column to the design matrix corresponding to subject\
120
+ voxel-wise values (note that the contrast matrix must include an\
121
+ additional column for each use of this option); the text file provided\
122
+ via this option should contain a file name for each subject.
123
+ Returns:
124
+ Parameter dictionary
125
+ """
126
+ params = {
127
+ "@type": "column",
128
+ "path": path,
129
+ }
130
+ return params
131
+
132
+
133
+ def mrclusterstats_column_validate(
134
+ params: typing.Any,
135
+ ) -> None:
136
+ """
137
+ Validate parameters. Throws an error if `params` is not a valid
138
+ `MrclusterstatsColumnParamsDict` object.
139
+
140
+ Args:
141
+ params: The parameters object to validate.
142
+ """
143
+ if params is None or not isinstance(params, dict):
144
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
145
+ if params.get("path", None) is None:
146
+ raise StyxValidationError("`path` must not be None")
147
+ if not isinstance(params["path"], (pathlib.Path, str)):
148
+ raise StyxValidationError(f'`path` has the wrong type: Received `{type(params.get("path", None))}` expected `InputPathType`')
149
+
150
+
151
+ def mrclusterstats_column_cargs(
152
+ params: MrclusterstatsColumnParamsDict,
153
+ execution: Execution,
154
+ ) -> list[str]:
155
+ """
156
+ Build command-line arguments from parameters.
157
+
158
+ Args:
159
+ params: The parameters.
160
+ execution: The execution object for resolving input paths.
161
+ Returns:
162
+ Command-line arguments.
163
+ """
164
+ cargs = []
165
+ cargs.append("-column")
166
+ cargs.append(execution.input_file(params.get("path", None)))
167
+ return cargs
168
+
169
+
170
+ def mrclusterstats_config(
171
+ key: str,
172
+ value: str,
173
+ ) -> MrclusterstatsConfigParamsDictTagged:
174
+ """
175
+ Build parameters.
176
+
177
+ Args:
178
+ key: temporarily set the value of an MRtrix config file entry.
179
+ value: temporarily set the value of an MRtrix config file entry.
180
+ Returns:
181
+ Parameter dictionary
182
+ """
183
+ params = {
184
+ "@type": "config",
185
+ "key": key,
186
+ "value": value,
187
+ }
188
+ return params
189
+
190
+
191
+ def mrclusterstats_config_validate(
192
+ params: typing.Any,
193
+ ) -> None:
194
+ """
195
+ Validate parameters. Throws an error if `params` is not a valid
196
+ `MrclusterstatsConfigParamsDict` object.
197
+
198
+ Args:
199
+ params: The parameters object to validate.
200
+ """
201
+ if params is None or not isinstance(params, dict):
202
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
203
+ if params.get("key", None) is None:
204
+ raise StyxValidationError("`key` must not be None")
205
+ if not isinstance(params["key"], str):
206
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
207
+ if params.get("value", None) is None:
208
+ raise StyxValidationError("`value` must not be None")
209
+ if not isinstance(params["value"], str):
210
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
211
+
212
+
213
+ def mrclusterstats_config_cargs(
214
+ params: MrclusterstatsConfigParamsDict,
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("-config")
228
+ cargs.append(params.get("key", None))
229
+ cargs.append(params.get("value", None))
230
+ return cargs
231
+
232
+
233
+ class MrclusterstatsOutputs(typing.NamedTuple):
234
+ """
235
+ Output object returned when calling `MrclusterstatsParamsDict(...)`.
236
+ """
237
+ root: OutputPathType
238
+ """Output root folder. This is the root folder for all outputs."""
239
+
240
+
241
+ def mrclusterstats_params(
242
+ input_: InputPathType,
243
+ design: InputPathType,
244
+ contrast: InputPathType,
245
+ mask: InputPathType,
246
+ output: str,
247
+ notest: bool = False,
248
+ errors: str | None = None,
249
+ exchange_within: InputPathType | None = None,
250
+ exchange_whole: InputPathType | None = None,
251
+ strong: bool = False,
252
+ nshuffles: int | None = None,
253
+ permutations: InputPathType | None = None,
254
+ nonstationarity: bool = False,
255
+ skew_nonstationarity: float | None = None,
256
+ nshuffles_nonstationarity: int | None = None,
257
+ permutations_nonstationarity: InputPathType | None = None,
258
+ tfce_dh: float | None = None,
259
+ tfce_e: float | None = None,
260
+ tfce_h: float | None = None,
261
+ variance: InputPathType | None = None,
262
+ ftests: InputPathType | None = None,
263
+ fonly: bool = False,
264
+ column: list[MrclusterstatsColumnParamsDict] | None = None,
265
+ threshold: float | None = None,
266
+ connectivity: bool = False,
267
+ info: bool = False,
268
+ quiet: bool = False,
269
+ debug: bool = False,
270
+ force: bool = False,
271
+ nthreads: int | None = None,
272
+ config: list[MrclusterstatsConfigParamsDict] | None = None,
273
+ help_: bool = False,
274
+ version: bool = False,
275
+ ) -> MrclusterstatsParamsDictTagged:
276
+ """
277
+ Build parameters.
278
+
279
+ Args:
280
+ input_: a text file containing the file names of the input images, one\
281
+ file per line.
282
+ design: the design matrix.
283
+ contrast: the contrast matrix.
284
+ mask: a mask used to define voxels included in the analysis.
285
+ output: the filename prefix for all output.
286
+ notest: don't perform statistical inference; only output population\
287
+ statistics (effect size, stdev etc).
288
+ errors: specify nature of errors for shuffling; options are:\
289
+ ee,ise,both (default: ee).
290
+ exchange_within: specify blocks of observations within each of which\
291
+ data may undergo restricted exchange.
292
+ exchange_whole: specify blocks of observations that may be exchanged\
293
+ with one another (for independent and symmetric errors, sign-flipping\
294
+ will occur block-wise).
295
+ strong: use strong familywise error control across multiple hypotheses.
296
+ nshuffles: the number of shuffles (default: 5000).
297
+ permutations: manually define the permutations (relabelling). The input\
298
+ should be a text file defining a m x n matrix, where each relabelling\
299
+ is defined as a column vector of size m, and the number of columns, n,\
300
+ defines the number of permutations. Can be generated with the\
301
+ palm_quickperms function in PALM\
302
+ (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
303
+ option.
304
+ nonstationarity: perform non-stationarity correction.
305
+ skew_nonstationarity: specify the skew parameter for empirical\
306
+ statistic calculation (default for this command is 1).
307
+ nshuffles_nonstationarity: the number of shuffles to use when\
308
+ precomputing the empirical statistic image for non-stationarity\
309
+ correction (default: 5000).
310
+ permutations_nonstationarity: manually define the permutations\
311
+ (relabelling) for computing the emprical statistics for\
312
+ non-stationarity correction. The input should be a text file defining a\
313
+ m x n matrix, where each relabelling is defined as a column vector of\
314
+ size m, and the number of columns, n, defines the number of\
315
+ permutations. Can be generated with the palm_quickperms function in\
316
+ PALM (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM) Overrides the\
317
+ -nshuffles_nonstationarity option.
318
+ tfce_dh: the height increment used in the tfce integration (default:\
319
+ 0.1).
320
+ tfce_e: tfce extent exponent (default: 0.5).
321
+ tfce_h: tfce height exponent (default: 2).
322
+ variance: define variance groups for the G-statistic; measurements for\
323
+ which the expected variance is equivalent should contain the same index.
324
+ ftests: perform F-tests; input text file should contain, for each\
325
+ F-test, a row containing ones and zeros, where ones indicate the rows\
326
+ of the contrast matrix to be included in the F-test.
327
+ fonly: only assess F-tests; do not perform statistical inference on\
328
+ entries in the contrast matrix.
329
+ column: add a column to the design matrix corresponding to subject\
330
+ voxel-wise values (note that the contrast matrix must include an\
331
+ additional column for each use of this option); the text file provided\
332
+ via this option should contain a file name for each subject.
333
+ threshold: the cluster-forming threshold to use for a standard\
334
+ cluster-based analysis. This disables TFCE, which is the default\
335
+ otherwise.
336
+ connectivity: use 26-voxel-neighbourhood connectivity (Default: 6).
337
+ info: display information messages.
338
+ quiet: do not display information messages or progress status;\
339
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
340
+ environment variable to a non-empty string.
341
+ debug: display debugging messages.
342
+ force: force overwrite of output files (caution: using the same file as\
343
+ input and output might cause unexpected behaviour).
344
+ nthreads: use this number of threads in multi-threaded applications\
345
+ (set to 0 to disable multi-threading).
346
+ config: temporarily set the value of an MRtrix config file entry.
347
+ help_: display this information page and exit.
348
+ version: display version information and exit.
349
+ Returns:
350
+ Parameter dictionary
351
+ """
352
+ params = {
353
+ "@type": "mrtrix/mrclusterstats",
354
+ "notest": notest,
355
+ "strong": strong,
356
+ "nonstationarity": nonstationarity,
357
+ "fonly": fonly,
358
+ "connectivity": connectivity,
359
+ "info": info,
360
+ "quiet": quiet,
361
+ "debug": debug,
362
+ "force": force,
363
+ "help": help_,
364
+ "version": version,
365
+ "input": input_,
366
+ "design": design,
367
+ "contrast": contrast,
368
+ "mask": mask,
369
+ "output": output,
370
+ }
371
+ if errors is not None:
372
+ params["errors"] = errors
373
+ if exchange_within is not None:
374
+ params["exchange_within"] = exchange_within
375
+ if exchange_whole is not None:
376
+ params["exchange_whole"] = exchange_whole
377
+ if nshuffles is not None:
378
+ params["nshuffles"] = nshuffles
379
+ if permutations is not None:
380
+ params["permutations"] = permutations
381
+ if skew_nonstationarity is not None:
382
+ params["skew_nonstationarity"] = skew_nonstationarity
383
+ if nshuffles_nonstationarity is not None:
384
+ params["nshuffles_nonstationarity"] = nshuffles_nonstationarity
385
+ if permutations_nonstationarity is not None:
386
+ params["permutations_nonstationarity"] = permutations_nonstationarity
387
+ if tfce_dh is not None:
388
+ params["tfce_dh"] = tfce_dh
389
+ if tfce_e is not None:
390
+ params["tfce_e"] = tfce_e
391
+ if tfce_h is not None:
392
+ params["tfce_h"] = tfce_h
393
+ if variance is not None:
394
+ params["variance"] = variance
395
+ if ftests is not None:
396
+ params["ftests"] = ftests
397
+ if column is not None:
398
+ params["column"] = column
399
+ if threshold is not None:
400
+ params["threshold"] = threshold
401
+ if nthreads is not None:
402
+ params["nthreads"] = nthreads
403
+ if config is not None:
404
+ params["config"] = config
405
+ return params
406
+
407
+
408
+ def mrclusterstats_validate(
409
+ params: typing.Any,
410
+ ) -> None:
411
+ """
412
+ Validate parameters. Throws an error if `params` is not a valid
413
+ `MrclusterstatsParamsDict` object.
414
+
415
+ Args:
416
+ params: The parameters object to validate.
417
+ """
418
+ if params is None or not isinstance(params, dict):
419
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
420
+ if params.get("notest", False) is None:
421
+ raise StyxValidationError("`notest` must not be None")
422
+ if not isinstance(params["notest"], bool):
423
+ raise StyxValidationError(f'`notest` has the wrong type: Received `{type(params.get("notest", False))}` expected `bool`')
424
+ if params.get("errors", None) is not None:
425
+ if not isinstance(params["errors"], str):
426
+ raise StyxValidationError(f'`errors` has the wrong type: Received `{type(params.get("errors", None))}` expected `str | None`')
427
+ if params.get("exchange_within", None) is not None:
428
+ if not isinstance(params["exchange_within"], (pathlib.Path, str)):
429
+ raise StyxValidationError(f'`exchange_within` has the wrong type: Received `{type(params.get("exchange_within", None))}` expected `InputPathType | None`')
430
+ if params.get("exchange_whole", None) is not None:
431
+ if not isinstance(params["exchange_whole"], (pathlib.Path, str)):
432
+ raise StyxValidationError(f'`exchange_whole` has the wrong type: Received `{type(params.get("exchange_whole", None))}` expected `InputPathType | None`')
433
+ if params.get("strong", False) is None:
434
+ raise StyxValidationError("`strong` must not be None")
435
+ if not isinstance(params["strong"], bool):
436
+ raise StyxValidationError(f'`strong` has the wrong type: Received `{type(params.get("strong", False))}` expected `bool`')
437
+ if params.get("nshuffles", None) is not None:
438
+ if not isinstance(params["nshuffles"], int):
439
+ raise StyxValidationError(f'`nshuffles` has the wrong type: Received `{type(params.get("nshuffles", None))}` expected `int | None`')
440
+ if params.get("permutations", None) is not None:
441
+ if not isinstance(params["permutations"], (pathlib.Path, str)):
442
+ raise StyxValidationError(f'`permutations` has the wrong type: Received `{type(params.get("permutations", None))}` expected `InputPathType | None`')
443
+ if params.get("nonstationarity", False) is None:
444
+ raise StyxValidationError("`nonstationarity` must not be None")
445
+ if not isinstance(params["nonstationarity"], bool):
446
+ raise StyxValidationError(f'`nonstationarity` has the wrong type: Received `{type(params.get("nonstationarity", False))}` expected `bool`')
447
+ if params.get("skew_nonstationarity", None) is not None:
448
+ if not isinstance(params["skew_nonstationarity"], (float, int)):
449
+ raise StyxValidationError(f'`skew_nonstationarity` has the wrong type: Received `{type(params.get("skew_nonstationarity", None))}` expected `float | None`')
450
+ if params.get("nshuffles_nonstationarity", None) is not None:
451
+ if not isinstance(params["nshuffles_nonstationarity"], int):
452
+ raise StyxValidationError(f'`nshuffles_nonstationarity` has the wrong type: Received `{type(params.get("nshuffles_nonstationarity", None))}` expected `int | None`')
453
+ if params.get("permutations_nonstationarity", None) is not None:
454
+ if not isinstance(params["permutations_nonstationarity"], (pathlib.Path, str)):
455
+ raise StyxValidationError(f'`permutations_nonstationarity` has the wrong type: Received `{type(params.get("permutations_nonstationarity", None))}` expected `InputPathType | None`')
456
+ if params.get("tfce_dh", None) is not None:
457
+ if not isinstance(params["tfce_dh"], (float, int)):
458
+ raise StyxValidationError(f'`tfce_dh` has the wrong type: Received `{type(params.get("tfce_dh", None))}` expected `float | None`')
459
+ if params.get("tfce_e", None) is not None:
460
+ if not isinstance(params["tfce_e"], (float, int)):
461
+ raise StyxValidationError(f'`tfce_e` has the wrong type: Received `{type(params.get("tfce_e", None))}` expected `float | None`')
462
+ if params.get("tfce_h", None) is not None:
463
+ if not isinstance(params["tfce_h"], (float, int)):
464
+ raise StyxValidationError(f'`tfce_h` has the wrong type: Received `{type(params.get("tfce_h", None))}` expected `float | None`')
465
+ if params.get("variance", None) is not None:
466
+ if not isinstance(params["variance"], (pathlib.Path, str)):
467
+ raise StyxValidationError(f'`variance` has the wrong type: Received `{type(params.get("variance", None))}` expected `InputPathType | None`')
468
+ if params.get("ftests", None) is not None:
469
+ if not isinstance(params["ftests"], (pathlib.Path, str)):
470
+ raise StyxValidationError(f'`ftests` has the wrong type: Received `{type(params.get("ftests", None))}` expected `InputPathType | None`')
471
+ if params.get("fonly", False) is None:
472
+ raise StyxValidationError("`fonly` must not be None")
473
+ if not isinstance(params["fonly"], bool):
474
+ raise StyxValidationError(f'`fonly` has the wrong type: Received `{type(params.get("fonly", False))}` expected `bool`')
475
+ if params.get("column", None) is not None:
476
+ if not isinstance(params["column"], list):
477
+ raise StyxValidationError(f'`column` has the wrong type: Received `{type(params.get("column", None))}` expected `list[MrclusterstatsColumnParamsDict] | None`')
478
+ for e in params["column"]:
479
+ mrclusterstats_column_validate(e)
480
+ if params.get("threshold", None) is not None:
481
+ if not isinstance(params["threshold"], (float, int)):
482
+ raise StyxValidationError(f'`threshold` has the wrong type: Received `{type(params.get("threshold", None))}` expected `float | None`')
483
+ if params.get("connectivity", False) is None:
484
+ raise StyxValidationError("`connectivity` must not be None")
485
+ if not isinstance(params["connectivity"], bool):
486
+ raise StyxValidationError(f'`connectivity` has the wrong type: Received `{type(params.get("connectivity", False))}` expected `bool`')
487
+ if params.get("info", False) is None:
488
+ raise StyxValidationError("`info` must not be None")
489
+ if not isinstance(params["info"], bool):
490
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
491
+ if params.get("quiet", False) is None:
492
+ raise StyxValidationError("`quiet` must not be None")
493
+ if not isinstance(params["quiet"], bool):
494
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
495
+ if params.get("debug", False) is None:
496
+ raise StyxValidationError("`debug` must not be None")
497
+ if not isinstance(params["debug"], bool):
498
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
499
+ if params.get("force", False) is None:
500
+ raise StyxValidationError("`force` must not be None")
501
+ if not isinstance(params["force"], bool):
502
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
503
+ if params.get("nthreads", None) is not None:
504
+ if not isinstance(params["nthreads"], int):
505
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
506
+ if params.get("config", None) is not None:
507
+ if not isinstance(params["config"], list):
508
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[MrclusterstatsConfigParamsDict] | None`')
509
+ for e in params["config"]:
510
+ mrclusterstats_config_validate(e)
511
+ if params.get("help", False) is None:
512
+ raise StyxValidationError("`help` must not be None")
513
+ if not isinstance(params["help"], bool):
514
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
515
+ if params.get("version", False) is None:
516
+ raise StyxValidationError("`version` must not be None")
517
+ if not isinstance(params["version"], bool):
518
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
519
+ if params.get("input", None) is None:
520
+ raise StyxValidationError("`input` must not be None")
521
+ if not isinstance(params["input"], (pathlib.Path, str)):
522
+ raise StyxValidationError(f'`input` has the wrong type: Received `{type(params.get("input", None))}` expected `InputPathType`')
523
+ if params.get("design", None) is None:
524
+ raise StyxValidationError("`design` must not be None")
525
+ if not isinstance(params["design"], (pathlib.Path, str)):
526
+ raise StyxValidationError(f'`design` has the wrong type: Received `{type(params.get("design", None))}` expected `InputPathType`')
527
+ if params.get("contrast", None) is None:
528
+ raise StyxValidationError("`contrast` must not be None")
529
+ if not isinstance(params["contrast"], (pathlib.Path, str)):
530
+ raise StyxValidationError(f'`contrast` has the wrong type: Received `{type(params.get("contrast", None))}` expected `InputPathType`')
531
+ if params.get("mask", None) is None:
532
+ raise StyxValidationError("`mask` must not be None")
533
+ if not isinstance(params["mask"], (pathlib.Path, str)):
534
+ raise StyxValidationError(f'`mask` has the wrong type: Received `{type(params.get("mask", None))}` expected `InputPathType`')
535
+ if params.get("output", None) is None:
536
+ raise StyxValidationError("`output` must not be None")
537
+ if not isinstance(params["output"], str):
538
+ raise StyxValidationError(f'`output` has the wrong type: Received `{type(params.get("output", None))}` expected `str`')
539
+
540
+
541
+ def mrclusterstats_cargs(
542
+ params: MrclusterstatsParamsDict,
543
+ execution: Execution,
544
+ ) -> list[str]:
545
+ """
546
+ Build command-line arguments from parameters.
547
+
548
+ Args:
549
+ params: The parameters.
550
+ execution: The execution object for resolving input paths.
551
+ Returns:
552
+ Command-line arguments.
553
+ """
554
+ cargs = []
555
+ cargs.append("mrclusterstats")
556
+ if params.get("notest", False):
557
+ cargs.append("-notest")
558
+ if params.get("errors", None) is not None:
559
+ cargs.extend([
560
+ "-errors",
561
+ params.get("errors", None)
562
+ ])
563
+ if params.get("exchange_within", None) is not None:
564
+ cargs.extend([
565
+ "-exchange_within",
566
+ execution.input_file(params.get("exchange_within", None))
567
+ ])
568
+ if params.get("exchange_whole", None) is not None:
569
+ cargs.extend([
570
+ "-exchange_whole",
571
+ execution.input_file(params.get("exchange_whole", None))
572
+ ])
573
+ if params.get("strong", False):
574
+ cargs.append("-strong")
575
+ if params.get("nshuffles", None) is not None:
576
+ cargs.extend([
577
+ "-nshuffles",
578
+ str(params.get("nshuffles", None))
579
+ ])
580
+ if params.get("permutations", None) is not None:
581
+ cargs.extend([
582
+ "-permutations",
583
+ execution.input_file(params.get("permutations", None))
584
+ ])
585
+ if params.get("nonstationarity", False):
586
+ cargs.append("-nonstationarity")
587
+ if params.get("skew_nonstationarity", None) is not None:
588
+ cargs.extend([
589
+ "-skew_nonstationarity",
590
+ str(params.get("skew_nonstationarity", None))
591
+ ])
592
+ if params.get("nshuffles_nonstationarity", None) is not None:
593
+ cargs.extend([
594
+ "-nshuffles_nonstationarity",
595
+ str(params.get("nshuffles_nonstationarity", None))
596
+ ])
597
+ if params.get("permutations_nonstationarity", None) is not None:
598
+ cargs.extend([
599
+ "-permutations_nonstationarity",
600
+ execution.input_file(params.get("permutations_nonstationarity", None))
601
+ ])
602
+ if params.get("tfce_dh", None) is not None:
603
+ cargs.extend([
604
+ "-tfce_dh",
605
+ str(params.get("tfce_dh", None))
606
+ ])
607
+ if params.get("tfce_e", None) is not None:
608
+ cargs.extend([
609
+ "-tfce_e",
610
+ str(params.get("tfce_e", None))
611
+ ])
612
+ if params.get("tfce_h", None) is not None:
613
+ cargs.extend([
614
+ "-tfce_h",
615
+ str(params.get("tfce_h", None))
616
+ ])
617
+ if params.get("variance", None) is not None:
618
+ cargs.extend([
619
+ "-variance",
620
+ execution.input_file(params.get("variance", None))
621
+ ])
622
+ if params.get("ftests", None) is not None:
623
+ cargs.extend([
624
+ "-ftests",
625
+ execution.input_file(params.get("ftests", None))
626
+ ])
627
+ if params.get("fonly", False):
628
+ cargs.append("-fonly")
629
+ if params.get("column", None) is not None:
630
+ cargs.extend([a for c in [mrclusterstats_column_cargs(s, execution) for s in params.get("column", None)] for a in c])
631
+ if params.get("threshold", None) is not None:
632
+ cargs.extend([
633
+ "-threshold",
634
+ str(params.get("threshold", None))
635
+ ])
636
+ if params.get("connectivity", False):
637
+ cargs.append("-connectivity")
638
+ if params.get("info", False):
639
+ cargs.append("-info")
640
+ if params.get("quiet", False):
641
+ cargs.append("-quiet")
642
+ if params.get("debug", False):
643
+ cargs.append("-debug")
644
+ if params.get("force", False):
645
+ cargs.append("-force")
646
+ if params.get("nthreads", None) is not None:
647
+ cargs.extend([
648
+ "-nthreads",
649
+ str(params.get("nthreads", None))
650
+ ])
651
+ if params.get("config", None) is not None:
652
+ cargs.extend([a for c in [mrclusterstats_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
653
+ if params.get("help", False):
654
+ cargs.append("-help")
655
+ if params.get("version", False):
656
+ cargs.append("-version")
657
+ cargs.append(execution.input_file(params.get("input", None)))
658
+ cargs.append(execution.input_file(params.get("design", None)))
659
+ cargs.append(execution.input_file(params.get("contrast", None)))
660
+ cargs.append(execution.input_file(params.get("mask", None)))
661
+ cargs.append(params.get("output", None))
662
+ return cargs
663
+
664
+
665
+ def mrclusterstats_outputs(
666
+ params: MrclusterstatsParamsDict,
667
+ execution: Execution,
668
+ ) -> MrclusterstatsOutputs:
669
+ """
670
+ Build outputs object containing output file paths and possibly stdout/stderr.
671
+
672
+ Args:
673
+ params: The parameters.
674
+ execution: The execution object for resolving input paths.
675
+ Returns:
676
+ Outputs object.
677
+ """
678
+ ret = MrclusterstatsOutputs(
679
+ root=execution.output_file("."),
680
+ )
681
+ return ret
682
+
683
+
684
+ def mrclusterstats_execute(
685
+ params: MrclusterstatsParamsDict,
686
+ runner: Runner | None = None,
687
+ ) -> MrclusterstatsOutputs:
688
+ """
689
+ mrclusterstats
690
+
691
+ Voxel-based analysis using permutation testing and threshold-free cluster
692
+ enhancement.
693
+
694
+ In some software packages, a column of ones is automatically added to the
695
+ GLM design matrix; the purpose of this column is to estimate the "global
696
+ intercept", which is the predicted value of the observed variable if all
697
+ explanatory variables were to be zero. However there are rare situations
698
+ where including such a column would not be appropriate for a particular
699
+ experimental design. Hence, in MRtrix3 statistical inference commands, it is
700
+ up to the user to determine whether or not this column of ones should be
701
+ included in their design matrix, and add it explicitly if necessary. The
702
+ contrast matrix must also reflect the presence of this additional column.
703
+
704
+ References:
705
+
706
+ * If not using the -threshold command-line option:
707
+ Smith, S. M. & Nichols, T. E. Threshold-free cluster enhancement: Addressing
708
+ problems of smoothing, threshold dependence and localisation in cluster
709
+ inference. NeuroImage, 2009, 44, 83-98
710
+
711
+ * If using the -nonstationary option:
712
+ Salimi-Khorshidi, G. Smith, S.M. Nichols, T.E. Adjusting the effect of
713
+ nonstationarity in cluster-based and TFCE inference. Neuroimage, 2011,
714
+ 54(3), 2006-19.
715
+
716
+ Author: MRTrix3 Developers
717
+
718
+ URL: https://www.mrtrix.org/
719
+
720
+ Args:
721
+ params: The parameters.
722
+ runner: Command runner.
723
+ Returns:
724
+ NamedTuple of outputs (described in `MrclusterstatsOutputs`).
725
+ """
726
+ mrclusterstats_validate(params)
727
+ runner = runner or get_global_runner()
728
+ execution = runner.start_execution(MRCLUSTERSTATS_METADATA)
729
+ params = execution.params(params)
730
+ cargs = mrclusterstats_cargs(params, execution)
731
+ ret = mrclusterstats_outputs(params, execution)
732
+ execution.run(cargs)
733
+ return ret
734
+
735
+
736
+ def mrclusterstats(
737
+ input_: InputPathType,
738
+ design: InputPathType,
739
+ contrast: InputPathType,
740
+ mask: InputPathType,
741
+ output: str,
742
+ notest: bool = False,
743
+ errors: str | None = None,
744
+ exchange_within: InputPathType | None = None,
745
+ exchange_whole: InputPathType | None = None,
746
+ strong: bool = False,
747
+ nshuffles: int | None = None,
748
+ permutations: InputPathType | None = None,
749
+ nonstationarity: bool = False,
750
+ skew_nonstationarity: float | None = None,
751
+ nshuffles_nonstationarity: int | None = None,
752
+ permutations_nonstationarity: InputPathType | None = None,
753
+ tfce_dh: float | None = None,
754
+ tfce_e: float | None = None,
755
+ tfce_h: float | None = None,
756
+ variance: InputPathType | None = None,
757
+ ftests: InputPathType | None = None,
758
+ fonly: bool = False,
759
+ column: list[MrclusterstatsColumnParamsDict] | None = None,
760
+ threshold: float | None = None,
761
+ connectivity: bool = False,
762
+ info: bool = False,
763
+ quiet: bool = False,
764
+ debug: bool = False,
765
+ force: bool = False,
766
+ nthreads: int | None = None,
767
+ config: list[MrclusterstatsConfigParamsDict] | None = None,
768
+ help_: bool = False,
769
+ version: bool = False,
770
+ runner: Runner | None = None,
771
+ ) -> MrclusterstatsOutputs:
772
+ """
773
+ mrclusterstats
774
+
775
+ Voxel-based analysis using permutation testing and threshold-free cluster
776
+ enhancement.
777
+
778
+ In some software packages, a column of ones is automatically added to the
779
+ GLM design matrix; the purpose of this column is to estimate the "global
780
+ intercept", which is the predicted value of the observed variable if all
781
+ explanatory variables were to be zero. However there are rare situations
782
+ where including such a column would not be appropriate for a particular
783
+ experimental design. Hence, in MRtrix3 statistical inference commands, it is
784
+ up to the user to determine whether or not this column of ones should be
785
+ included in their design matrix, and add it explicitly if necessary. The
786
+ contrast matrix must also reflect the presence of this additional column.
787
+
788
+ References:
789
+
790
+ * If not using the -threshold command-line option:
791
+ Smith, S. M. & Nichols, T. E. Threshold-free cluster enhancement: Addressing
792
+ problems of smoothing, threshold dependence and localisation in cluster
793
+ inference. NeuroImage, 2009, 44, 83-98
794
+
795
+ * If using the -nonstationary option:
796
+ Salimi-Khorshidi, G. Smith, S.M. Nichols, T.E. Adjusting the effect of
797
+ nonstationarity in cluster-based and TFCE inference. Neuroimage, 2011,
798
+ 54(3), 2006-19.
799
+
800
+ Author: MRTrix3 Developers
801
+
802
+ URL: https://www.mrtrix.org/
803
+
804
+ Args:
805
+ input_: a text file containing the file names of the input images, one\
806
+ file per line.
807
+ design: the design matrix.
808
+ contrast: the contrast matrix.
809
+ mask: a mask used to define voxels included in the analysis.
810
+ output: the filename prefix for all output.
811
+ notest: don't perform statistical inference; only output population\
812
+ statistics (effect size, stdev etc).
813
+ errors: specify nature of errors for shuffling; options are:\
814
+ ee,ise,both (default: ee).
815
+ exchange_within: specify blocks of observations within each of which\
816
+ data may undergo restricted exchange.
817
+ exchange_whole: specify blocks of observations that may be exchanged\
818
+ with one another (for independent and symmetric errors, sign-flipping\
819
+ will occur block-wise).
820
+ strong: use strong familywise error control across multiple hypotheses.
821
+ nshuffles: the number of shuffles (default: 5000).
822
+ permutations: manually define the permutations (relabelling). The input\
823
+ should be a text file defining a m x n matrix, where each relabelling\
824
+ is defined as a column vector of size m, and the number of columns, n,\
825
+ defines the number of permutations. Can be generated with the\
826
+ palm_quickperms function in PALM\
827
+ (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
828
+ option.
829
+ nonstationarity: perform non-stationarity correction.
830
+ skew_nonstationarity: specify the skew parameter for empirical\
831
+ statistic calculation (default for this command is 1).
832
+ nshuffles_nonstationarity: the number of shuffles to use when\
833
+ precomputing the empirical statistic image for non-stationarity\
834
+ correction (default: 5000).
835
+ permutations_nonstationarity: manually define the permutations\
836
+ (relabelling) for computing the emprical statistics for\
837
+ non-stationarity correction. The input should be a text file defining a\
838
+ m x n matrix, where each relabelling is defined as a column vector of\
839
+ size m, and the number of columns, n, defines the number of\
840
+ permutations. Can be generated with the palm_quickperms function in\
841
+ PALM (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM) Overrides the\
842
+ -nshuffles_nonstationarity option.
843
+ tfce_dh: the height increment used in the tfce integration (default:\
844
+ 0.1).
845
+ tfce_e: tfce extent exponent (default: 0.5).
846
+ tfce_h: tfce height exponent (default: 2).
847
+ variance: define variance groups for the G-statistic; measurements for\
848
+ which the expected variance is equivalent should contain the same index.
849
+ ftests: perform F-tests; input text file should contain, for each\
850
+ F-test, a row containing ones and zeros, where ones indicate the rows\
851
+ of the contrast matrix to be included in the F-test.
852
+ fonly: only assess F-tests; do not perform statistical inference on\
853
+ entries in the contrast matrix.
854
+ column: add a column to the design matrix corresponding to subject\
855
+ voxel-wise values (note that the contrast matrix must include an\
856
+ additional column for each use of this option); the text file provided\
857
+ via this option should contain a file name for each subject.
858
+ threshold: the cluster-forming threshold to use for a standard\
859
+ cluster-based analysis. This disables TFCE, which is the default\
860
+ otherwise.
861
+ connectivity: use 26-voxel-neighbourhood connectivity (Default: 6).
862
+ info: display information messages.
863
+ quiet: do not display information messages or progress status;\
864
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
865
+ environment variable to a non-empty string.
866
+ debug: display debugging messages.
867
+ force: force overwrite of output files (caution: using the same file as\
868
+ input and output might cause unexpected behaviour).
869
+ nthreads: use this number of threads in multi-threaded applications\
870
+ (set to 0 to disable multi-threading).
871
+ config: temporarily set the value of an MRtrix config file entry.
872
+ help_: display this information page and exit.
873
+ version: display version information and exit.
874
+ runner: Command runner.
875
+ Returns:
876
+ NamedTuple of outputs (described in `MrclusterstatsOutputs`).
877
+ """
878
+ params = mrclusterstats_params(
879
+ notest=notest,
880
+ errors=errors,
881
+ exchange_within=exchange_within,
882
+ exchange_whole=exchange_whole,
883
+ strong=strong,
884
+ nshuffles=nshuffles,
885
+ permutations=permutations,
886
+ nonstationarity=nonstationarity,
887
+ skew_nonstationarity=skew_nonstationarity,
888
+ nshuffles_nonstationarity=nshuffles_nonstationarity,
889
+ permutations_nonstationarity=permutations_nonstationarity,
890
+ tfce_dh=tfce_dh,
891
+ tfce_e=tfce_e,
892
+ tfce_h=tfce_h,
893
+ variance=variance,
894
+ ftests=ftests,
895
+ fonly=fonly,
896
+ column=column,
897
+ threshold=threshold,
898
+ connectivity=connectivity,
899
+ info=info,
900
+ quiet=quiet,
901
+ debug=debug,
902
+ force=force,
903
+ nthreads=nthreads,
904
+ config=config,
905
+ help_=help_,
906
+ version=version,
907
+ input_=input_,
908
+ design=design,
909
+ contrast=contrast,
910
+ mask=mask,
911
+ output=output,
912
+ )
913
+ return mrclusterstats_execute(params, runner)
914
+
915
+
916
+ __all__ = [
917
+ "MRCLUSTERSTATS_METADATA",
918
+ "MrclusterstatsColumnParamsDict",
919
+ "MrclusterstatsColumnParamsDictTagged",
920
+ "MrclusterstatsConfigParamsDict",
921
+ "MrclusterstatsConfigParamsDictTagged",
922
+ "MrclusterstatsOutputs",
923
+ "MrclusterstatsParamsDict",
924
+ "MrclusterstatsParamsDictTagged",
925
+ "mrclusterstats",
926
+ "mrclusterstats_column",
927
+ "mrclusterstats_config",
928
+ "mrclusterstats_execute",
929
+ "mrclusterstats_params",
930
+ ]