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,334 @@
|
|
|
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
|
+
PEAKS2AMP_METADATA = Metadata(
|
|
9
|
+
id="90ed8fa8022a8bb67e41e995c1aaf7cea334db02.boutiques",
|
|
10
|
+
name="peaks2amp",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
Peaks2ampConfigParameters = typing.TypedDict('Peaks2ampConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Peaks2ampParameters = typing.TypedDict('Peaks2ampParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["peaks2amp"],
|
|
25
|
+
"info": bool,
|
|
26
|
+
"quiet": bool,
|
|
27
|
+
"debug": bool,
|
|
28
|
+
"force": bool,
|
|
29
|
+
"nthreads": typing.NotRequired[int | None],
|
|
30
|
+
"config": typing.NotRequired[list[Peaks2ampConfigParameters] | None],
|
|
31
|
+
"help": bool,
|
|
32
|
+
"version": bool,
|
|
33
|
+
"directions": InputPathType,
|
|
34
|
+
"amplitudes": str,
|
|
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
|
+
"peaks2amp": peaks2amp_cargs,
|
|
51
|
+
"config": peaks2amp_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
|
+
"peaks2amp": peaks2amp_outputs,
|
|
68
|
+
}.get(t)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def peaks2amp_config_params(
|
|
72
|
+
key: str,
|
|
73
|
+
value: str,
|
|
74
|
+
) -> Peaks2ampConfigParameters:
|
|
75
|
+
"""
|
|
76
|
+
Build parameters.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
80
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
81
|
+
Returns:
|
|
82
|
+
Parameter dictionary
|
|
83
|
+
"""
|
|
84
|
+
params = {
|
|
85
|
+
"__STYXTYPE__": "config",
|
|
86
|
+
"key": key,
|
|
87
|
+
"value": value,
|
|
88
|
+
}
|
|
89
|
+
return params
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def peaks2amp_config_cargs(
|
|
93
|
+
params: Peaks2ampConfigParameters,
|
|
94
|
+
execution: Execution,
|
|
95
|
+
) -> list[str]:
|
|
96
|
+
"""
|
|
97
|
+
Build command-line arguments from parameters.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
params: The parameters.
|
|
101
|
+
execution: The execution object for resolving input paths.
|
|
102
|
+
Returns:
|
|
103
|
+
Command-line arguments.
|
|
104
|
+
"""
|
|
105
|
+
cargs = []
|
|
106
|
+
cargs.append("-config")
|
|
107
|
+
cargs.append(params.get("key"))
|
|
108
|
+
cargs.append(params.get("value"))
|
|
109
|
+
return cargs
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class Peaks2ampOutputs(typing.NamedTuple):
|
|
113
|
+
"""
|
|
114
|
+
Output object returned when calling `peaks2amp(...)`.
|
|
115
|
+
"""
|
|
116
|
+
root: OutputPathType
|
|
117
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
118
|
+
amplitudes: OutputPathType
|
|
119
|
+
"""the output amplitudes image."""
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def peaks2amp_params(
|
|
123
|
+
directions: InputPathType,
|
|
124
|
+
amplitudes: str,
|
|
125
|
+
info: bool = False,
|
|
126
|
+
quiet: bool = False,
|
|
127
|
+
debug: bool = False,
|
|
128
|
+
force: bool = False,
|
|
129
|
+
nthreads: int | None = None,
|
|
130
|
+
config: list[Peaks2ampConfigParameters] | None = None,
|
|
131
|
+
help_: bool = False,
|
|
132
|
+
version: bool = False,
|
|
133
|
+
) -> Peaks2ampParameters:
|
|
134
|
+
"""
|
|
135
|
+
Build parameters.
|
|
136
|
+
|
|
137
|
+
Args:
|
|
138
|
+
directions: the input directions image. Each volume corresponds to the\
|
|
139
|
+
x, y & z component of each direction vector in turn.
|
|
140
|
+
amplitudes: the output amplitudes image.
|
|
141
|
+
info: display information messages.
|
|
142
|
+
quiet: do not display information messages or progress status;\
|
|
143
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
144
|
+
environment variable to a non-empty string.
|
|
145
|
+
debug: display debugging messages.
|
|
146
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
147
|
+
input and output might cause unexpected behaviour).
|
|
148
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
149
|
+
(set to 0 to disable multi-threading).
|
|
150
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
151
|
+
help_: display this information page and exit.
|
|
152
|
+
version: display version information and exit.
|
|
153
|
+
Returns:
|
|
154
|
+
Parameter dictionary
|
|
155
|
+
"""
|
|
156
|
+
params = {
|
|
157
|
+
"__STYXTYPE__": "peaks2amp",
|
|
158
|
+
"info": info,
|
|
159
|
+
"quiet": quiet,
|
|
160
|
+
"debug": debug,
|
|
161
|
+
"force": force,
|
|
162
|
+
"help": help_,
|
|
163
|
+
"version": version,
|
|
164
|
+
"directions": directions,
|
|
165
|
+
"amplitudes": amplitudes,
|
|
166
|
+
}
|
|
167
|
+
if nthreads is not None:
|
|
168
|
+
params["nthreads"] = nthreads
|
|
169
|
+
if config is not None:
|
|
170
|
+
params["config"] = config
|
|
171
|
+
return params
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def peaks2amp_cargs(
|
|
175
|
+
params: Peaks2ampParameters,
|
|
176
|
+
execution: Execution,
|
|
177
|
+
) -> list[str]:
|
|
178
|
+
"""
|
|
179
|
+
Build command-line arguments from parameters.
|
|
180
|
+
|
|
181
|
+
Args:
|
|
182
|
+
params: The parameters.
|
|
183
|
+
execution: The execution object for resolving input paths.
|
|
184
|
+
Returns:
|
|
185
|
+
Command-line arguments.
|
|
186
|
+
"""
|
|
187
|
+
cargs = []
|
|
188
|
+
cargs.append("peaks2amp")
|
|
189
|
+
if params.get("info"):
|
|
190
|
+
cargs.append("-info")
|
|
191
|
+
if params.get("quiet"):
|
|
192
|
+
cargs.append("-quiet")
|
|
193
|
+
if params.get("debug"):
|
|
194
|
+
cargs.append("-debug")
|
|
195
|
+
if params.get("force"):
|
|
196
|
+
cargs.append("-force")
|
|
197
|
+
if params.get("nthreads") is not None:
|
|
198
|
+
cargs.extend([
|
|
199
|
+
"-nthreads",
|
|
200
|
+
str(params.get("nthreads"))
|
|
201
|
+
])
|
|
202
|
+
if params.get("config") is not None:
|
|
203
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
204
|
+
if params.get("help"):
|
|
205
|
+
cargs.append("-help")
|
|
206
|
+
if params.get("version"):
|
|
207
|
+
cargs.append("-version")
|
|
208
|
+
cargs.append(execution.input_file(params.get("directions")))
|
|
209
|
+
cargs.append(params.get("amplitudes"))
|
|
210
|
+
return cargs
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def peaks2amp_outputs(
|
|
214
|
+
params: Peaks2ampParameters,
|
|
215
|
+
execution: Execution,
|
|
216
|
+
) -> Peaks2ampOutputs:
|
|
217
|
+
"""
|
|
218
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
219
|
+
|
|
220
|
+
Args:
|
|
221
|
+
params: The parameters.
|
|
222
|
+
execution: The execution object for resolving input paths.
|
|
223
|
+
Returns:
|
|
224
|
+
Outputs object.
|
|
225
|
+
"""
|
|
226
|
+
ret = Peaks2ampOutputs(
|
|
227
|
+
root=execution.output_file("."),
|
|
228
|
+
amplitudes=execution.output_file(params.get("amplitudes")),
|
|
229
|
+
)
|
|
230
|
+
return ret
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def peaks2amp_execute(
|
|
234
|
+
params: Peaks2ampParameters,
|
|
235
|
+
execution: Execution,
|
|
236
|
+
) -> Peaks2ampOutputs:
|
|
237
|
+
"""
|
|
238
|
+
Extract amplitudes from a peak directions image.
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
References:
|
|
243
|
+
|
|
244
|
+
.
|
|
245
|
+
|
|
246
|
+
Author: MRTrix3 Developers
|
|
247
|
+
|
|
248
|
+
URL: https://www.mrtrix.org/
|
|
249
|
+
|
|
250
|
+
Args:
|
|
251
|
+
params: The parameters.
|
|
252
|
+
execution: The execution object.
|
|
253
|
+
Returns:
|
|
254
|
+
NamedTuple of outputs (described in `Peaks2ampOutputs`).
|
|
255
|
+
"""
|
|
256
|
+
params = execution.params(params)
|
|
257
|
+
cargs = peaks2amp_cargs(params, execution)
|
|
258
|
+
ret = peaks2amp_outputs(params, execution)
|
|
259
|
+
execution.run(cargs)
|
|
260
|
+
return ret
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def peaks2amp(
|
|
264
|
+
directions: InputPathType,
|
|
265
|
+
amplitudes: str,
|
|
266
|
+
info: bool = False,
|
|
267
|
+
quiet: bool = False,
|
|
268
|
+
debug: bool = False,
|
|
269
|
+
force: bool = False,
|
|
270
|
+
nthreads: int | None = None,
|
|
271
|
+
config: list[Peaks2ampConfigParameters] | None = None,
|
|
272
|
+
help_: bool = False,
|
|
273
|
+
version: bool = False,
|
|
274
|
+
runner: Runner | None = None,
|
|
275
|
+
) -> Peaks2ampOutputs:
|
|
276
|
+
"""
|
|
277
|
+
Extract amplitudes from a peak directions image.
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
References:
|
|
282
|
+
|
|
283
|
+
.
|
|
284
|
+
|
|
285
|
+
Author: MRTrix3 Developers
|
|
286
|
+
|
|
287
|
+
URL: https://www.mrtrix.org/
|
|
288
|
+
|
|
289
|
+
Args:
|
|
290
|
+
directions: the input directions image. Each volume corresponds to the\
|
|
291
|
+
x, y & z component of each direction vector in turn.
|
|
292
|
+
amplitudes: the output amplitudes image.
|
|
293
|
+
info: display information messages.
|
|
294
|
+
quiet: do not display information messages or progress status;\
|
|
295
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
296
|
+
environment variable to a non-empty string.
|
|
297
|
+
debug: display debugging messages.
|
|
298
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
299
|
+
input and output might cause unexpected behaviour).
|
|
300
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
301
|
+
(set to 0 to disable multi-threading).
|
|
302
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
303
|
+
help_: display this information page and exit.
|
|
304
|
+
version: display version information and exit.
|
|
305
|
+
runner: Command runner.
|
|
306
|
+
Returns:
|
|
307
|
+
NamedTuple of outputs (described in `Peaks2ampOutputs`).
|
|
308
|
+
"""
|
|
309
|
+
runner = runner or get_global_runner()
|
|
310
|
+
execution = runner.start_execution(PEAKS2AMP_METADATA)
|
|
311
|
+
params = peaks2amp_params(
|
|
312
|
+
info=info,
|
|
313
|
+
quiet=quiet,
|
|
314
|
+
debug=debug,
|
|
315
|
+
force=force,
|
|
316
|
+
nthreads=nthreads,
|
|
317
|
+
config=config,
|
|
318
|
+
help_=help_,
|
|
319
|
+
version=version,
|
|
320
|
+
directions=directions,
|
|
321
|
+
amplitudes=amplitudes,
|
|
322
|
+
)
|
|
323
|
+
return peaks2amp_execute(params, execution)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
__all__ = [
|
|
327
|
+
"PEAKS2AMP_METADATA",
|
|
328
|
+
"Peaks2ampConfigParameters",
|
|
329
|
+
"Peaks2ampOutputs",
|
|
330
|
+
"Peaks2ampParameters",
|
|
331
|
+
"peaks2amp",
|
|
332
|
+
"peaks2amp_config_params",
|
|
333
|
+
"peaks2amp_params",
|
|
334
|
+
]
|
|
@@ -0,0 +1,349 @@
|
|
|
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
|
+
PEAKS2FIXEL_METADATA = Metadata(
|
|
9
|
+
id="d7a45807f5df2a3ff0f6456f9bc36be6cdae2250.boutiques",
|
|
10
|
+
name="peaks2fixel",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
Peaks2fixelConfigParameters = typing.TypedDict('Peaks2fixelConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Peaks2fixelParameters = typing.TypedDict('Peaks2fixelParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["peaks2fixel"],
|
|
25
|
+
"dataname": typing.NotRequired[str | None],
|
|
26
|
+
"info": bool,
|
|
27
|
+
"quiet": bool,
|
|
28
|
+
"debug": bool,
|
|
29
|
+
"force": bool,
|
|
30
|
+
"nthreads": typing.NotRequired[int | None],
|
|
31
|
+
"config": typing.NotRequired[list[Peaks2fixelConfigParameters] | None],
|
|
32
|
+
"help": bool,
|
|
33
|
+
"version": bool,
|
|
34
|
+
"directions": InputPathType,
|
|
35
|
+
"fixels": 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
|
+
"peaks2fixel": peaks2fixel_cargs,
|
|
52
|
+
"config": peaks2fixel_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
|
+
"peaks2fixel": peaks2fixel_outputs,
|
|
69
|
+
}.get(t)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def peaks2fixel_config_params(
|
|
73
|
+
key: str,
|
|
74
|
+
value: str,
|
|
75
|
+
) -> Peaks2fixelConfigParameters:
|
|
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 peaks2fixel_config_cargs(
|
|
94
|
+
params: Peaks2fixelConfigParameters,
|
|
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 Peaks2fixelOutputs(typing.NamedTuple):
|
|
114
|
+
"""
|
|
115
|
+
Output object returned when calling `peaks2fixel(...)`.
|
|
116
|
+
"""
|
|
117
|
+
root: OutputPathType
|
|
118
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
119
|
+
fixels: OutputPathType
|
|
120
|
+
"""the output fixel directory."""
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def peaks2fixel_params(
|
|
124
|
+
directions: InputPathType,
|
|
125
|
+
fixels: str,
|
|
126
|
+
dataname: str | 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[Peaks2fixelConfigParameters] | None = None,
|
|
133
|
+
help_: bool = False,
|
|
134
|
+
version: bool = False,
|
|
135
|
+
) -> Peaks2fixelParameters:
|
|
136
|
+
"""
|
|
137
|
+
Build parameters.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
directions: the input directions image; each volume corresponds to the\
|
|
141
|
+
x, y & z component of each direction vector in turn.
|
|
142
|
+
fixels: the output fixel directory.
|
|
143
|
+
dataname: the name of the output fixel data file encoding peak\
|
|
144
|
+
amplitudes.
|
|
145
|
+
info: display information messages.
|
|
146
|
+
quiet: do not display information messages or progress status;\
|
|
147
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
148
|
+
environment variable to a non-empty string.
|
|
149
|
+
debug: display debugging messages.
|
|
150
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
151
|
+
input and output might cause unexpected behaviour).
|
|
152
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
153
|
+
(set to 0 to disable multi-threading).
|
|
154
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
155
|
+
help_: display this information page and exit.
|
|
156
|
+
version: display version information and exit.
|
|
157
|
+
Returns:
|
|
158
|
+
Parameter dictionary
|
|
159
|
+
"""
|
|
160
|
+
params = {
|
|
161
|
+
"__STYXTYPE__": "peaks2fixel",
|
|
162
|
+
"info": info,
|
|
163
|
+
"quiet": quiet,
|
|
164
|
+
"debug": debug,
|
|
165
|
+
"force": force,
|
|
166
|
+
"help": help_,
|
|
167
|
+
"version": version,
|
|
168
|
+
"directions": directions,
|
|
169
|
+
"fixels": fixels,
|
|
170
|
+
}
|
|
171
|
+
if dataname is not None:
|
|
172
|
+
params["dataname"] = dataname
|
|
173
|
+
if nthreads is not None:
|
|
174
|
+
params["nthreads"] = nthreads
|
|
175
|
+
if config is not None:
|
|
176
|
+
params["config"] = config
|
|
177
|
+
return params
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def peaks2fixel_cargs(
|
|
181
|
+
params: Peaks2fixelParameters,
|
|
182
|
+
execution: Execution,
|
|
183
|
+
) -> list[str]:
|
|
184
|
+
"""
|
|
185
|
+
Build command-line arguments from parameters.
|
|
186
|
+
|
|
187
|
+
Args:
|
|
188
|
+
params: The parameters.
|
|
189
|
+
execution: The execution object for resolving input paths.
|
|
190
|
+
Returns:
|
|
191
|
+
Command-line arguments.
|
|
192
|
+
"""
|
|
193
|
+
cargs = []
|
|
194
|
+
cargs.append("peaks2fixel")
|
|
195
|
+
if params.get("dataname") is not None:
|
|
196
|
+
cargs.extend([
|
|
197
|
+
"-dataname",
|
|
198
|
+
params.get("dataname")
|
|
199
|
+
])
|
|
200
|
+
if params.get("info"):
|
|
201
|
+
cargs.append("-info")
|
|
202
|
+
if params.get("quiet"):
|
|
203
|
+
cargs.append("-quiet")
|
|
204
|
+
if params.get("debug"):
|
|
205
|
+
cargs.append("-debug")
|
|
206
|
+
if params.get("force"):
|
|
207
|
+
cargs.append("-force")
|
|
208
|
+
if params.get("nthreads") is not None:
|
|
209
|
+
cargs.extend([
|
|
210
|
+
"-nthreads",
|
|
211
|
+
str(params.get("nthreads"))
|
|
212
|
+
])
|
|
213
|
+
if params.get("config") is not None:
|
|
214
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
215
|
+
if params.get("help"):
|
|
216
|
+
cargs.append("-help")
|
|
217
|
+
if params.get("version"):
|
|
218
|
+
cargs.append("-version")
|
|
219
|
+
cargs.append(execution.input_file(params.get("directions")))
|
|
220
|
+
cargs.append(params.get("fixels"))
|
|
221
|
+
return cargs
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def peaks2fixel_outputs(
|
|
225
|
+
params: Peaks2fixelParameters,
|
|
226
|
+
execution: Execution,
|
|
227
|
+
) -> Peaks2fixelOutputs:
|
|
228
|
+
"""
|
|
229
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
230
|
+
|
|
231
|
+
Args:
|
|
232
|
+
params: The parameters.
|
|
233
|
+
execution: The execution object for resolving input paths.
|
|
234
|
+
Returns:
|
|
235
|
+
Outputs object.
|
|
236
|
+
"""
|
|
237
|
+
ret = Peaks2fixelOutputs(
|
|
238
|
+
root=execution.output_file("."),
|
|
239
|
+
fixels=execution.output_file(params.get("fixels")),
|
|
240
|
+
)
|
|
241
|
+
return ret
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def peaks2fixel_execute(
|
|
245
|
+
params: Peaks2fixelParameters,
|
|
246
|
+
execution: Execution,
|
|
247
|
+
) -> Peaks2fixelOutputs:
|
|
248
|
+
"""
|
|
249
|
+
Convert peak directions image to a fixel directory.
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
References:
|
|
254
|
+
|
|
255
|
+
.
|
|
256
|
+
|
|
257
|
+
Author: MRTrix3 Developers
|
|
258
|
+
|
|
259
|
+
URL: https://www.mrtrix.org/
|
|
260
|
+
|
|
261
|
+
Args:
|
|
262
|
+
params: The parameters.
|
|
263
|
+
execution: The execution object.
|
|
264
|
+
Returns:
|
|
265
|
+
NamedTuple of outputs (described in `Peaks2fixelOutputs`).
|
|
266
|
+
"""
|
|
267
|
+
params = execution.params(params)
|
|
268
|
+
cargs = peaks2fixel_cargs(params, execution)
|
|
269
|
+
ret = peaks2fixel_outputs(params, execution)
|
|
270
|
+
execution.run(cargs)
|
|
271
|
+
return ret
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def peaks2fixel(
|
|
275
|
+
directions: InputPathType,
|
|
276
|
+
fixels: str,
|
|
277
|
+
dataname: str | None = None,
|
|
278
|
+
info: bool = False,
|
|
279
|
+
quiet: bool = False,
|
|
280
|
+
debug: bool = False,
|
|
281
|
+
force: bool = False,
|
|
282
|
+
nthreads: int | None = None,
|
|
283
|
+
config: list[Peaks2fixelConfigParameters] | None = None,
|
|
284
|
+
help_: bool = False,
|
|
285
|
+
version: bool = False,
|
|
286
|
+
runner: Runner | None = None,
|
|
287
|
+
) -> Peaks2fixelOutputs:
|
|
288
|
+
"""
|
|
289
|
+
Convert peak directions image to a fixel directory.
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
References:
|
|
294
|
+
|
|
295
|
+
.
|
|
296
|
+
|
|
297
|
+
Author: MRTrix3 Developers
|
|
298
|
+
|
|
299
|
+
URL: https://www.mrtrix.org/
|
|
300
|
+
|
|
301
|
+
Args:
|
|
302
|
+
directions: the input directions image; each volume corresponds to the\
|
|
303
|
+
x, y & z component of each direction vector in turn.
|
|
304
|
+
fixels: the output fixel directory.
|
|
305
|
+
dataname: the name of the output fixel data file encoding peak\
|
|
306
|
+
amplitudes.
|
|
307
|
+
info: display information messages.
|
|
308
|
+
quiet: do not display information messages or progress status;\
|
|
309
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
310
|
+
environment variable to a non-empty string.
|
|
311
|
+
debug: display debugging messages.
|
|
312
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
313
|
+
input and output might cause unexpected behaviour).
|
|
314
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
315
|
+
(set to 0 to disable multi-threading).
|
|
316
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
317
|
+
help_: display this information page and exit.
|
|
318
|
+
version: display version information and exit.
|
|
319
|
+
runner: Command runner.
|
|
320
|
+
Returns:
|
|
321
|
+
NamedTuple of outputs (described in `Peaks2fixelOutputs`).
|
|
322
|
+
"""
|
|
323
|
+
runner = runner or get_global_runner()
|
|
324
|
+
execution = runner.start_execution(PEAKS2FIXEL_METADATA)
|
|
325
|
+
params = peaks2fixel_params(
|
|
326
|
+
dataname=dataname,
|
|
327
|
+
info=info,
|
|
328
|
+
quiet=quiet,
|
|
329
|
+
debug=debug,
|
|
330
|
+
force=force,
|
|
331
|
+
nthreads=nthreads,
|
|
332
|
+
config=config,
|
|
333
|
+
help_=help_,
|
|
334
|
+
version=version,
|
|
335
|
+
directions=directions,
|
|
336
|
+
fixels=fixels,
|
|
337
|
+
)
|
|
338
|
+
return peaks2fixel_execute(params, execution)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
__all__ = [
|
|
342
|
+
"PEAKS2FIXEL_METADATA",
|
|
343
|
+
"Peaks2fixelConfigParameters",
|
|
344
|
+
"Peaks2fixelOutputs",
|
|
345
|
+
"Peaks2fixelParameters",
|
|
346
|
+
"peaks2fixel",
|
|
347
|
+
"peaks2fixel_config_params",
|
|
348
|
+
"peaks2fixel_params",
|
|
349
|
+
]
|