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.
- niwrap_mrtrix/mrtrix/__init__.py +263 -0
- niwrap_mrtrix/mrtrix/afdconnectivity.py +527 -0
- niwrap_mrtrix/mrtrix/amp2response.py +560 -0
- niwrap_mrtrix/mrtrix/amp2sh.py +870 -0
- niwrap_mrtrix/mrtrix/connectome2tck.py +583 -0
- niwrap_mrtrix/mrtrix/connectomeedit.py +413 -0
- niwrap_mrtrix/mrtrix/connectomestats.py +956 -0
- niwrap_mrtrix/mrtrix/dcmedit.py +552 -0
- niwrap_mrtrix/mrtrix/dcminfo.py +529 -0
- niwrap_mrtrix/mrtrix/dirflip.py +440 -0
- niwrap_mrtrix/mrtrix/dirgen.py +514 -0
- niwrap_mrtrix/mrtrix/dirmerge.py +446 -0
- niwrap_mrtrix/mrtrix/dirorder.py +421 -0
- niwrap_mrtrix/mrtrix/dirsplit.py +436 -0
- niwrap_mrtrix/mrtrix/dirstat.py +640 -0
- niwrap_mrtrix/mrtrix/dwi2adc.py +531 -0
- niwrap_mrtrix/mrtrix/dwi2fod.py +1156 -0
- niwrap_mrtrix/mrtrix/dwi2mask.py +570 -0
- niwrap_mrtrix/mrtrix/dwi2response.py +1774 -0
- niwrap_mrtrix/mrtrix/dwi2tensor.py +715 -0
- niwrap_mrtrix/mrtrix/dwibiascorrect.py +673 -0
- niwrap_mrtrix/mrtrix/dwidenoise.py +570 -0
- niwrap_mrtrix/mrtrix/dwiextract.py +1111 -0
- niwrap_mrtrix/mrtrix/dwigradcheck.py +665 -0
- niwrap_mrtrix/mrtrix/fixel2peaks.py +613 -0
- niwrap_mrtrix/mrtrix/fixel2sh.py +430 -0
- niwrap_mrtrix/mrtrix/fixel2tsf.py +435 -0
- niwrap_mrtrix/mrtrix/fixel2voxel.py +523 -0
- niwrap_mrtrix/mrtrix/fixelcfestats.py +1179 -0
- niwrap_mrtrix/mrtrix/fixelconnectivity.py +477 -0
- niwrap_mrtrix/mrtrix/fixelconvert.py +850 -0
- niwrap_mrtrix/mrtrix/fixelcorrespondence.py +455 -0
- niwrap_mrtrix/mrtrix/fixelcrop.py +422 -0
- niwrap_mrtrix/mrtrix/fixelfilter.py +882 -0
- niwrap_mrtrix/mrtrix/fixelreorient.py +435 -0
- niwrap_mrtrix/mrtrix/fod2dec.py +571 -0
- niwrap_mrtrix/mrtrix/fod2fixel.py +646 -0
- niwrap_mrtrix/mrtrix/label2colour.py +426 -0
- niwrap_mrtrix/mrtrix/label2mesh.py +417 -0
- niwrap_mrtrix/mrtrix/labelconvert.py +460 -0
- niwrap_mrtrix/mrtrix/labelstats.py +418 -0
- niwrap_mrtrix/mrtrix/maskdump.py +404 -0
- niwrap_mrtrix/mrtrix/maskfilter.py +730 -0
- niwrap_mrtrix/mrtrix/mesh2voxel.py +422 -0
- niwrap_mrtrix/mrtrix/meshconvert.py +514 -0
- niwrap_mrtrix/mrtrix/meshfilter.py +452 -0
- niwrap_mrtrix/mrtrix/mraverageheader.py +485 -0
- niwrap_mrtrix/mrtrix/mrcalc.py +4302 -0
- niwrap_mrtrix/mrtrix/mrcat.py +467 -0
- niwrap_mrtrix/mrtrix/mrcentroid.py +418 -0
- niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +446 -0
- niwrap_mrtrix/mrtrix/mrclusterstats.py +930 -0
- niwrap_mrtrix/mrtrix/mrcolour.py +490 -0
- niwrap_mrtrix/mrtrix/mrconvert.py +1967 -0
- niwrap_mrtrix/mrtrix/mrdegibbs.py +535 -0
- niwrap_mrtrix/mrtrix/mrdump.py +423 -0
- niwrap_mrtrix/mrtrix/mredit.py +737 -0
- niwrap_mrtrix/mrtrix/mrfilter.py +971 -0
- niwrap_mrtrix/mrtrix/mrgrid.py +1079 -0
- niwrap_mrtrix/mrtrix/mrhistmatch.py +494 -0
- niwrap_mrtrix/mrtrix/mrhistogram.py +484 -0
- niwrap_mrtrix/mrtrix/mrinfo.py +1282 -0
- niwrap_mrtrix/mrtrix/mrmath.py +503 -0
- niwrap_mrtrix/mrtrix/mrmetric.py +525 -0
- niwrap_mrtrix/mrtrix/mrregister.py +2098 -0
- niwrap_mrtrix/mrtrix/mrstats.py +534 -0
- niwrap_mrtrix/mrtrix/mrthreshold.py +666 -0
- niwrap_mrtrix/mrtrix/mrtransform.py +1372 -0
- niwrap_mrtrix/mrtrix/mtnormalise.py +725 -0
- niwrap_mrtrix/mrtrix/peaks2amp.py +403 -0
- niwrap_mrtrix/mrtrix/peaks2fixel.py +422 -0
- niwrap_mrtrix/mrtrix/responsemean.py +385 -0
- niwrap_mrtrix/mrtrix/sh2amp.py +844 -0
- niwrap_mrtrix/mrtrix/sh2peaks.py +632 -0
- niwrap_mrtrix/mrtrix/sh2power.py +427 -0
- niwrap_mrtrix/mrtrix/sh2response.py +481 -0
- niwrap_mrtrix/mrtrix/shbasis.py +445 -0
- niwrap_mrtrix/mrtrix/shconv.py +661 -0
- niwrap_mrtrix/mrtrix/tck2connectome.py +727 -0
- niwrap_mrtrix/mrtrix/tck2fixel.py +447 -0
- niwrap_mrtrix/mrtrix/tckconvert.py +775 -0
- niwrap_mrtrix/mrtrix/tckdfc.py +684 -0
- niwrap_mrtrix/mrtrix/tckedit.py +1478 -0
- niwrap_mrtrix/mrtrix/tckgen.py +2733 -0
- niwrap_mrtrix/mrtrix/tckglobal.py +944 -0
- niwrap_mrtrix/mrtrix/tckinfo.py +402 -0
- niwrap_mrtrix/mrtrix/tckmap.py +1004 -0
- niwrap_mrtrix/mrtrix/tckresample.py +760 -0
- niwrap_mrtrix/mrtrix/tcksample.py +497 -0
- niwrap_mrtrix/mrtrix/tcksift.py +739 -0
- niwrap_mrtrix/mrtrix/tcksift2.py +902 -0
- niwrap_mrtrix/mrtrix/tckstats.py +550 -0
- niwrap_mrtrix/mrtrix/tcktransform.py +414 -0
- niwrap_mrtrix/mrtrix/tensor2metric.py +659 -0
- niwrap_mrtrix/mrtrix/transformcalc.py +421 -0
- niwrap_mrtrix/mrtrix/transformcompose.py +625 -0
- niwrap_mrtrix/mrtrix/transformconvert.py +423 -0
- niwrap_mrtrix/mrtrix/tsfdivide.py +414 -0
- niwrap_mrtrix/mrtrix/tsfinfo.py +421 -0
- niwrap_mrtrix/mrtrix/tsfmult.py +401 -0
- niwrap_mrtrix/mrtrix/tsfsmooth.py +420 -0
- niwrap_mrtrix/mrtrix/tsfthreshold.py +428 -0
- niwrap_mrtrix/mrtrix/tsfvalidate.py +398 -0
- niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +432 -0
- niwrap_mrtrix/mrtrix/v_5tt2vis.py +505 -0
- niwrap_mrtrix/mrtrix/v_5ttcheck.py +409 -0
- niwrap_mrtrix/mrtrix/v_5ttedit.py +513 -0
- niwrap_mrtrix/mrtrix/v_5ttgen.py +1107 -0
- niwrap_mrtrix/mrtrix/vectorstats.py +736 -0
- niwrap_mrtrix/mrtrix/voxel2fixel.py +430 -0
- niwrap_mrtrix/mrtrix/voxel2mesh.py +454 -0
- niwrap_mrtrix/mrtrix/warp2metric.py +556 -0
- niwrap_mrtrix/mrtrix/warpconvert.py +498 -0
- niwrap_mrtrix/mrtrix/warpcorrect.py +448 -0
- niwrap_mrtrix/mrtrix/warpinit.py +425 -0
- niwrap_mrtrix/mrtrix/warpinvert.py +448 -0
- niwrap_mrtrix-0.8.0.dist-info/METADATA +8 -0
- niwrap_mrtrix-0.8.0.dist-info/RECORD +119 -0
- niwrap_mrtrix-0.8.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,428 @@
|
|
|
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
|
+
TSFTHRESHOLD_METADATA = Metadata(
|
|
9
|
+
id="220d3f902e017234312aae91150846c6019a24c8.boutiques",
|
|
10
|
+
name="tsfthreshold",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
_TsfthresholdConfigParamsDictNoTag = typing.TypedDict('_TsfthresholdConfigParamsDictNoTag', {
|
|
17
|
+
"key": str,
|
|
18
|
+
"value": str,
|
|
19
|
+
})
|
|
20
|
+
TsfthresholdConfigParamsDictTagged = typing.TypedDict('TsfthresholdConfigParamsDictTagged', {
|
|
21
|
+
"@type": typing.Literal["config"],
|
|
22
|
+
"key": str,
|
|
23
|
+
"value": str,
|
|
24
|
+
})
|
|
25
|
+
TsfthresholdConfigParamsDict = _TsfthresholdConfigParamsDictNoTag | TsfthresholdConfigParamsDictTagged
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
_TsfthresholdParamsDictNoTag = typing.TypedDict('_TsfthresholdParamsDictNoTag', {
|
|
29
|
+
"invert": bool,
|
|
30
|
+
"info": bool,
|
|
31
|
+
"quiet": bool,
|
|
32
|
+
"debug": bool,
|
|
33
|
+
"force": bool,
|
|
34
|
+
"nthreads": typing.NotRequired[int | None],
|
|
35
|
+
"config": typing.NotRequired[list[TsfthresholdConfigParamsDict] | None],
|
|
36
|
+
"help": bool,
|
|
37
|
+
"version": bool,
|
|
38
|
+
"input": InputPathType,
|
|
39
|
+
"T": float,
|
|
40
|
+
"output": str,
|
|
41
|
+
})
|
|
42
|
+
TsfthresholdParamsDictTagged = typing.TypedDict('TsfthresholdParamsDictTagged', {
|
|
43
|
+
"@type": typing.Literal["mrtrix/tsfthreshold"],
|
|
44
|
+
"invert": bool,
|
|
45
|
+
"info": bool,
|
|
46
|
+
"quiet": bool,
|
|
47
|
+
"debug": bool,
|
|
48
|
+
"force": bool,
|
|
49
|
+
"nthreads": typing.NotRequired[int | None],
|
|
50
|
+
"config": typing.NotRequired[list[TsfthresholdConfigParamsDict] | None],
|
|
51
|
+
"help": bool,
|
|
52
|
+
"version": bool,
|
|
53
|
+
"input": InputPathType,
|
|
54
|
+
"T": float,
|
|
55
|
+
"output": str,
|
|
56
|
+
})
|
|
57
|
+
TsfthresholdParamsDict = _TsfthresholdParamsDictNoTag | TsfthresholdParamsDictTagged
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def tsfthreshold_config(
|
|
61
|
+
key: str,
|
|
62
|
+
value: str,
|
|
63
|
+
) -> TsfthresholdConfigParamsDictTagged:
|
|
64
|
+
"""
|
|
65
|
+
Build parameters.
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
69
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
70
|
+
Returns:
|
|
71
|
+
Parameter dictionary
|
|
72
|
+
"""
|
|
73
|
+
params = {
|
|
74
|
+
"@type": "config",
|
|
75
|
+
"key": key,
|
|
76
|
+
"value": value,
|
|
77
|
+
}
|
|
78
|
+
return params
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def tsfthreshold_config_validate(
|
|
82
|
+
params: typing.Any,
|
|
83
|
+
) -> None:
|
|
84
|
+
"""
|
|
85
|
+
Validate parameters. Throws an error if `params` is not a valid
|
|
86
|
+
`TsfthresholdConfigParamsDict` object.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
params: The parameters object to validate.
|
|
90
|
+
"""
|
|
91
|
+
if params is None or not isinstance(params, dict):
|
|
92
|
+
raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
|
|
93
|
+
if params.get("key", None) is None:
|
|
94
|
+
raise StyxValidationError("`key` must not be None")
|
|
95
|
+
if not isinstance(params["key"], str):
|
|
96
|
+
raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
|
|
97
|
+
if params.get("value", None) is None:
|
|
98
|
+
raise StyxValidationError("`value` must not be None")
|
|
99
|
+
if not isinstance(params["value"], str):
|
|
100
|
+
raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def tsfthreshold_config_cargs(
|
|
104
|
+
params: TsfthresholdConfigParamsDict,
|
|
105
|
+
execution: Execution,
|
|
106
|
+
) -> list[str]:
|
|
107
|
+
"""
|
|
108
|
+
Build command-line arguments from parameters.
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
params: The parameters.
|
|
112
|
+
execution: The execution object for resolving input paths.
|
|
113
|
+
Returns:
|
|
114
|
+
Command-line arguments.
|
|
115
|
+
"""
|
|
116
|
+
cargs = []
|
|
117
|
+
cargs.append("-config")
|
|
118
|
+
cargs.append(params.get("key", None))
|
|
119
|
+
cargs.append(params.get("value", None))
|
|
120
|
+
return cargs
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class TsfthresholdOutputs(typing.NamedTuple):
|
|
124
|
+
"""
|
|
125
|
+
Output object returned when calling `TsfthresholdParamsDict(...)`.
|
|
126
|
+
"""
|
|
127
|
+
root: OutputPathType
|
|
128
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
129
|
+
output: OutputPathType
|
|
130
|
+
"""the binary output track scalar file"""
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def tsfthreshold_params(
|
|
134
|
+
input_: InputPathType,
|
|
135
|
+
t: float,
|
|
136
|
+
output: str,
|
|
137
|
+
invert: bool = False,
|
|
138
|
+
info: bool = False,
|
|
139
|
+
quiet: bool = False,
|
|
140
|
+
debug: bool = False,
|
|
141
|
+
force: bool = False,
|
|
142
|
+
nthreads: int | None = None,
|
|
143
|
+
config: list[TsfthresholdConfigParamsDict] | None = None,
|
|
144
|
+
help_: bool = False,
|
|
145
|
+
version: bool = False,
|
|
146
|
+
) -> TsfthresholdParamsDictTagged:
|
|
147
|
+
"""
|
|
148
|
+
Build parameters.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
input_: the input track scalar file.
|
|
152
|
+
t: the desired threshold.
|
|
153
|
+
output: the binary output track scalar file.
|
|
154
|
+
invert: invert the output mask.
|
|
155
|
+
info: display information messages.
|
|
156
|
+
quiet: do not display information messages or progress status;\
|
|
157
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
158
|
+
environment variable to a non-empty string.
|
|
159
|
+
debug: display debugging messages.
|
|
160
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
161
|
+
input and output might cause unexpected behaviour).
|
|
162
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
163
|
+
(set to 0 to disable multi-threading).
|
|
164
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
165
|
+
help_: display this information page and exit.
|
|
166
|
+
version: display version information and exit.
|
|
167
|
+
Returns:
|
|
168
|
+
Parameter dictionary
|
|
169
|
+
"""
|
|
170
|
+
params = {
|
|
171
|
+
"@type": "mrtrix/tsfthreshold",
|
|
172
|
+
"invert": invert,
|
|
173
|
+
"info": info,
|
|
174
|
+
"quiet": quiet,
|
|
175
|
+
"debug": debug,
|
|
176
|
+
"force": force,
|
|
177
|
+
"help": help_,
|
|
178
|
+
"version": version,
|
|
179
|
+
"input": input_,
|
|
180
|
+
"T": t,
|
|
181
|
+
"output": output,
|
|
182
|
+
}
|
|
183
|
+
if nthreads is not None:
|
|
184
|
+
params["nthreads"] = nthreads
|
|
185
|
+
if config is not None:
|
|
186
|
+
params["config"] = config
|
|
187
|
+
return params
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def tsfthreshold_validate(
|
|
191
|
+
params: typing.Any,
|
|
192
|
+
) -> None:
|
|
193
|
+
"""
|
|
194
|
+
Validate parameters. Throws an error if `params` is not a valid
|
|
195
|
+
`TsfthresholdParamsDict` object.
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
params: The parameters object to validate.
|
|
199
|
+
"""
|
|
200
|
+
if params is None or not isinstance(params, dict):
|
|
201
|
+
raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
|
|
202
|
+
if params.get("invert", False) is None:
|
|
203
|
+
raise StyxValidationError("`invert` must not be None")
|
|
204
|
+
if not isinstance(params["invert"], bool):
|
|
205
|
+
raise StyxValidationError(f'`invert` has the wrong type: Received `{type(params.get("invert", False))}` expected `bool`')
|
|
206
|
+
if params.get("info", False) is None:
|
|
207
|
+
raise StyxValidationError("`info` must not be None")
|
|
208
|
+
if not isinstance(params["info"], bool):
|
|
209
|
+
raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
|
|
210
|
+
if params.get("quiet", False) is None:
|
|
211
|
+
raise StyxValidationError("`quiet` must not be None")
|
|
212
|
+
if not isinstance(params["quiet"], bool):
|
|
213
|
+
raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
|
|
214
|
+
if params.get("debug", False) is None:
|
|
215
|
+
raise StyxValidationError("`debug` must not be None")
|
|
216
|
+
if not isinstance(params["debug"], bool):
|
|
217
|
+
raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
|
|
218
|
+
if params.get("force", False) is None:
|
|
219
|
+
raise StyxValidationError("`force` must not be None")
|
|
220
|
+
if not isinstance(params["force"], bool):
|
|
221
|
+
raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
|
|
222
|
+
if params.get("nthreads", None) is not None:
|
|
223
|
+
if not isinstance(params["nthreads"], int):
|
|
224
|
+
raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
|
|
225
|
+
if params.get("config", None) is not None:
|
|
226
|
+
if not isinstance(params["config"], list):
|
|
227
|
+
raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[TsfthresholdConfigParamsDict] | None`')
|
|
228
|
+
for e in params["config"]:
|
|
229
|
+
tsfthreshold_config_validate(e)
|
|
230
|
+
if params.get("help", False) is None:
|
|
231
|
+
raise StyxValidationError("`help` must not be None")
|
|
232
|
+
if not isinstance(params["help"], bool):
|
|
233
|
+
raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
|
|
234
|
+
if params.get("version", False) is None:
|
|
235
|
+
raise StyxValidationError("`version` must not be None")
|
|
236
|
+
if not isinstance(params["version"], bool):
|
|
237
|
+
raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
|
|
238
|
+
if params.get("input", None) is None:
|
|
239
|
+
raise StyxValidationError("`input` must not be None")
|
|
240
|
+
if not isinstance(params["input"], (pathlib.Path, str)):
|
|
241
|
+
raise StyxValidationError(f'`input` has the wrong type: Received `{type(params.get("input", None))}` expected `InputPathType`')
|
|
242
|
+
if params.get("T", None) is None:
|
|
243
|
+
raise StyxValidationError("`T` must not be None")
|
|
244
|
+
if not isinstance(params["T"], (float, int)):
|
|
245
|
+
raise StyxValidationError(f'`T` has the wrong type: Received `{type(params.get("T", None))}` expected `float`')
|
|
246
|
+
if params.get("output", None) is None:
|
|
247
|
+
raise StyxValidationError("`output` must not be None")
|
|
248
|
+
if not isinstance(params["output"], str):
|
|
249
|
+
raise StyxValidationError(f'`output` has the wrong type: Received `{type(params.get("output", None))}` expected `str`')
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def tsfthreshold_cargs(
|
|
253
|
+
params: TsfthresholdParamsDict,
|
|
254
|
+
execution: Execution,
|
|
255
|
+
) -> list[str]:
|
|
256
|
+
"""
|
|
257
|
+
Build command-line arguments from parameters.
|
|
258
|
+
|
|
259
|
+
Args:
|
|
260
|
+
params: The parameters.
|
|
261
|
+
execution: The execution object for resolving input paths.
|
|
262
|
+
Returns:
|
|
263
|
+
Command-line arguments.
|
|
264
|
+
"""
|
|
265
|
+
cargs = []
|
|
266
|
+
cargs.append("tsfthreshold")
|
|
267
|
+
if params.get("invert", False):
|
|
268
|
+
cargs.append("-invert")
|
|
269
|
+
if params.get("info", False):
|
|
270
|
+
cargs.append("-info")
|
|
271
|
+
if params.get("quiet", False):
|
|
272
|
+
cargs.append("-quiet")
|
|
273
|
+
if params.get("debug", False):
|
|
274
|
+
cargs.append("-debug")
|
|
275
|
+
if params.get("force", False):
|
|
276
|
+
cargs.append("-force")
|
|
277
|
+
if params.get("nthreads", None) is not None:
|
|
278
|
+
cargs.extend([
|
|
279
|
+
"-nthreads",
|
|
280
|
+
str(params.get("nthreads", None))
|
|
281
|
+
])
|
|
282
|
+
if params.get("config", None) is not None:
|
|
283
|
+
cargs.extend([a for c in [tsfthreshold_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
284
|
+
if params.get("help", False):
|
|
285
|
+
cargs.append("-help")
|
|
286
|
+
if params.get("version", False):
|
|
287
|
+
cargs.append("-version")
|
|
288
|
+
cargs.append(execution.input_file(params.get("input", None)))
|
|
289
|
+
cargs.append(str(params.get("T", None)))
|
|
290
|
+
cargs.append(params.get("output", None))
|
|
291
|
+
return cargs
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def tsfthreshold_outputs(
|
|
295
|
+
params: TsfthresholdParamsDict,
|
|
296
|
+
execution: Execution,
|
|
297
|
+
) -> TsfthresholdOutputs:
|
|
298
|
+
"""
|
|
299
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
300
|
+
|
|
301
|
+
Args:
|
|
302
|
+
params: The parameters.
|
|
303
|
+
execution: The execution object for resolving input paths.
|
|
304
|
+
Returns:
|
|
305
|
+
Outputs object.
|
|
306
|
+
"""
|
|
307
|
+
ret = TsfthresholdOutputs(
|
|
308
|
+
root=execution.output_file("."),
|
|
309
|
+
output=execution.output_file(params.get("output", None)),
|
|
310
|
+
)
|
|
311
|
+
return ret
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
def tsfthreshold_execute(
|
|
315
|
+
params: TsfthresholdParamsDict,
|
|
316
|
+
runner: Runner | None = None,
|
|
317
|
+
) -> TsfthresholdOutputs:
|
|
318
|
+
"""
|
|
319
|
+
tsfthreshold
|
|
320
|
+
|
|
321
|
+
Threshold and invert track scalar files.
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
References:
|
|
326
|
+
|
|
327
|
+
.
|
|
328
|
+
|
|
329
|
+
Author: MRTrix3 Developers
|
|
330
|
+
|
|
331
|
+
URL: https://www.mrtrix.org/
|
|
332
|
+
|
|
333
|
+
Args:
|
|
334
|
+
params: The parameters.
|
|
335
|
+
runner: Command runner.
|
|
336
|
+
Returns:
|
|
337
|
+
NamedTuple of outputs (described in `TsfthresholdOutputs`).
|
|
338
|
+
"""
|
|
339
|
+
tsfthreshold_validate(params)
|
|
340
|
+
runner = runner or get_global_runner()
|
|
341
|
+
execution = runner.start_execution(TSFTHRESHOLD_METADATA)
|
|
342
|
+
params = execution.params(params)
|
|
343
|
+
cargs = tsfthreshold_cargs(params, execution)
|
|
344
|
+
ret = tsfthreshold_outputs(params, execution)
|
|
345
|
+
execution.run(cargs)
|
|
346
|
+
return ret
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
def tsfthreshold(
|
|
350
|
+
input_: InputPathType,
|
|
351
|
+
t: float,
|
|
352
|
+
output: str,
|
|
353
|
+
invert: bool = False,
|
|
354
|
+
info: bool = False,
|
|
355
|
+
quiet: bool = False,
|
|
356
|
+
debug: bool = False,
|
|
357
|
+
force: bool = False,
|
|
358
|
+
nthreads: int | None = None,
|
|
359
|
+
config: list[TsfthresholdConfigParamsDict] | None = None,
|
|
360
|
+
help_: bool = False,
|
|
361
|
+
version: bool = False,
|
|
362
|
+
runner: Runner | None = None,
|
|
363
|
+
) -> TsfthresholdOutputs:
|
|
364
|
+
"""
|
|
365
|
+
tsfthreshold
|
|
366
|
+
|
|
367
|
+
Threshold and invert track scalar files.
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
References:
|
|
372
|
+
|
|
373
|
+
.
|
|
374
|
+
|
|
375
|
+
Author: MRTrix3 Developers
|
|
376
|
+
|
|
377
|
+
URL: https://www.mrtrix.org/
|
|
378
|
+
|
|
379
|
+
Args:
|
|
380
|
+
input_: the input track scalar file.
|
|
381
|
+
t: the desired threshold.
|
|
382
|
+
output: the binary output track scalar file.
|
|
383
|
+
invert: invert the output mask.
|
|
384
|
+
info: display information messages.
|
|
385
|
+
quiet: do not display information messages or progress status;\
|
|
386
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
387
|
+
environment variable to a non-empty string.
|
|
388
|
+
debug: display debugging messages.
|
|
389
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
390
|
+
input and output might cause unexpected behaviour).
|
|
391
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
392
|
+
(set to 0 to disable multi-threading).
|
|
393
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
394
|
+
help_: display this information page and exit.
|
|
395
|
+
version: display version information and exit.
|
|
396
|
+
runner: Command runner.
|
|
397
|
+
Returns:
|
|
398
|
+
NamedTuple of outputs (described in `TsfthresholdOutputs`).
|
|
399
|
+
"""
|
|
400
|
+
params = tsfthreshold_params(
|
|
401
|
+
invert=invert,
|
|
402
|
+
info=info,
|
|
403
|
+
quiet=quiet,
|
|
404
|
+
debug=debug,
|
|
405
|
+
force=force,
|
|
406
|
+
nthreads=nthreads,
|
|
407
|
+
config=config,
|
|
408
|
+
help_=help_,
|
|
409
|
+
version=version,
|
|
410
|
+
input_=input_,
|
|
411
|
+
t=t,
|
|
412
|
+
output=output,
|
|
413
|
+
)
|
|
414
|
+
return tsfthreshold_execute(params, runner)
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
__all__ = [
|
|
418
|
+
"TSFTHRESHOLD_METADATA",
|
|
419
|
+
"TsfthresholdConfigParamsDict",
|
|
420
|
+
"TsfthresholdConfigParamsDictTagged",
|
|
421
|
+
"TsfthresholdOutputs",
|
|
422
|
+
"TsfthresholdParamsDict",
|
|
423
|
+
"TsfthresholdParamsDictTagged",
|
|
424
|
+
"tsfthreshold",
|
|
425
|
+
"tsfthreshold_config",
|
|
426
|
+
"tsfthreshold_execute",
|
|
427
|
+
"tsfthreshold_params",
|
|
428
|
+
]
|