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,328 @@
|
|
|
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
|
+
TSFVALIDATE_METADATA = Metadata(
|
|
9
|
+
id="9cbd2feb99692133f28747c96ab73eb720860a6a.boutiques",
|
|
10
|
+
name="tsfvalidate",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
TsfvalidateConfigParameters = typing.TypedDict('TsfvalidateConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
TsfvalidateParameters = typing.TypedDict('TsfvalidateParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["tsfvalidate"],
|
|
25
|
+
"info": bool,
|
|
26
|
+
"quiet": bool,
|
|
27
|
+
"debug": bool,
|
|
28
|
+
"force": bool,
|
|
29
|
+
"nthreads": typing.NotRequired[int | None],
|
|
30
|
+
"config": typing.NotRequired[list[TsfvalidateConfigParameters] | None],
|
|
31
|
+
"help": bool,
|
|
32
|
+
"version": bool,
|
|
33
|
+
"tsf": InputPathType,
|
|
34
|
+
"tracks": InputPathType,
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def dyn_cargs(
|
|
39
|
+
t: str,
|
|
40
|
+
) -> typing.Any:
|
|
41
|
+
"""
|
|
42
|
+
Get build cargs function by command type.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
t: Command type.
|
|
46
|
+
Returns:
|
|
47
|
+
Build cargs function.
|
|
48
|
+
"""
|
|
49
|
+
return {
|
|
50
|
+
"tsfvalidate": tsfvalidate_cargs,
|
|
51
|
+
"config": tsfvalidate_config_cargs,
|
|
52
|
+
}.get(t)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def dyn_outputs(
|
|
56
|
+
t: str,
|
|
57
|
+
) -> typing.Any:
|
|
58
|
+
"""
|
|
59
|
+
Get build outputs function by command type.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
t: Command type.
|
|
63
|
+
Returns:
|
|
64
|
+
Build outputs function.
|
|
65
|
+
"""
|
|
66
|
+
return {
|
|
67
|
+
}.get(t)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def tsfvalidate_config_params(
|
|
71
|
+
key: str,
|
|
72
|
+
value: str,
|
|
73
|
+
) -> TsfvalidateConfigParameters:
|
|
74
|
+
"""
|
|
75
|
+
Build parameters.
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
79
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
80
|
+
Returns:
|
|
81
|
+
Parameter dictionary
|
|
82
|
+
"""
|
|
83
|
+
params = {
|
|
84
|
+
"__STYXTYPE__": "config",
|
|
85
|
+
"key": key,
|
|
86
|
+
"value": value,
|
|
87
|
+
}
|
|
88
|
+
return params
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def tsfvalidate_config_cargs(
|
|
92
|
+
params: TsfvalidateConfigParameters,
|
|
93
|
+
execution: Execution,
|
|
94
|
+
) -> list[str]:
|
|
95
|
+
"""
|
|
96
|
+
Build command-line arguments from parameters.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
params: The parameters.
|
|
100
|
+
execution: The execution object for resolving input paths.
|
|
101
|
+
Returns:
|
|
102
|
+
Command-line arguments.
|
|
103
|
+
"""
|
|
104
|
+
cargs = []
|
|
105
|
+
cargs.append("-config")
|
|
106
|
+
cargs.append(params.get("key"))
|
|
107
|
+
cargs.append(params.get("value"))
|
|
108
|
+
return cargs
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class TsfvalidateOutputs(typing.NamedTuple):
|
|
112
|
+
"""
|
|
113
|
+
Output object returned when calling `tsfvalidate(...)`.
|
|
114
|
+
"""
|
|
115
|
+
root: OutputPathType
|
|
116
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def tsfvalidate_params(
|
|
120
|
+
tsf: InputPathType,
|
|
121
|
+
tracks: InputPathType,
|
|
122
|
+
info: bool = False,
|
|
123
|
+
quiet: bool = False,
|
|
124
|
+
debug: bool = False,
|
|
125
|
+
force: bool = False,
|
|
126
|
+
nthreads: int | None = None,
|
|
127
|
+
config: list[TsfvalidateConfigParameters] | None = None,
|
|
128
|
+
help_: bool = False,
|
|
129
|
+
version: bool = False,
|
|
130
|
+
) -> TsfvalidateParameters:
|
|
131
|
+
"""
|
|
132
|
+
Build parameters.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
tsf: the input track scalar file.
|
|
136
|
+
tracks: the track file on which the TSF is based.
|
|
137
|
+
info: display information messages.
|
|
138
|
+
quiet: do not display information messages or progress status;\
|
|
139
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
140
|
+
environment variable to a non-empty string.
|
|
141
|
+
debug: display debugging messages.
|
|
142
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
143
|
+
input and output might cause unexpected behaviour).
|
|
144
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
145
|
+
(set to 0 to disable multi-threading).
|
|
146
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
147
|
+
help_: display this information page and exit.
|
|
148
|
+
version: display version information and exit.
|
|
149
|
+
Returns:
|
|
150
|
+
Parameter dictionary
|
|
151
|
+
"""
|
|
152
|
+
params = {
|
|
153
|
+
"__STYXTYPE__": "tsfvalidate",
|
|
154
|
+
"info": info,
|
|
155
|
+
"quiet": quiet,
|
|
156
|
+
"debug": debug,
|
|
157
|
+
"force": force,
|
|
158
|
+
"help": help_,
|
|
159
|
+
"version": version,
|
|
160
|
+
"tsf": tsf,
|
|
161
|
+
"tracks": tracks,
|
|
162
|
+
}
|
|
163
|
+
if nthreads is not None:
|
|
164
|
+
params["nthreads"] = nthreads
|
|
165
|
+
if config is not None:
|
|
166
|
+
params["config"] = config
|
|
167
|
+
return params
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def tsfvalidate_cargs(
|
|
171
|
+
params: TsfvalidateParameters,
|
|
172
|
+
execution: Execution,
|
|
173
|
+
) -> list[str]:
|
|
174
|
+
"""
|
|
175
|
+
Build command-line arguments from parameters.
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
params: The parameters.
|
|
179
|
+
execution: The execution object for resolving input paths.
|
|
180
|
+
Returns:
|
|
181
|
+
Command-line arguments.
|
|
182
|
+
"""
|
|
183
|
+
cargs = []
|
|
184
|
+
cargs.append("tsfvalidate")
|
|
185
|
+
if params.get("info"):
|
|
186
|
+
cargs.append("-info")
|
|
187
|
+
if params.get("quiet"):
|
|
188
|
+
cargs.append("-quiet")
|
|
189
|
+
if params.get("debug"):
|
|
190
|
+
cargs.append("-debug")
|
|
191
|
+
if params.get("force"):
|
|
192
|
+
cargs.append("-force")
|
|
193
|
+
if params.get("nthreads") is not None:
|
|
194
|
+
cargs.extend([
|
|
195
|
+
"-nthreads",
|
|
196
|
+
str(params.get("nthreads"))
|
|
197
|
+
])
|
|
198
|
+
if params.get("config") is not None:
|
|
199
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
200
|
+
if params.get("help"):
|
|
201
|
+
cargs.append("-help")
|
|
202
|
+
if params.get("version"):
|
|
203
|
+
cargs.append("-version")
|
|
204
|
+
cargs.append(execution.input_file(params.get("tsf")))
|
|
205
|
+
cargs.append(execution.input_file(params.get("tracks")))
|
|
206
|
+
return cargs
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def tsfvalidate_outputs(
|
|
210
|
+
params: TsfvalidateParameters,
|
|
211
|
+
execution: Execution,
|
|
212
|
+
) -> TsfvalidateOutputs:
|
|
213
|
+
"""
|
|
214
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
215
|
+
|
|
216
|
+
Args:
|
|
217
|
+
params: The parameters.
|
|
218
|
+
execution: The execution object for resolving input paths.
|
|
219
|
+
Returns:
|
|
220
|
+
Outputs object.
|
|
221
|
+
"""
|
|
222
|
+
ret = TsfvalidateOutputs(
|
|
223
|
+
root=execution.output_file("."),
|
|
224
|
+
)
|
|
225
|
+
return ret
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def tsfvalidate_execute(
|
|
229
|
+
params: TsfvalidateParameters,
|
|
230
|
+
execution: Execution,
|
|
231
|
+
) -> TsfvalidateOutputs:
|
|
232
|
+
"""
|
|
233
|
+
Validate a track scalar file against the corresponding track data.
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
References:
|
|
238
|
+
|
|
239
|
+
.
|
|
240
|
+
|
|
241
|
+
Author: MRTrix3 Developers
|
|
242
|
+
|
|
243
|
+
URL: https://www.mrtrix.org/
|
|
244
|
+
|
|
245
|
+
Args:
|
|
246
|
+
params: The parameters.
|
|
247
|
+
execution: The execution object.
|
|
248
|
+
Returns:
|
|
249
|
+
NamedTuple of outputs (described in `TsfvalidateOutputs`).
|
|
250
|
+
"""
|
|
251
|
+
params = execution.params(params)
|
|
252
|
+
cargs = tsfvalidate_cargs(params, execution)
|
|
253
|
+
ret = tsfvalidate_outputs(params, execution)
|
|
254
|
+
execution.run(cargs)
|
|
255
|
+
return ret
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def tsfvalidate(
|
|
259
|
+
tsf: InputPathType,
|
|
260
|
+
tracks: InputPathType,
|
|
261
|
+
info: bool = False,
|
|
262
|
+
quiet: bool = False,
|
|
263
|
+
debug: bool = False,
|
|
264
|
+
force: bool = False,
|
|
265
|
+
nthreads: int | None = None,
|
|
266
|
+
config: list[TsfvalidateConfigParameters] | None = None,
|
|
267
|
+
help_: bool = False,
|
|
268
|
+
version: bool = False,
|
|
269
|
+
runner: Runner | None = None,
|
|
270
|
+
) -> TsfvalidateOutputs:
|
|
271
|
+
"""
|
|
272
|
+
Validate a track scalar file against the corresponding track data.
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
References:
|
|
277
|
+
|
|
278
|
+
.
|
|
279
|
+
|
|
280
|
+
Author: MRTrix3 Developers
|
|
281
|
+
|
|
282
|
+
URL: https://www.mrtrix.org/
|
|
283
|
+
|
|
284
|
+
Args:
|
|
285
|
+
tsf: the input track scalar file.
|
|
286
|
+
tracks: the track file on which the TSF is based.
|
|
287
|
+
info: display information messages.
|
|
288
|
+
quiet: do not display information messages or progress status;\
|
|
289
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
290
|
+
environment variable to a non-empty string.
|
|
291
|
+
debug: display debugging messages.
|
|
292
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
293
|
+
input and output might cause unexpected behaviour).
|
|
294
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
295
|
+
(set to 0 to disable multi-threading).
|
|
296
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
297
|
+
help_: display this information page and exit.
|
|
298
|
+
version: display version information and exit.
|
|
299
|
+
runner: Command runner.
|
|
300
|
+
Returns:
|
|
301
|
+
NamedTuple of outputs (described in `TsfvalidateOutputs`).
|
|
302
|
+
"""
|
|
303
|
+
runner = runner or get_global_runner()
|
|
304
|
+
execution = runner.start_execution(TSFVALIDATE_METADATA)
|
|
305
|
+
params = tsfvalidate_params(
|
|
306
|
+
info=info,
|
|
307
|
+
quiet=quiet,
|
|
308
|
+
debug=debug,
|
|
309
|
+
force=force,
|
|
310
|
+
nthreads=nthreads,
|
|
311
|
+
config=config,
|
|
312
|
+
help_=help_,
|
|
313
|
+
version=version,
|
|
314
|
+
tsf=tsf,
|
|
315
|
+
tracks=tracks,
|
|
316
|
+
)
|
|
317
|
+
return tsfvalidate_execute(params, execution)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
__all__ = [
|
|
321
|
+
"TSFVALIDATE_METADATA",
|
|
322
|
+
"TsfvalidateConfigParameters",
|
|
323
|
+
"TsfvalidateOutputs",
|
|
324
|
+
"TsfvalidateParameters",
|
|
325
|
+
"tsfvalidate",
|
|
326
|
+
"tsfvalidate_config_params",
|
|
327
|
+
"tsfvalidate_params",
|
|
328
|
+
]
|
|
@@ -0,0 +1,359 @@
|
|
|
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
|
+
V_5TT2GMWMI_METADATA = Metadata(
|
|
9
|
+
id="0ee6033ccf738011cdec5b8ea67b162a89b7d0c3.boutiques",
|
|
10
|
+
name="5tt2gmwmi",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
V5tt2gmwmiConfigParameters = typing.TypedDict('V5tt2gmwmiConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
V5tt2gmwmiParameters = typing.TypedDict('V5tt2gmwmiParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["5tt2gmwmi"],
|
|
25
|
+
"mask_in": typing.NotRequired[InputPathType | None],
|
|
26
|
+
"info": bool,
|
|
27
|
+
"quiet": bool,
|
|
28
|
+
"debug": bool,
|
|
29
|
+
"force": bool,
|
|
30
|
+
"nthreads": typing.NotRequired[int | None],
|
|
31
|
+
"config": typing.NotRequired[list[V5tt2gmwmiConfigParameters] | None],
|
|
32
|
+
"help": bool,
|
|
33
|
+
"version": bool,
|
|
34
|
+
"5tt_in": InputPathType,
|
|
35
|
+
"mask_out": str,
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def dyn_cargs(
|
|
40
|
+
t: str,
|
|
41
|
+
) -> typing.Any:
|
|
42
|
+
"""
|
|
43
|
+
Get build cargs function by command type.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
t: Command type.
|
|
47
|
+
Returns:
|
|
48
|
+
Build cargs function.
|
|
49
|
+
"""
|
|
50
|
+
return {
|
|
51
|
+
"5tt2gmwmi": v_5tt2gmwmi_cargs,
|
|
52
|
+
"config": v_5tt2gmwmi_config_cargs,
|
|
53
|
+
}.get(t)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def dyn_outputs(
|
|
57
|
+
t: str,
|
|
58
|
+
) -> typing.Any:
|
|
59
|
+
"""
|
|
60
|
+
Get build outputs function by command type.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
t: Command type.
|
|
64
|
+
Returns:
|
|
65
|
+
Build outputs function.
|
|
66
|
+
"""
|
|
67
|
+
return {
|
|
68
|
+
"5tt2gmwmi": v_5tt2gmwmi_outputs,
|
|
69
|
+
}.get(t)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def v_5tt2gmwmi_config_params(
|
|
73
|
+
key: str,
|
|
74
|
+
value: str,
|
|
75
|
+
) -> V5tt2gmwmiConfigParameters:
|
|
76
|
+
"""
|
|
77
|
+
Build parameters.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
81
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
82
|
+
Returns:
|
|
83
|
+
Parameter dictionary
|
|
84
|
+
"""
|
|
85
|
+
params = {
|
|
86
|
+
"__STYXTYPE__": "config",
|
|
87
|
+
"key": key,
|
|
88
|
+
"value": value,
|
|
89
|
+
}
|
|
90
|
+
return params
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def v_5tt2gmwmi_config_cargs(
|
|
94
|
+
params: V5tt2gmwmiConfigParameters,
|
|
95
|
+
execution: Execution,
|
|
96
|
+
) -> list[str]:
|
|
97
|
+
"""
|
|
98
|
+
Build command-line arguments from parameters.
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
params: The parameters.
|
|
102
|
+
execution: The execution object for resolving input paths.
|
|
103
|
+
Returns:
|
|
104
|
+
Command-line arguments.
|
|
105
|
+
"""
|
|
106
|
+
cargs = []
|
|
107
|
+
cargs.append("-config")
|
|
108
|
+
cargs.append(params.get("key"))
|
|
109
|
+
cargs.append(params.get("value"))
|
|
110
|
+
return cargs
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class V5tt2gmwmiOutputs(typing.NamedTuple):
|
|
114
|
+
"""
|
|
115
|
+
Output object returned when calling `v_5tt2gmwmi(...)`.
|
|
116
|
+
"""
|
|
117
|
+
root: OutputPathType
|
|
118
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
119
|
+
mask_out: OutputPathType
|
|
120
|
+
"""the output mask image"""
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def v_5tt2gmwmi_params(
|
|
124
|
+
v_5tt_in: InputPathType,
|
|
125
|
+
mask_out: str,
|
|
126
|
+
mask_in: InputPathType | None = None,
|
|
127
|
+
info: bool = False,
|
|
128
|
+
quiet: bool = False,
|
|
129
|
+
debug: bool = False,
|
|
130
|
+
force: bool = False,
|
|
131
|
+
nthreads: int | None = None,
|
|
132
|
+
config: list[V5tt2gmwmiConfigParameters] | None = None,
|
|
133
|
+
help_: bool = False,
|
|
134
|
+
version: bool = False,
|
|
135
|
+
) -> V5tt2gmwmiParameters:
|
|
136
|
+
"""
|
|
137
|
+
Build parameters.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
v_5tt_in: the input 5TT segmented anatomical image.
|
|
141
|
+
mask_out: the output mask image.
|
|
142
|
+
mask_in: Filter an input mask image according to those voxels that lie\
|
|
143
|
+
upon the grey matter - white matter boundary. If no input mask is\
|
|
144
|
+
provided, the output will be a whole-brain mask image calculated using\
|
|
145
|
+
the anatomical image only.
|
|
146
|
+
info: display information messages.
|
|
147
|
+
quiet: do not display information messages or progress status;\
|
|
148
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
149
|
+
environment variable to a non-empty string.
|
|
150
|
+
debug: display debugging messages.
|
|
151
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
152
|
+
input and output might cause unexpected behaviour).
|
|
153
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
154
|
+
(set to 0 to disable multi-threading).
|
|
155
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
156
|
+
help_: display this information page and exit.
|
|
157
|
+
version: display version information and exit.
|
|
158
|
+
Returns:
|
|
159
|
+
Parameter dictionary
|
|
160
|
+
"""
|
|
161
|
+
params = {
|
|
162
|
+
"__STYXTYPE__": "5tt2gmwmi",
|
|
163
|
+
"info": info,
|
|
164
|
+
"quiet": quiet,
|
|
165
|
+
"debug": debug,
|
|
166
|
+
"force": force,
|
|
167
|
+
"help": help_,
|
|
168
|
+
"version": version,
|
|
169
|
+
"5tt_in": v_5tt_in,
|
|
170
|
+
"mask_out": mask_out,
|
|
171
|
+
}
|
|
172
|
+
if mask_in is not None:
|
|
173
|
+
params["mask_in"] = mask_in
|
|
174
|
+
if nthreads is not None:
|
|
175
|
+
params["nthreads"] = nthreads
|
|
176
|
+
if config is not None:
|
|
177
|
+
params["config"] = config
|
|
178
|
+
return params
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def v_5tt2gmwmi_cargs(
|
|
182
|
+
params: V5tt2gmwmiParameters,
|
|
183
|
+
execution: Execution,
|
|
184
|
+
) -> list[str]:
|
|
185
|
+
"""
|
|
186
|
+
Build command-line arguments from parameters.
|
|
187
|
+
|
|
188
|
+
Args:
|
|
189
|
+
params: The parameters.
|
|
190
|
+
execution: The execution object for resolving input paths.
|
|
191
|
+
Returns:
|
|
192
|
+
Command-line arguments.
|
|
193
|
+
"""
|
|
194
|
+
cargs = []
|
|
195
|
+
cargs.append("5tt2gmwmi")
|
|
196
|
+
if params.get("mask_in") is not None:
|
|
197
|
+
cargs.extend([
|
|
198
|
+
"-mask_in",
|
|
199
|
+
execution.input_file(params.get("mask_in"))
|
|
200
|
+
])
|
|
201
|
+
if params.get("info"):
|
|
202
|
+
cargs.append("-info")
|
|
203
|
+
if params.get("quiet"):
|
|
204
|
+
cargs.append("-quiet")
|
|
205
|
+
if params.get("debug"):
|
|
206
|
+
cargs.append("-debug")
|
|
207
|
+
if params.get("force"):
|
|
208
|
+
cargs.append("-force")
|
|
209
|
+
if params.get("nthreads") is not None:
|
|
210
|
+
cargs.extend([
|
|
211
|
+
"-nthreads",
|
|
212
|
+
str(params.get("nthreads"))
|
|
213
|
+
])
|
|
214
|
+
if params.get("config") is not None:
|
|
215
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
216
|
+
if params.get("help"):
|
|
217
|
+
cargs.append("-help")
|
|
218
|
+
if params.get("version"):
|
|
219
|
+
cargs.append("-version")
|
|
220
|
+
cargs.append(execution.input_file(params.get("5tt_in")))
|
|
221
|
+
cargs.append(params.get("mask_out"))
|
|
222
|
+
return cargs
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def v_5tt2gmwmi_outputs(
|
|
226
|
+
params: V5tt2gmwmiParameters,
|
|
227
|
+
execution: Execution,
|
|
228
|
+
) -> V5tt2gmwmiOutputs:
|
|
229
|
+
"""
|
|
230
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
231
|
+
|
|
232
|
+
Args:
|
|
233
|
+
params: The parameters.
|
|
234
|
+
execution: The execution object for resolving input paths.
|
|
235
|
+
Returns:
|
|
236
|
+
Outputs object.
|
|
237
|
+
"""
|
|
238
|
+
ret = V5tt2gmwmiOutputs(
|
|
239
|
+
root=execution.output_file("."),
|
|
240
|
+
mask_out=execution.output_file(params.get("mask_out")),
|
|
241
|
+
)
|
|
242
|
+
return ret
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def v_5tt2gmwmi_execute(
|
|
246
|
+
params: V5tt2gmwmiParameters,
|
|
247
|
+
execution: Execution,
|
|
248
|
+
) -> V5tt2gmwmiOutputs:
|
|
249
|
+
"""
|
|
250
|
+
Generate a mask image appropriate for seeding streamlines on the grey
|
|
251
|
+
matter-white matter interface.
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
References:
|
|
256
|
+
|
|
257
|
+
Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A.
|
|
258
|
+
Anatomically-constrained tractography:Improved diffusion MRI streamlines
|
|
259
|
+
tractography through effective use of anatomical information. NeuroImage,
|
|
260
|
+
2012, 62, 1924-1938.
|
|
261
|
+
|
|
262
|
+
Author: MRTrix3 Developers
|
|
263
|
+
|
|
264
|
+
URL: https://www.mrtrix.org/
|
|
265
|
+
|
|
266
|
+
Args:
|
|
267
|
+
params: The parameters.
|
|
268
|
+
execution: The execution object.
|
|
269
|
+
Returns:
|
|
270
|
+
NamedTuple of outputs (described in `V5tt2gmwmiOutputs`).
|
|
271
|
+
"""
|
|
272
|
+
params = execution.params(params)
|
|
273
|
+
cargs = v_5tt2gmwmi_cargs(params, execution)
|
|
274
|
+
ret = v_5tt2gmwmi_outputs(params, execution)
|
|
275
|
+
execution.run(cargs)
|
|
276
|
+
return ret
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
def v_5tt2gmwmi(
|
|
280
|
+
v_5tt_in: InputPathType,
|
|
281
|
+
mask_out: str,
|
|
282
|
+
mask_in: InputPathType | None = None,
|
|
283
|
+
info: bool = False,
|
|
284
|
+
quiet: bool = False,
|
|
285
|
+
debug: bool = False,
|
|
286
|
+
force: bool = False,
|
|
287
|
+
nthreads: int | None = None,
|
|
288
|
+
config: list[V5tt2gmwmiConfigParameters] | None = None,
|
|
289
|
+
help_: bool = False,
|
|
290
|
+
version: bool = False,
|
|
291
|
+
runner: Runner | None = None,
|
|
292
|
+
) -> V5tt2gmwmiOutputs:
|
|
293
|
+
"""
|
|
294
|
+
Generate a mask image appropriate for seeding streamlines on the grey
|
|
295
|
+
matter-white matter interface.
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
References:
|
|
300
|
+
|
|
301
|
+
Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A.
|
|
302
|
+
Anatomically-constrained tractography:Improved diffusion MRI streamlines
|
|
303
|
+
tractography through effective use of anatomical information. NeuroImage,
|
|
304
|
+
2012, 62, 1924-1938.
|
|
305
|
+
|
|
306
|
+
Author: MRTrix3 Developers
|
|
307
|
+
|
|
308
|
+
URL: https://www.mrtrix.org/
|
|
309
|
+
|
|
310
|
+
Args:
|
|
311
|
+
v_5tt_in: the input 5TT segmented anatomical image.
|
|
312
|
+
mask_out: the output mask image.
|
|
313
|
+
mask_in: Filter an input mask image according to those voxels that lie\
|
|
314
|
+
upon the grey matter - white matter boundary. If no input mask is\
|
|
315
|
+
provided, the output will be a whole-brain mask image calculated using\
|
|
316
|
+
the anatomical image only.
|
|
317
|
+
info: display information messages.
|
|
318
|
+
quiet: do not display information messages or progress status;\
|
|
319
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
320
|
+
environment variable to a non-empty string.
|
|
321
|
+
debug: display debugging messages.
|
|
322
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
323
|
+
input and output might cause unexpected behaviour).
|
|
324
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
325
|
+
(set to 0 to disable multi-threading).
|
|
326
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
327
|
+
help_: display this information page and exit.
|
|
328
|
+
version: display version information and exit.
|
|
329
|
+
runner: Command runner.
|
|
330
|
+
Returns:
|
|
331
|
+
NamedTuple of outputs (described in `V5tt2gmwmiOutputs`).
|
|
332
|
+
"""
|
|
333
|
+
runner = runner or get_global_runner()
|
|
334
|
+
execution = runner.start_execution(V_5TT2GMWMI_METADATA)
|
|
335
|
+
params = v_5tt2gmwmi_params(
|
|
336
|
+
mask_in=mask_in,
|
|
337
|
+
info=info,
|
|
338
|
+
quiet=quiet,
|
|
339
|
+
debug=debug,
|
|
340
|
+
force=force,
|
|
341
|
+
nthreads=nthreads,
|
|
342
|
+
config=config,
|
|
343
|
+
help_=help_,
|
|
344
|
+
version=version,
|
|
345
|
+
v_5tt_in=v_5tt_in,
|
|
346
|
+
mask_out=mask_out,
|
|
347
|
+
)
|
|
348
|
+
return v_5tt2gmwmi_execute(params, execution)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
__all__ = [
|
|
352
|
+
"V5tt2gmwmiConfigParameters",
|
|
353
|
+
"V5tt2gmwmiOutputs",
|
|
354
|
+
"V5tt2gmwmiParameters",
|
|
355
|
+
"V_5TT2GMWMI_METADATA",
|
|
356
|
+
"v_5tt2gmwmi",
|
|
357
|
+
"v_5tt2gmwmi_config_params",
|
|
358
|
+
"v_5tt2gmwmi_params",
|
|
359
|
+
]
|