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.
- niwrap_mrtrix/mrtrix/__init__.py +130 -0
- niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
- niwrap_mrtrix/mrtrix/amp2response.py +453 -0
- niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
- niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
- niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
- niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
- niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
- niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
- niwrap_mrtrix/mrtrix/dirflip.py +362 -0
- niwrap_mrtrix/mrtrix/dirgen.py +423 -0
- niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
- niwrap_mrtrix/mrtrix/dirorder.py +347 -0
- niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
- niwrap_mrtrix/mrtrix/dirstat.py +530 -0
- niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
- niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
- niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
- niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
- niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
- niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
- niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
- niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
- niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
- niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
- niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
- niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
- niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
- niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
- niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
- niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
- niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
- niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
- niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
- niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
- niwrap_mrtrix/mrtrix/label2colour.py +351 -0
- niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
- niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
- niwrap_mrtrix/mrtrix/labelstats.py +344 -0
- niwrap_mrtrix/mrtrix/maskdump.py +336 -0
- niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
- niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
- niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
- niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
- niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
- niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
- niwrap_mrtrix/mrtrix/mrcat.py +382 -0
- niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
- niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
- niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
- niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
- niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
- niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
- niwrap_mrtrix/mrtrix/mrdump.py +351 -0
- niwrap_mrtrix/mrtrix/mredit.py +546 -0
- niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
- niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
- niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
- niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
- niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
- niwrap_mrtrix/mrtrix/mrmath.py +413 -0
- niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
- niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
- niwrap_mrtrix/mrtrix/mrstats.py +427 -0
- niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
- niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
- niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
- niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
- niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
- niwrap_mrtrix/mrtrix/responsemean.py +316 -0
- niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
- niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
- niwrap_mrtrix/mrtrix/sh2power.py +353 -0
- niwrap_mrtrix/mrtrix/sh2response.py +394 -0
- niwrap_mrtrix/mrtrix/shbasis.py +373 -0
- niwrap_mrtrix/mrtrix/shconv.py +498 -0
- niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
- niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
- niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
- niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
- niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
- niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
- niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
- niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
- niwrap_mrtrix/mrtrix/tckmap.py +772 -0
- niwrap_mrtrix/mrtrix/tckresample.py +580 -0
- niwrap_mrtrix/mrtrix/tcksample.py +404 -0
- niwrap_mrtrix/mrtrix/tcksift.py +592 -0
- niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
- niwrap_mrtrix/mrtrix/tckstats.py +441 -0
- niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
- niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
- niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
- niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
- niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
- niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
- niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
- niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
- niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
- niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
- niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
- niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
- niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
- niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
- niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
- niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
- niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
- niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
- niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
- niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
- niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
- niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
- niwrap_mrtrix/mrtrix/warpinit.py +356 -0
- niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
- niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
- niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
- niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,616 @@
|
|
|
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
|
+
FIXELFILTER_METADATA = Metadata(
|
|
9
|
+
id="de612300fec8260dbe9407acf8595be232354182.boutiques",
|
|
10
|
+
name="fixelfilter",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
FixelfilterConfigParameters = typing.TypedDict('FixelfilterConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
FixelfilterVariousStringParameters = typing.TypedDict('FixelfilterVariousStringParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["VariousString"],
|
|
25
|
+
"obj": str,
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
FixelfilterVariousFileParameters = typing.TypedDict('FixelfilterVariousFileParameters', {
|
|
30
|
+
"__STYX_TYPE__": typing.Literal["VariousFile"],
|
|
31
|
+
"obj": InputPathType,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
FixelfilterVariousString1Parameters = typing.TypedDict('FixelfilterVariousString1Parameters', {
|
|
36
|
+
"__STYX_TYPE__": typing.Literal["VariousString_1"],
|
|
37
|
+
"obj": str,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
FixelfilterVariousFile1Parameters = typing.TypedDict('FixelfilterVariousFile1Parameters', {
|
|
42
|
+
"__STYX_TYPE__": typing.Literal["VariousFile_1"],
|
|
43
|
+
"obj": InputPathType,
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
FixelfilterParameters = typing.TypedDict('FixelfilterParameters', {
|
|
48
|
+
"__STYX_TYPE__": typing.Literal["fixelfilter"],
|
|
49
|
+
"matrix": InputPathType,
|
|
50
|
+
"threshold_value": typing.NotRequired[float | None],
|
|
51
|
+
"threshold_connectivity": typing.NotRequired[float | None],
|
|
52
|
+
"fwhm": typing.NotRequired[float | None],
|
|
53
|
+
"minweight": typing.NotRequired[float | None],
|
|
54
|
+
"mask": typing.NotRequired[InputPathType | None],
|
|
55
|
+
"info": bool,
|
|
56
|
+
"quiet": bool,
|
|
57
|
+
"debug": bool,
|
|
58
|
+
"force": bool,
|
|
59
|
+
"nthreads": typing.NotRequired[int | None],
|
|
60
|
+
"config": typing.NotRequired[list[FixelfilterConfigParameters] | None],
|
|
61
|
+
"help": bool,
|
|
62
|
+
"version": bool,
|
|
63
|
+
"input": typing.Union[FixelfilterVariousStringParameters, FixelfilterVariousFileParameters],
|
|
64
|
+
"filter": str,
|
|
65
|
+
"output": typing.Union[FixelfilterVariousString1Parameters, FixelfilterVariousFile1Parameters],
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def dyn_cargs(
|
|
70
|
+
t: str,
|
|
71
|
+
) -> typing.Any:
|
|
72
|
+
"""
|
|
73
|
+
Get build cargs function by command type.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
t: Command type.
|
|
77
|
+
Returns:
|
|
78
|
+
Build cargs function.
|
|
79
|
+
"""
|
|
80
|
+
return {
|
|
81
|
+
"fixelfilter": fixelfilter_cargs,
|
|
82
|
+
"config": fixelfilter_config_cargs,
|
|
83
|
+
"VariousString": fixelfilter_various_string_cargs,
|
|
84
|
+
"VariousFile": fixelfilter_various_file_cargs,
|
|
85
|
+
"VariousString_1": fixelfilter_various_string_1_cargs,
|
|
86
|
+
"VariousFile_1": fixelfilter_various_file_1_cargs,
|
|
87
|
+
}.get(t)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def dyn_outputs(
|
|
91
|
+
t: str,
|
|
92
|
+
) -> typing.Any:
|
|
93
|
+
"""
|
|
94
|
+
Get build outputs function by command type.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
t: Command type.
|
|
98
|
+
Returns:
|
|
99
|
+
Build outputs function.
|
|
100
|
+
"""
|
|
101
|
+
return {
|
|
102
|
+
}.get(t)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def fixelfilter_config_params(
|
|
106
|
+
key: str,
|
|
107
|
+
value: str,
|
|
108
|
+
) -> FixelfilterConfigParameters:
|
|
109
|
+
"""
|
|
110
|
+
Build parameters.
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
114
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
115
|
+
Returns:
|
|
116
|
+
Parameter dictionary
|
|
117
|
+
"""
|
|
118
|
+
params = {
|
|
119
|
+
"__STYXTYPE__": "config",
|
|
120
|
+
"key": key,
|
|
121
|
+
"value": value,
|
|
122
|
+
}
|
|
123
|
+
return params
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def fixelfilter_config_cargs(
|
|
127
|
+
params: FixelfilterConfigParameters,
|
|
128
|
+
execution: Execution,
|
|
129
|
+
) -> list[str]:
|
|
130
|
+
"""
|
|
131
|
+
Build command-line arguments from parameters.
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
params: The parameters.
|
|
135
|
+
execution: The execution object for resolving input paths.
|
|
136
|
+
Returns:
|
|
137
|
+
Command-line arguments.
|
|
138
|
+
"""
|
|
139
|
+
cargs = []
|
|
140
|
+
cargs.append("-config")
|
|
141
|
+
cargs.append(params.get("key"))
|
|
142
|
+
cargs.append(params.get("value"))
|
|
143
|
+
return cargs
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def fixelfilter_various_string_params(
|
|
147
|
+
obj: str,
|
|
148
|
+
) -> FixelfilterVariousStringParameters:
|
|
149
|
+
"""
|
|
150
|
+
Build parameters.
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
obj: String object.
|
|
154
|
+
Returns:
|
|
155
|
+
Parameter dictionary
|
|
156
|
+
"""
|
|
157
|
+
params = {
|
|
158
|
+
"__STYXTYPE__": "VariousString",
|
|
159
|
+
"obj": obj,
|
|
160
|
+
}
|
|
161
|
+
return params
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def fixelfilter_various_string_cargs(
|
|
165
|
+
params: FixelfilterVariousStringParameters,
|
|
166
|
+
execution: Execution,
|
|
167
|
+
) -> list[str]:
|
|
168
|
+
"""
|
|
169
|
+
Build command-line arguments from parameters.
|
|
170
|
+
|
|
171
|
+
Args:
|
|
172
|
+
params: The parameters.
|
|
173
|
+
execution: The execution object for resolving input paths.
|
|
174
|
+
Returns:
|
|
175
|
+
Command-line arguments.
|
|
176
|
+
"""
|
|
177
|
+
cargs = []
|
|
178
|
+
cargs.append(params.get("obj"))
|
|
179
|
+
return cargs
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def fixelfilter_various_file_params(
|
|
183
|
+
obj: InputPathType,
|
|
184
|
+
) -> FixelfilterVariousFileParameters:
|
|
185
|
+
"""
|
|
186
|
+
Build parameters.
|
|
187
|
+
|
|
188
|
+
Args:
|
|
189
|
+
obj: File object.
|
|
190
|
+
Returns:
|
|
191
|
+
Parameter dictionary
|
|
192
|
+
"""
|
|
193
|
+
params = {
|
|
194
|
+
"__STYXTYPE__": "VariousFile",
|
|
195
|
+
"obj": obj,
|
|
196
|
+
}
|
|
197
|
+
return params
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def fixelfilter_various_file_cargs(
|
|
201
|
+
params: FixelfilterVariousFileParameters,
|
|
202
|
+
execution: Execution,
|
|
203
|
+
) -> list[str]:
|
|
204
|
+
"""
|
|
205
|
+
Build command-line arguments from parameters.
|
|
206
|
+
|
|
207
|
+
Args:
|
|
208
|
+
params: The parameters.
|
|
209
|
+
execution: The execution object for resolving input paths.
|
|
210
|
+
Returns:
|
|
211
|
+
Command-line arguments.
|
|
212
|
+
"""
|
|
213
|
+
cargs = []
|
|
214
|
+
cargs.append(execution.input_file(params.get("obj")))
|
|
215
|
+
return cargs
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def fixelfilter_various_string_1_params(
|
|
219
|
+
obj: str,
|
|
220
|
+
) -> FixelfilterVariousString1Parameters:
|
|
221
|
+
"""
|
|
222
|
+
Build parameters.
|
|
223
|
+
|
|
224
|
+
Args:
|
|
225
|
+
obj: String object.
|
|
226
|
+
Returns:
|
|
227
|
+
Parameter dictionary
|
|
228
|
+
"""
|
|
229
|
+
params = {
|
|
230
|
+
"__STYXTYPE__": "VariousString_1",
|
|
231
|
+
"obj": obj,
|
|
232
|
+
}
|
|
233
|
+
return params
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def fixelfilter_various_string_1_cargs(
|
|
237
|
+
params: FixelfilterVariousString1Parameters,
|
|
238
|
+
execution: Execution,
|
|
239
|
+
) -> list[str]:
|
|
240
|
+
"""
|
|
241
|
+
Build command-line arguments from parameters.
|
|
242
|
+
|
|
243
|
+
Args:
|
|
244
|
+
params: The parameters.
|
|
245
|
+
execution: The execution object for resolving input paths.
|
|
246
|
+
Returns:
|
|
247
|
+
Command-line arguments.
|
|
248
|
+
"""
|
|
249
|
+
cargs = []
|
|
250
|
+
cargs.append(params.get("obj"))
|
|
251
|
+
return cargs
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def fixelfilter_various_file_1_params(
|
|
255
|
+
obj: InputPathType,
|
|
256
|
+
) -> FixelfilterVariousFile1Parameters:
|
|
257
|
+
"""
|
|
258
|
+
Build parameters.
|
|
259
|
+
|
|
260
|
+
Args:
|
|
261
|
+
obj: File object.
|
|
262
|
+
Returns:
|
|
263
|
+
Parameter dictionary
|
|
264
|
+
"""
|
|
265
|
+
params = {
|
|
266
|
+
"__STYXTYPE__": "VariousFile_1",
|
|
267
|
+
"obj": obj,
|
|
268
|
+
}
|
|
269
|
+
return params
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def fixelfilter_various_file_1_cargs(
|
|
273
|
+
params: FixelfilterVariousFile1Parameters,
|
|
274
|
+
execution: Execution,
|
|
275
|
+
) -> list[str]:
|
|
276
|
+
"""
|
|
277
|
+
Build command-line arguments from parameters.
|
|
278
|
+
|
|
279
|
+
Args:
|
|
280
|
+
params: The parameters.
|
|
281
|
+
execution: The execution object for resolving input paths.
|
|
282
|
+
Returns:
|
|
283
|
+
Command-line arguments.
|
|
284
|
+
"""
|
|
285
|
+
cargs = []
|
|
286
|
+
cargs.append(execution.input_file(params.get("obj")))
|
|
287
|
+
return cargs
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
class FixelfilterOutputs(typing.NamedTuple):
|
|
291
|
+
"""
|
|
292
|
+
Output object returned when calling `fixelfilter(...)`.
|
|
293
|
+
"""
|
|
294
|
+
root: OutputPathType
|
|
295
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
def fixelfilter_params(
|
|
299
|
+
matrix: InputPathType,
|
|
300
|
+
input_: typing.Union[FixelfilterVariousStringParameters, FixelfilterVariousFileParameters],
|
|
301
|
+
filter_: str,
|
|
302
|
+
output: typing.Union[FixelfilterVariousString1Parameters, FixelfilterVariousFile1Parameters],
|
|
303
|
+
threshold_value: float | None = None,
|
|
304
|
+
threshold_connectivity: float | None = None,
|
|
305
|
+
fwhm: float | None = None,
|
|
306
|
+
minweight: float | None = None,
|
|
307
|
+
mask: InputPathType | None = None,
|
|
308
|
+
info: bool = False,
|
|
309
|
+
quiet: bool = False,
|
|
310
|
+
debug: bool = False,
|
|
311
|
+
force: bool = False,
|
|
312
|
+
nthreads: int | None = None,
|
|
313
|
+
config: list[FixelfilterConfigParameters] | None = None,
|
|
314
|
+
help_: bool = False,
|
|
315
|
+
version: bool = False,
|
|
316
|
+
) -> FixelfilterParameters:
|
|
317
|
+
"""
|
|
318
|
+
Build parameters.
|
|
319
|
+
|
|
320
|
+
Args:
|
|
321
|
+
matrix: provide a fixel-fixel connectivity matrix for filtering\
|
|
322
|
+
operations that require it.
|
|
323
|
+
input_: the input: either a fixel data file, or a fixel directory (see\
|
|
324
|
+
Description).
|
|
325
|
+
filter_: the filtering operation to perform; options are: connect,\
|
|
326
|
+
smooth.
|
|
327
|
+
output: the output: either a fixel data file, or a fixel directory (see\
|
|
328
|
+
Description).
|
|
329
|
+
threshold_value: specify a threshold for the input fixel data file\
|
|
330
|
+
values (default = 0.5).
|
|
331
|
+
threshold_connectivity: specify a fixel-fixel connectivity threshold\
|
|
332
|
+
for connected-component analysis (default = 0.10000000000000001).
|
|
333
|
+
fwhm: the full-width half-maximum (FWHM) of the spatial component of\
|
|
334
|
+
the smoothing filter (default = 10mm).
|
|
335
|
+
minweight: apply a minimum threshold to smoothing weights (default =\
|
|
336
|
+
0.01).
|
|
337
|
+
mask: only perform smoothing within a specified binary fixel mask.
|
|
338
|
+
info: display information messages.
|
|
339
|
+
quiet: do not display information messages or progress status;\
|
|
340
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
341
|
+
environment variable to a non-empty string.
|
|
342
|
+
debug: display debugging messages.
|
|
343
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
344
|
+
input and output might cause unexpected behaviour).
|
|
345
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
346
|
+
(set to 0 to disable multi-threading).
|
|
347
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
348
|
+
help_: display this information page and exit.
|
|
349
|
+
version: display version information and exit.
|
|
350
|
+
Returns:
|
|
351
|
+
Parameter dictionary
|
|
352
|
+
"""
|
|
353
|
+
params = {
|
|
354
|
+
"__STYXTYPE__": "fixelfilter",
|
|
355
|
+
"matrix": matrix,
|
|
356
|
+
"info": info,
|
|
357
|
+
"quiet": quiet,
|
|
358
|
+
"debug": debug,
|
|
359
|
+
"force": force,
|
|
360
|
+
"help": help_,
|
|
361
|
+
"version": version,
|
|
362
|
+
"input": input_,
|
|
363
|
+
"filter": filter_,
|
|
364
|
+
"output": output,
|
|
365
|
+
}
|
|
366
|
+
if threshold_value is not None:
|
|
367
|
+
params["threshold_value"] = threshold_value
|
|
368
|
+
if threshold_connectivity is not None:
|
|
369
|
+
params["threshold_connectivity"] = threshold_connectivity
|
|
370
|
+
if fwhm is not None:
|
|
371
|
+
params["fwhm"] = fwhm
|
|
372
|
+
if minweight is not None:
|
|
373
|
+
params["minweight"] = minweight
|
|
374
|
+
if mask is not None:
|
|
375
|
+
params["mask"] = mask
|
|
376
|
+
if nthreads is not None:
|
|
377
|
+
params["nthreads"] = nthreads
|
|
378
|
+
if config is not None:
|
|
379
|
+
params["config"] = config
|
|
380
|
+
return params
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
def fixelfilter_cargs(
|
|
384
|
+
params: FixelfilterParameters,
|
|
385
|
+
execution: Execution,
|
|
386
|
+
) -> list[str]:
|
|
387
|
+
"""
|
|
388
|
+
Build command-line arguments from parameters.
|
|
389
|
+
|
|
390
|
+
Args:
|
|
391
|
+
params: The parameters.
|
|
392
|
+
execution: The execution object for resolving input paths.
|
|
393
|
+
Returns:
|
|
394
|
+
Command-line arguments.
|
|
395
|
+
"""
|
|
396
|
+
cargs = []
|
|
397
|
+
cargs.append("fixelfilter")
|
|
398
|
+
cargs.extend([
|
|
399
|
+
"-matrix",
|
|
400
|
+
execution.input_file(params.get("matrix"))
|
|
401
|
+
])
|
|
402
|
+
if params.get("threshold_value") is not None:
|
|
403
|
+
cargs.extend([
|
|
404
|
+
"-threshold_value",
|
|
405
|
+
str(params.get("threshold_value"))
|
|
406
|
+
])
|
|
407
|
+
if params.get("threshold_connectivity") is not None:
|
|
408
|
+
cargs.extend([
|
|
409
|
+
"-threshold_connectivity",
|
|
410
|
+
str(params.get("threshold_connectivity"))
|
|
411
|
+
])
|
|
412
|
+
if params.get("fwhm") is not None:
|
|
413
|
+
cargs.extend([
|
|
414
|
+
"-fwhm",
|
|
415
|
+
str(params.get("fwhm"))
|
|
416
|
+
])
|
|
417
|
+
if params.get("minweight") is not None:
|
|
418
|
+
cargs.extend([
|
|
419
|
+
"-minweight",
|
|
420
|
+
str(params.get("minweight"))
|
|
421
|
+
])
|
|
422
|
+
if params.get("mask") is not None:
|
|
423
|
+
cargs.extend([
|
|
424
|
+
"-mask",
|
|
425
|
+
execution.input_file(params.get("mask"))
|
|
426
|
+
])
|
|
427
|
+
if params.get("info"):
|
|
428
|
+
cargs.append("-info")
|
|
429
|
+
if params.get("quiet"):
|
|
430
|
+
cargs.append("-quiet")
|
|
431
|
+
if params.get("debug"):
|
|
432
|
+
cargs.append("-debug")
|
|
433
|
+
if params.get("force"):
|
|
434
|
+
cargs.append("-force")
|
|
435
|
+
if params.get("nthreads") is not None:
|
|
436
|
+
cargs.extend([
|
|
437
|
+
"-nthreads",
|
|
438
|
+
str(params.get("nthreads"))
|
|
439
|
+
])
|
|
440
|
+
if params.get("config") is not None:
|
|
441
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
442
|
+
if params.get("help"):
|
|
443
|
+
cargs.append("-help")
|
|
444
|
+
if params.get("version"):
|
|
445
|
+
cargs.append("-version")
|
|
446
|
+
cargs.extend(dyn_cargs(params.get("input")["__STYXTYPE__"])(params.get("input"), execution))
|
|
447
|
+
cargs.append(params.get("filter"))
|
|
448
|
+
cargs.extend(dyn_cargs(params.get("output")["__STYXTYPE__"])(params.get("output"), execution))
|
|
449
|
+
return cargs
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
def fixelfilter_outputs(
|
|
453
|
+
params: FixelfilterParameters,
|
|
454
|
+
execution: Execution,
|
|
455
|
+
) -> FixelfilterOutputs:
|
|
456
|
+
"""
|
|
457
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
458
|
+
|
|
459
|
+
Args:
|
|
460
|
+
params: The parameters.
|
|
461
|
+
execution: The execution object for resolving input paths.
|
|
462
|
+
Returns:
|
|
463
|
+
Outputs object.
|
|
464
|
+
"""
|
|
465
|
+
ret = FixelfilterOutputs(
|
|
466
|
+
root=execution.output_file("."),
|
|
467
|
+
)
|
|
468
|
+
return ret
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
def fixelfilter_execute(
|
|
472
|
+
params: FixelfilterParameters,
|
|
473
|
+
execution: Execution,
|
|
474
|
+
) -> FixelfilterOutputs:
|
|
475
|
+
"""
|
|
476
|
+
Perform filtering operations on fixel-based data.
|
|
477
|
+
|
|
478
|
+
If the first input to the command is a specific fixel data file, then a
|
|
479
|
+
filtered version of only that file will be generated by the command.
|
|
480
|
+
Alternatively, if the input is the location of a fixel directory, then the
|
|
481
|
+
command will create a duplicate of the fixel directory, and apply the
|
|
482
|
+
specified filter operation to all fixel data files within the directory.
|
|
483
|
+
|
|
484
|
+
References:
|
|
485
|
+
|
|
486
|
+
.
|
|
487
|
+
|
|
488
|
+
Author: MRTrix3 Developers
|
|
489
|
+
|
|
490
|
+
URL: https://www.mrtrix.org/
|
|
491
|
+
|
|
492
|
+
Args:
|
|
493
|
+
params: The parameters.
|
|
494
|
+
execution: The execution object.
|
|
495
|
+
Returns:
|
|
496
|
+
NamedTuple of outputs (described in `FixelfilterOutputs`).
|
|
497
|
+
"""
|
|
498
|
+
params = execution.params(params)
|
|
499
|
+
cargs = fixelfilter_cargs(params, execution)
|
|
500
|
+
ret = fixelfilter_outputs(params, execution)
|
|
501
|
+
execution.run(cargs)
|
|
502
|
+
return ret
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
def fixelfilter(
|
|
506
|
+
matrix: InputPathType,
|
|
507
|
+
input_: typing.Union[FixelfilterVariousStringParameters, FixelfilterVariousFileParameters],
|
|
508
|
+
filter_: str,
|
|
509
|
+
output: typing.Union[FixelfilterVariousString1Parameters, FixelfilterVariousFile1Parameters],
|
|
510
|
+
threshold_value: float | None = None,
|
|
511
|
+
threshold_connectivity: float | None = None,
|
|
512
|
+
fwhm: float | None = None,
|
|
513
|
+
minweight: float | None = None,
|
|
514
|
+
mask: InputPathType | None = None,
|
|
515
|
+
info: bool = False,
|
|
516
|
+
quiet: bool = False,
|
|
517
|
+
debug: bool = False,
|
|
518
|
+
force: bool = False,
|
|
519
|
+
nthreads: int | None = None,
|
|
520
|
+
config: list[FixelfilterConfigParameters] | None = None,
|
|
521
|
+
help_: bool = False,
|
|
522
|
+
version: bool = False,
|
|
523
|
+
runner: Runner | None = None,
|
|
524
|
+
) -> FixelfilterOutputs:
|
|
525
|
+
"""
|
|
526
|
+
Perform filtering operations on fixel-based data.
|
|
527
|
+
|
|
528
|
+
If the first input to the command is a specific fixel data file, then a
|
|
529
|
+
filtered version of only that file will be generated by the command.
|
|
530
|
+
Alternatively, if the input is the location of a fixel directory, then the
|
|
531
|
+
command will create a duplicate of the fixel directory, and apply the
|
|
532
|
+
specified filter operation to all fixel data files within the directory.
|
|
533
|
+
|
|
534
|
+
References:
|
|
535
|
+
|
|
536
|
+
.
|
|
537
|
+
|
|
538
|
+
Author: MRTrix3 Developers
|
|
539
|
+
|
|
540
|
+
URL: https://www.mrtrix.org/
|
|
541
|
+
|
|
542
|
+
Args:
|
|
543
|
+
matrix: provide a fixel-fixel connectivity matrix for filtering\
|
|
544
|
+
operations that require it.
|
|
545
|
+
input_: the input: either a fixel data file, or a fixel directory (see\
|
|
546
|
+
Description).
|
|
547
|
+
filter_: the filtering operation to perform; options are: connect,\
|
|
548
|
+
smooth.
|
|
549
|
+
output: the output: either a fixel data file, or a fixel directory (see\
|
|
550
|
+
Description).
|
|
551
|
+
threshold_value: specify a threshold for the input fixel data file\
|
|
552
|
+
values (default = 0.5).
|
|
553
|
+
threshold_connectivity: specify a fixel-fixel connectivity threshold\
|
|
554
|
+
for connected-component analysis (default = 0.10000000000000001).
|
|
555
|
+
fwhm: the full-width half-maximum (FWHM) of the spatial component of\
|
|
556
|
+
the smoothing filter (default = 10mm).
|
|
557
|
+
minweight: apply a minimum threshold to smoothing weights (default =\
|
|
558
|
+
0.01).
|
|
559
|
+
mask: only perform smoothing within a specified binary fixel mask.
|
|
560
|
+
info: display information messages.
|
|
561
|
+
quiet: do not display information messages or progress status;\
|
|
562
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
563
|
+
environment variable to a non-empty string.
|
|
564
|
+
debug: display debugging messages.
|
|
565
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
566
|
+
input and output might cause unexpected behaviour).
|
|
567
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
568
|
+
(set to 0 to disable multi-threading).
|
|
569
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
570
|
+
help_: display this information page and exit.
|
|
571
|
+
version: display version information and exit.
|
|
572
|
+
runner: Command runner.
|
|
573
|
+
Returns:
|
|
574
|
+
NamedTuple of outputs (described in `FixelfilterOutputs`).
|
|
575
|
+
"""
|
|
576
|
+
runner = runner or get_global_runner()
|
|
577
|
+
execution = runner.start_execution(FIXELFILTER_METADATA)
|
|
578
|
+
params = fixelfilter_params(
|
|
579
|
+
matrix=matrix,
|
|
580
|
+
threshold_value=threshold_value,
|
|
581
|
+
threshold_connectivity=threshold_connectivity,
|
|
582
|
+
fwhm=fwhm,
|
|
583
|
+
minweight=minweight,
|
|
584
|
+
mask=mask,
|
|
585
|
+
info=info,
|
|
586
|
+
quiet=quiet,
|
|
587
|
+
debug=debug,
|
|
588
|
+
force=force,
|
|
589
|
+
nthreads=nthreads,
|
|
590
|
+
config=config,
|
|
591
|
+
help_=help_,
|
|
592
|
+
version=version,
|
|
593
|
+
input_=input_,
|
|
594
|
+
filter_=filter_,
|
|
595
|
+
output=output,
|
|
596
|
+
)
|
|
597
|
+
return fixelfilter_execute(params, execution)
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
__all__ = [
|
|
601
|
+
"FIXELFILTER_METADATA",
|
|
602
|
+
"FixelfilterConfigParameters",
|
|
603
|
+
"FixelfilterOutputs",
|
|
604
|
+
"FixelfilterParameters",
|
|
605
|
+
"FixelfilterVariousFile1Parameters",
|
|
606
|
+
"FixelfilterVariousFileParameters",
|
|
607
|
+
"FixelfilterVariousString1Parameters",
|
|
608
|
+
"FixelfilterVariousStringParameters",
|
|
609
|
+
"fixelfilter",
|
|
610
|
+
"fixelfilter_config_params",
|
|
611
|
+
"fixelfilter_params",
|
|
612
|
+
"fixelfilter_various_file_1_params",
|
|
613
|
+
"fixelfilter_various_file_params",
|
|
614
|
+
"fixelfilter_various_string_1_params",
|
|
615
|
+
"fixelfilter_various_string_params",
|
|
616
|
+
]
|