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,414 @@
|
|
|
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
|
+
TSFDIVIDE_METADATA = Metadata(
|
|
9
|
+
id="6ee933964de2557d8a0e6e587b41c3c00d890366.boutiques",
|
|
10
|
+
name="tsfdivide",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
_TsfdivideConfigParamsDictNoTag = typing.TypedDict('_TsfdivideConfigParamsDictNoTag', {
|
|
17
|
+
"key": str,
|
|
18
|
+
"value": str,
|
|
19
|
+
})
|
|
20
|
+
TsfdivideConfigParamsDictTagged = typing.TypedDict('TsfdivideConfigParamsDictTagged', {
|
|
21
|
+
"@type": typing.Literal["config"],
|
|
22
|
+
"key": str,
|
|
23
|
+
"value": str,
|
|
24
|
+
})
|
|
25
|
+
TsfdivideConfigParamsDict = _TsfdivideConfigParamsDictNoTag | TsfdivideConfigParamsDictTagged
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
_TsfdivideParamsDictNoTag = typing.TypedDict('_TsfdivideParamsDictNoTag', {
|
|
29
|
+
"info": bool,
|
|
30
|
+
"quiet": bool,
|
|
31
|
+
"debug": bool,
|
|
32
|
+
"force": bool,
|
|
33
|
+
"nthreads": typing.NotRequired[int | None],
|
|
34
|
+
"config": typing.NotRequired[list[TsfdivideConfigParamsDict] | None],
|
|
35
|
+
"help": bool,
|
|
36
|
+
"version": bool,
|
|
37
|
+
"input1": InputPathType,
|
|
38
|
+
"input2": InputPathType,
|
|
39
|
+
"output": str,
|
|
40
|
+
})
|
|
41
|
+
TsfdivideParamsDictTagged = typing.TypedDict('TsfdivideParamsDictTagged', {
|
|
42
|
+
"@type": typing.Literal["mrtrix/tsfdivide"],
|
|
43
|
+
"info": bool,
|
|
44
|
+
"quiet": bool,
|
|
45
|
+
"debug": bool,
|
|
46
|
+
"force": bool,
|
|
47
|
+
"nthreads": typing.NotRequired[int | None],
|
|
48
|
+
"config": typing.NotRequired[list[TsfdivideConfigParamsDict] | None],
|
|
49
|
+
"help": bool,
|
|
50
|
+
"version": bool,
|
|
51
|
+
"input1": InputPathType,
|
|
52
|
+
"input2": InputPathType,
|
|
53
|
+
"output": str,
|
|
54
|
+
})
|
|
55
|
+
TsfdivideParamsDict = _TsfdivideParamsDictNoTag | TsfdivideParamsDictTagged
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def tsfdivide_config(
|
|
59
|
+
key: str,
|
|
60
|
+
value: str,
|
|
61
|
+
) -> TsfdivideConfigParamsDictTagged:
|
|
62
|
+
"""
|
|
63
|
+
Build parameters.
|
|
64
|
+
|
|
65
|
+
Args:
|
|
66
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
67
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
68
|
+
Returns:
|
|
69
|
+
Parameter dictionary
|
|
70
|
+
"""
|
|
71
|
+
params = {
|
|
72
|
+
"@type": "config",
|
|
73
|
+
"key": key,
|
|
74
|
+
"value": value,
|
|
75
|
+
}
|
|
76
|
+
return params
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def tsfdivide_config_validate(
|
|
80
|
+
params: typing.Any,
|
|
81
|
+
) -> None:
|
|
82
|
+
"""
|
|
83
|
+
Validate parameters. Throws an error if `params` is not a valid
|
|
84
|
+
`TsfdivideConfigParamsDict` object.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
params: The parameters object to validate.
|
|
88
|
+
"""
|
|
89
|
+
if params is None or not isinstance(params, dict):
|
|
90
|
+
raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
|
|
91
|
+
if params.get("key", None) is None:
|
|
92
|
+
raise StyxValidationError("`key` must not be None")
|
|
93
|
+
if not isinstance(params["key"], str):
|
|
94
|
+
raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
|
|
95
|
+
if params.get("value", None) is None:
|
|
96
|
+
raise StyxValidationError("`value` must not be None")
|
|
97
|
+
if not isinstance(params["value"], str):
|
|
98
|
+
raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def tsfdivide_config_cargs(
|
|
102
|
+
params: TsfdivideConfigParamsDict,
|
|
103
|
+
execution: Execution,
|
|
104
|
+
) -> list[str]:
|
|
105
|
+
"""
|
|
106
|
+
Build command-line arguments from parameters.
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
params: The parameters.
|
|
110
|
+
execution: The execution object for resolving input paths.
|
|
111
|
+
Returns:
|
|
112
|
+
Command-line arguments.
|
|
113
|
+
"""
|
|
114
|
+
cargs = []
|
|
115
|
+
cargs.append("-config")
|
|
116
|
+
cargs.append(params.get("key", None))
|
|
117
|
+
cargs.append(params.get("value", None))
|
|
118
|
+
return cargs
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class TsfdivideOutputs(typing.NamedTuple):
|
|
122
|
+
"""
|
|
123
|
+
Output object returned when calling `TsfdivideParamsDict(...)`.
|
|
124
|
+
"""
|
|
125
|
+
root: OutputPathType
|
|
126
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
127
|
+
output: OutputPathType
|
|
128
|
+
"""the output track scalar file"""
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def tsfdivide_params(
|
|
132
|
+
input1: InputPathType,
|
|
133
|
+
input2: InputPathType,
|
|
134
|
+
output: str,
|
|
135
|
+
info: bool = False,
|
|
136
|
+
quiet: bool = False,
|
|
137
|
+
debug: bool = False,
|
|
138
|
+
force: bool = False,
|
|
139
|
+
nthreads: int | None = None,
|
|
140
|
+
config: list[TsfdivideConfigParamsDict] | None = None,
|
|
141
|
+
help_: bool = False,
|
|
142
|
+
version: bool = False,
|
|
143
|
+
) -> TsfdivideParamsDictTagged:
|
|
144
|
+
"""
|
|
145
|
+
Build parameters.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
input1: the first input track scalar file.
|
|
149
|
+
input2: the second input track scalar file.
|
|
150
|
+
output: the output track scalar file.
|
|
151
|
+
info: display information messages.
|
|
152
|
+
quiet: do not display information messages or progress status;\
|
|
153
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
154
|
+
environment variable to a non-empty string.
|
|
155
|
+
debug: display debugging messages.
|
|
156
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
157
|
+
input and output might cause unexpected behaviour).
|
|
158
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
159
|
+
(set to 0 to disable multi-threading).
|
|
160
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
161
|
+
help_: display this information page and exit.
|
|
162
|
+
version: display version information and exit.
|
|
163
|
+
Returns:
|
|
164
|
+
Parameter dictionary
|
|
165
|
+
"""
|
|
166
|
+
params = {
|
|
167
|
+
"@type": "mrtrix/tsfdivide",
|
|
168
|
+
"info": info,
|
|
169
|
+
"quiet": quiet,
|
|
170
|
+
"debug": debug,
|
|
171
|
+
"force": force,
|
|
172
|
+
"help": help_,
|
|
173
|
+
"version": version,
|
|
174
|
+
"input1": input1,
|
|
175
|
+
"input2": input2,
|
|
176
|
+
"output": output,
|
|
177
|
+
}
|
|
178
|
+
if nthreads is not None:
|
|
179
|
+
params["nthreads"] = nthreads
|
|
180
|
+
if config is not None:
|
|
181
|
+
params["config"] = config
|
|
182
|
+
return params
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def tsfdivide_validate(
|
|
186
|
+
params: typing.Any,
|
|
187
|
+
) -> None:
|
|
188
|
+
"""
|
|
189
|
+
Validate parameters. Throws an error if `params` is not a valid
|
|
190
|
+
`TsfdivideParamsDict` object.
|
|
191
|
+
|
|
192
|
+
Args:
|
|
193
|
+
params: The parameters object to validate.
|
|
194
|
+
"""
|
|
195
|
+
if params is None or not isinstance(params, dict):
|
|
196
|
+
raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
|
|
197
|
+
if params.get("info", False) is None:
|
|
198
|
+
raise StyxValidationError("`info` must not be None")
|
|
199
|
+
if not isinstance(params["info"], bool):
|
|
200
|
+
raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
|
|
201
|
+
if params.get("quiet", False) is None:
|
|
202
|
+
raise StyxValidationError("`quiet` must not be None")
|
|
203
|
+
if not isinstance(params["quiet"], bool):
|
|
204
|
+
raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
|
|
205
|
+
if params.get("debug", False) is None:
|
|
206
|
+
raise StyxValidationError("`debug` must not be None")
|
|
207
|
+
if not isinstance(params["debug"], bool):
|
|
208
|
+
raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
|
|
209
|
+
if params.get("force", False) is None:
|
|
210
|
+
raise StyxValidationError("`force` must not be None")
|
|
211
|
+
if not isinstance(params["force"], bool):
|
|
212
|
+
raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
|
|
213
|
+
if params.get("nthreads", None) is not None:
|
|
214
|
+
if not isinstance(params["nthreads"], int):
|
|
215
|
+
raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
|
|
216
|
+
if params.get("config", None) is not None:
|
|
217
|
+
if not isinstance(params["config"], list):
|
|
218
|
+
raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[TsfdivideConfigParamsDict] | None`')
|
|
219
|
+
for e in params["config"]:
|
|
220
|
+
tsfdivide_config_validate(e)
|
|
221
|
+
if params.get("help", False) is None:
|
|
222
|
+
raise StyxValidationError("`help` must not be None")
|
|
223
|
+
if not isinstance(params["help"], bool):
|
|
224
|
+
raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
|
|
225
|
+
if params.get("version", False) is None:
|
|
226
|
+
raise StyxValidationError("`version` must not be None")
|
|
227
|
+
if not isinstance(params["version"], bool):
|
|
228
|
+
raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
|
|
229
|
+
if params.get("input1", None) is None:
|
|
230
|
+
raise StyxValidationError("`input1` must not be None")
|
|
231
|
+
if not isinstance(params["input1"], (pathlib.Path, str)):
|
|
232
|
+
raise StyxValidationError(f'`input1` has the wrong type: Received `{type(params.get("input1", None))}` expected `InputPathType`')
|
|
233
|
+
if params.get("input2", None) is None:
|
|
234
|
+
raise StyxValidationError("`input2` must not be None")
|
|
235
|
+
if not isinstance(params["input2"], (pathlib.Path, str)):
|
|
236
|
+
raise StyxValidationError(f'`input2` has the wrong type: Received `{type(params.get("input2", None))}` expected `InputPathType`')
|
|
237
|
+
if params.get("output", None) is None:
|
|
238
|
+
raise StyxValidationError("`output` must not be None")
|
|
239
|
+
if not isinstance(params["output"], str):
|
|
240
|
+
raise StyxValidationError(f'`output` has the wrong type: Received `{type(params.get("output", None))}` expected `str`')
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def tsfdivide_cargs(
|
|
244
|
+
params: TsfdivideParamsDict,
|
|
245
|
+
execution: Execution,
|
|
246
|
+
) -> list[str]:
|
|
247
|
+
"""
|
|
248
|
+
Build command-line arguments from parameters.
|
|
249
|
+
|
|
250
|
+
Args:
|
|
251
|
+
params: The parameters.
|
|
252
|
+
execution: The execution object for resolving input paths.
|
|
253
|
+
Returns:
|
|
254
|
+
Command-line arguments.
|
|
255
|
+
"""
|
|
256
|
+
cargs = []
|
|
257
|
+
cargs.append("tsfdivide")
|
|
258
|
+
if params.get("info", False):
|
|
259
|
+
cargs.append("-info")
|
|
260
|
+
if params.get("quiet", False):
|
|
261
|
+
cargs.append("-quiet")
|
|
262
|
+
if params.get("debug", False):
|
|
263
|
+
cargs.append("-debug")
|
|
264
|
+
if params.get("force", False):
|
|
265
|
+
cargs.append("-force")
|
|
266
|
+
if params.get("nthreads", None) is not None:
|
|
267
|
+
cargs.extend([
|
|
268
|
+
"-nthreads",
|
|
269
|
+
str(params.get("nthreads", None))
|
|
270
|
+
])
|
|
271
|
+
if params.get("config", None) is not None:
|
|
272
|
+
cargs.extend([a for c in [tsfdivide_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
273
|
+
if params.get("help", False):
|
|
274
|
+
cargs.append("-help")
|
|
275
|
+
if params.get("version", False):
|
|
276
|
+
cargs.append("-version")
|
|
277
|
+
cargs.append(execution.input_file(params.get("input1", None)))
|
|
278
|
+
cargs.append(execution.input_file(params.get("input2", None)))
|
|
279
|
+
cargs.append(params.get("output", None))
|
|
280
|
+
return cargs
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def tsfdivide_outputs(
|
|
284
|
+
params: TsfdivideParamsDict,
|
|
285
|
+
execution: Execution,
|
|
286
|
+
) -> TsfdivideOutputs:
|
|
287
|
+
"""
|
|
288
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
289
|
+
|
|
290
|
+
Args:
|
|
291
|
+
params: The parameters.
|
|
292
|
+
execution: The execution object for resolving input paths.
|
|
293
|
+
Returns:
|
|
294
|
+
Outputs object.
|
|
295
|
+
"""
|
|
296
|
+
ret = TsfdivideOutputs(
|
|
297
|
+
root=execution.output_file("."),
|
|
298
|
+
output=execution.output_file(params.get("output", None)),
|
|
299
|
+
)
|
|
300
|
+
return ret
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
def tsfdivide_execute(
|
|
304
|
+
params: TsfdivideParamsDict,
|
|
305
|
+
runner: Runner | None = None,
|
|
306
|
+
) -> TsfdivideOutputs:
|
|
307
|
+
"""
|
|
308
|
+
tsfdivide
|
|
309
|
+
|
|
310
|
+
Divide corresponding values in track scalar files.
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
References:
|
|
315
|
+
|
|
316
|
+
.
|
|
317
|
+
|
|
318
|
+
Author: MRTrix3 Developers
|
|
319
|
+
|
|
320
|
+
URL: https://www.mrtrix.org/
|
|
321
|
+
|
|
322
|
+
Args:
|
|
323
|
+
params: The parameters.
|
|
324
|
+
runner: Command runner.
|
|
325
|
+
Returns:
|
|
326
|
+
NamedTuple of outputs (described in `TsfdivideOutputs`).
|
|
327
|
+
"""
|
|
328
|
+
tsfdivide_validate(params)
|
|
329
|
+
runner = runner or get_global_runner()
|
|
330
|
+
execution = runner.start_execution(TSFDIVIDE_METADATA)
|
|
331
|
+
params = execution.params(params)
|
|
332
|
+
cargs = tsfdivide_cargs(params, execution)
|
|
333
|
+
ret = tsfdivide_outputs(params, execution)
|
|
334
|
+
execution.run(cargs)
|
|
335
|
+
return ret
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
def tsfdivide(
|
|
339
|
+
input1: InputPathType,
|
|
340
|
+
input2: InputPathType,
|
|
341
|
+
output: str,
|
|
342
|
+
info: bool = False,
|
|
343
|
+
quiet: bool = False,
|
|
344
|
+
debug: bool = False,
|
|
345
|
+
force: bool = False,
|
|
346
|
+
nthreads: int | None = None,
|
|
347
|
+
config: list[TsfdivideConfigParamsDict] | None = None,
|
|
348
|
+
help_: bool = False,
|
|
349
|
+
version: bool = False,
|
|
350
|
+
runner: Runner | None = None,
|
|
351
|
+
) -> TsfdivideOutputs:
|
|
352
|
+
"""
|
|
353
|
+
tsfdivide
|
|
354
|
+
|
|
355
|
+
Divide corresponding values in track scalar files.
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
References:
|
|
360
|
+
|
|
361
|
+
.
|
|
362
|
+
|
|
363
|
+
Author: MRTrix3 Developers
|
|
364
|
+
|
|
365
|
+
URL: https://www.mrtrix.org/
|
|
366
|
+
|
|
367
|
+
Args:
|
|
368
|
+
input1: the first input track scalar file.
|
|
369
|
+
input2: the second input track scalar file.
|
|
370
|
+
output: the output track scalar file.
|
|
371
|
+
info: display information messages.
|
|
372
|
+
quiet: do not display information messages or progress status;\
|
|
373
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
374
|
+
environment variable to a non-empty string.
|
|
375
|
+
debug: display debugging messages.
|
|
376
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
377
|
+
input and output might cause unexpected behaviour).
|
|
378
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
379
|
+
(set to 0 to disable multi-threading).
|
|
380
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
381
|
+
help_: display this information page and exit.
|
|
382
|
+
version: display version information and exit.
|
|
383
|
+
runner: Command runner.
|
|
384
|
+
Returns:
|
|
385
|
+
NamedTuple of outputs (described in `TsfdivideOutputs`).
|
|
386
|
+
"""
|
|
387
|
+
params = tsfdivide_params(
|
|
388
|
+
info=info,
|
|
389
|
+
quiet=quiet,
|
|
390
|
+
debug=debug,
|
|
391
|
+
force=force,
|
|
392
|
+
nthreads=nthreads,
|
|
393
|
+
config=config,
|
|
394
|
+
help_=help_,
|
|
395
|
+
version=version,
|
|
396
|
+
input1=input1,
|
|
397
|
+
input2=input2,
|
|
398
|
+
output=output,
|
|
399
|
+
)
|
|
400
|
+
return tsfdivide_execute(params, runner)
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
__all__ = [
|
|
404
|
+
"TSFDIVIDE_METADATA",
|
|
405
|
+
"TsfdivideConfigParamsDict",
|
|
406
|
+
"TsfdivideConfigParamsDictTagged",
|
|
407
|
+
"TsfdivideOutputs",
|
|
408
|
+
"TsfdivideParamsDict",
|
|
409
|
+
"TsfdivideParamsDictTagged",
|
|
410
|
+
"tsfdivide",
|
|
411
|
+
"tsfdivide_config",
|
|
412
|
+
"tsfdivide_execute",
|
|
413
|
+
"tsfdivide_params",
|
|
414
|
+
]
|