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,346 @@
|
|
|
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
|
+
TRANSFORMCONVERT_METADATA = Metadata(
|
|
9
|
+
id="75054a4be3e9dc5460e5441d97e2350d859886dd.boutiques",
|
|
10
|
+
name="transformconvert",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
TransformconvertConfigParameters = typing.TypedDict('TransformconvertConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
TransformconvertParameters = typing.TypedDict('TransformconvertParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["transformconvert"],
|
|
25
|
+
"info": bool,
|
|
26
|
+
"quiet": bool,
|
|
27
|
+
"debug": bool,
|
|
28
|
+
"force": bool,
|
|
29
|
+
"nthreads": typing.NotRequired[int | None],
|
|
30
|
+
"config": typing.NotRequired[list[TransformconvertConfigParameters] | None],
|
|
31
|
+
"help": bool,
|
|
32
|
+
"version": bool,
|
|
33
|
+
"input": list[str],
|
|
34
|
+
"operation": str,
|
|
35
|
+
"output": 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
|
+
"transformconvert": transformconvert_cargs,
|
|
52
|
+
"config": transformconvert_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
|
+
"transformconvert": transformconvert_outputs,
|
|
69
|
+
}.get(t)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def transformconvert_config_params(
|
|
73
|
+
key: str,
|
|
74
|
+
value: str,
|
|
75
|
+
) -> TransformconvertConfigParameters:
|
|
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 transformconvert_config_cargs(
|
|
94
|
+
params: TransformconvertConfigParameters,
|
|
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 TransformconvertOutputs(typing.NamedTuple):
|
|
114
|
+
"""
|
|
115
|
+
Output object returned when calling `transformconvert(...)`.
|
|
116
|
+
"""
|
|
117
|
+
root: OutputPathType
|
|
118
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
119
|
+
output: OutputPathType
|
|
120
|
+
"""the output transformation matrix."""
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def transformconvert_params(
|
|
124
|
+
input_: list[str],
|
|
125
|
+
operation: str,
|
|
126
|
+
output: str,
|
|
127
|
+
info: bool = False,
|
|
128
|
+
quiet: bool = False,
|
|
129
|
+
debug: bool = False,
|
|
130
|
+
force: bool = False,
|
|
131
|
+
nthreads: int | None = None,
|
|
132
|
+
config: list[TransformconvertConfigParameters] | None = None,
|
|
133
|
+
help_: bool = False,
|
|
134
|
+
version: bool = False,
|
|
135
|
+
) -> TransformconvertParameters:
|
|
136
|
+
"""
|
|
137
|
+
Build parameters.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
input_: the input(s) for the specified operation.
|
|
141
|
+
operation: the operation to perform, one of:\
|
|
142
|
+
flirt_import, itk_import.
|
|
143
|
+
output: the output transformation matrix.
|
|
144
|
+
info: display information messages.
|
|
145
|
+
quiet: do not display information messages or progress status;\
|
|
146
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
147
|
+
environment variable to a non-empty string.
|
|
148
|
+
debug: display debugging messages.
|
|
149
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
150
|
+
input and output might cause unexpected behaviour).
|
|
151
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
152
|
+
(set to 0 to disable multi-threading).
|
|
153
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
154
|
+
help_: display this information page and exit.
|
|
155
|
+
version: display version information and exit.
|
|
156
|
+
Returns:
|
|
157
|
+
Parameter dictionary
|
|
158
|
+
"""
|
|
159
|
+
params = {
|
|
160
|
+
"__STYXTYPE__": "transformconvert",
|
|
161
|
+
"info": info,
|
|
162
|
+
"quiet": quiet,
|
|
163
|
+
"debug": debug,
|
|
164
|
+
"force": force,
|
|
165
|
+
"help": help_,
|
|
166
|
+
"version": version,
|
|
167
|
+
"input": input_,
|
|
168
|
+
"operation": operation,
|
|
169
|
+
"output": output,
|
|
170
|
+
}
|
|
171
|
+
if nthreads is not None:
|
|
172
|
+
params["nthreads"] = nthreads
|
|
173
|
+
if config is not None:
|
|
174
|
+
params["config"] = config
|
|
175
|
+
return params
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def transformconvert_cargs(
|
|
179
|
+
params: TransformconvertParameters,
|
|
180
|
+
execution: Execution,
|
|
181
|
+
) -> list[str]:
|
|
182
|
+
"""
|
|
183
|
+
Build command-line arguments from parameters.
|
|
184
|
+
|
|
185
|
+
Args:
|
|
186
|
+
params: The parameters.
|
|
187
|
+
execution: The execution object for resolving input paths.
|
|
188
|
+
Returns:
|
|
189
|
+
Command-line arguments.
|
|
190
|
+
"""
|
|
191
|
+
cargs = []
|
|
192
|
+
cargs.append("transformconvert")
|
|
193
|
+
if params.get("info"):
|
|
194
|
+
cargs.append("-info")
|
|
195
|
+
if params.get("quiet"):
|
|
196
|
+
cargs.append("-quiet")
|
|
197
|
+
if params.get("debug"):
|
|
198
|
+
cargs.append("-debug")
|
|
199
|
+
if params.get("force"):
|
|
200
|
+
cargs.append("-force")
|
|
201
|
+
if params.get("nthreads") is not None:
|
|
202
|
+
cargs.extend([
|
|
203
|
+
"-nthreads",
|
|
204
|
+
str(params.get("nthreads"))
|
|
205
|
+
])
|
|
206
|
+
if params.get("config") is not None:
|
|
207
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
208
|
+
if params.get("help"):
|
|
209
|
+
cargs.append("-help")
|
|
210
|
+
if params.get("version"):
|
|
211
|
+
cargs.append("-version")
|
|
212
|
+
cargs.extend(params.get("input"))
|
|
213
|
+
cargs.append(params.get("operation"))
|
|
214
|
+
cargs.append(params.get("output"))
|
|
215
|
+
return cargs
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def transformconvert_outputs(
|
|
219
|
+
params: TransformconvertParameters,
|
|
220
|
+
execution: Execution,
|
|
221
|
+
) -> TransformconvertOutputs:
|
|
222
|
+
"""
|
|
223
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
224
|
+
|
|
225
|
+
Args:
|
|
226
|
+
params: The parameters.
|
|
227
|
+
execution: The execution object for resolving input paths.
|
|
228
|
+
Returns:
|
|
229
|
+
Outputs object.
|
|
230
|
+
"""
|
|
231
|
+
ret = TransformconvertOutputs(
|
|
232
|
+
root=execution.output_file("."),
|
|
233
|
+
output=execution.output_file(params.get("output")),
|
|
234
|
+
)
|
|
235
|
+
return ret
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def transformconvert_execute(
|
|
239
|
+
params: TransformconvertParameters,
|
|
240
|
+
execution: Execution,
|
|
241
|
+
) -> TransformconvertOutputs:
|
|
242
|
+
"""
|
|
243
|
+
Convert linear transformation matrices.
|
|
244
|
+
|
|
245
|
+
This command allows to convert transformation matrices provided by other
|
|
246
|
+
registration softwares to a format usable in MRtrix3. Example usages are
|
|
247
|
+
provided below.
|
|
248
|
+
|
|
249
|
+
References:
|
|
250
|
+
|
|
251
|
+
.
|
|
252
|
+
|
|
253
|
+
Author: MRTrix3 Developers
|
|
254
|
+
|
|
255
|
+
URL: https://www.mrtrix.org/
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
params: The parameters.
|
|
259
|
+
execution: The execution object.
|
|
260
|
+
Returns:
|
|
261
|
+
NamedTuple of outputs (described in `TransformconvertOutputs`).
|
|
262
|
+
"""
|
|
263
|
+
params = execution.params(params)
|
|
264
|
+
cargs = transformconvert_cargs(params, execution)
|
|
265
|
+
ret = transformconvert_outputs(params, execution)
|
|
266
|
+
execution.run(cargs)
|
|
267
|
+
return ret
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def transformconvert(
|
|
271
|
+
input_: list[str],
|
|
272
|
+
operation: str,
|
|
273
|
+
output: str,
|
|
274
|
+
info: bool = False,
|
|
275
|
+
quiet: bool = False,
|
|
276
|
+
debug: bool = False,
|
|
277
|
+
force: bool = False,
|
|
278
|
+
nthreads: int | None = None,
|
|
279
|
+
config: list[TransformconvertConfigParameters] | None = None,
|
|
280
|
+
help_: bool = False,
|
|
281
|
+
version: bool = False,
|
|
282
|
+
runner: Runner | None = None,
|
|
283
|
+
) -> TransformconvertOutputs:
|
|
284
|
+
"""
|
|
285
|
+
Convert linear transformation matrices.
|
|
286
|
+
|
|
287
|
+
This command allows to convert transformation matrices provided by other
|
|
288
|
+
registration softwares to a format usable in MRtrix3. Example usages are
|
|
289
|
+
provided below.
|
|
290
|
+
|
|
291
|
+
References:
|
|
292
|
+
|
|
293
|
+
.
|
|
294
|
+
|
|
295
|
+
Author: MRTrix3 Developers
|
|
296
|
+
|
|
297
|
+
URL: https://www.mrtrix.org/
|
|
298
|
+
|
|
299
|
+
Args:
|
|
300
|
+
input_: the input(s) for the specified operation.
|
|
301
|
+
operation: the operation to perform, one of:\
|
|
302
|
+
flirt_import, itk_import.
|
|
303
|
+
output: the output transformation matrix.
|
|
304
|
+
info: display information messages.
|
|
305
|
+
quiet: do not display information messages or progress status;\
|
|
306
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
307
|
+
environment variable to a non-empty string.
|
|
308
|
+
debug: display debugging messages.
|
|
309
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
310
|
+
input and output might cause unexpected behaviour).
|
|
311
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
312
|
+
(set to 0 to disable multi-threading).
|
|
313
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
314
|
+
help_: display this information page and exit.
|
|
315
|
+
version: display version information and exit.
|
|
316
|
+
runner: Command runner.
|
|
317
|
+
Returns:
|
|
318
|
+
NamedTuple of outputs (described in `TransformconvertOutputs`).
|
|
319
|
+
"""
|
|
320
|
+
runner = runner or get_global_runner()
|
|
321
|
+
execution = runner.start_execution(TRANSFORMCONVERT_METADATA)
|
|
322
|
+
params = transformconvert_params(
|
|
323
|
+
info=info,
|
|
324
|
+
quiet=quiet,
|
|
325
|
+
debug=debug,
|
|
326
|
+
force=force,
|
|
327
|
+
nthreads=nthreads,
|
|
328
|
+
config=config,
|
|
329
|
+
help_=help_,
|
|
330
|
+
version=version,
|
|
331
|
+
input_=input_,
|
|
332
|
+
operation=operation,
|
|
333
|
+
output=output,
|
|
334
|
+
)
|
|
335
|
+
return transformconvert_execute(params, execution)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
__all__ = [
|
|
339
|
+
"TRANSFORMCONVERT_METADATA",
|
|
340
|
+
"TransformconvertConfigParameters",
|
|
341
|
+
"TransformconvertOutputs",
|
|
342
|
+
"TransformconvertParameters",
|
|
343
|
+
"transformconvert",
|
|
344
|
+
"transformconvert_config_params",
|
|
345
|
+
"transformconvert_params",
|
|
346
|
+
]
|
|
@@ -0,0 +1,340 @@
|
|
|
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="4ccdf692559c43f81a4682ec0171e369f074e7b7.boutiques",
|
|
10
|
+
name="tsfdivide",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
TsfdivideConfigParameters = typing.TypedDict('TsfdivideConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
TsfdivideParameters = typing.TypedDict('TsfdivideParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["tsfdivide"],
|
|
25
|
+
"info": bool,
|
|
26
|
+
"quiet": bool,
|
|
27
|
+
"debug": bool,
|
|
28
|
+
"force": bool,
|
|
29
|
+
"nthreads": typing.NotRequired[int | None],
|
|
30
|
+
"config": typing.NotRequired[list[TsfdivideConfigParameters] | None],
|
|
31
|
+
"help": bool,
|
|
32
|
+
"version": bool,
|
|
33
|
+
"input1": InputPathType,
|
|
34
|
+
"input2": InputPathType,
|
|
35
|
+
"output": 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
|
+
"tsfdivide": tsfdivide_cargs,
|
|
52
|
+
"config": tsfdivide_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
|
+
"tsfdivide": tsfdivide_outputs,
|
|
69
|
+
}.get(t)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def tsfdivide_config_params(
|
|
73
|
+
key: str,
|
|
74
|
+
value: str,
|
|
75
|
+
) -> TsfdivideConfigParameters:
|
|
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 tsfdivide_config_cargs(
|
|
94
|
+
params: TsfdivideConfigParameters,
|
|
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 TsfdivideOutputs(typing.NamedTuple):
|
|
114
|
+
"""
|
|
115
|
+
Output object returned when calling `tsfdivide(...)`.
|
|
116
|
+
"""
|
|
117
|
+
root: OutputPathType
|
|
118
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
119
|
+
output: OutputPathType
|
|
120
|
+
"""the output track scalar file"""
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def tsfdivide_params(
|
|
124
|
+
input1: InputPathType,
|
|
125
|
+
input2: InputPathType,
|
|
126
|
+
output: str,
|
|
127
|
+
info: bool = False,
|
|
128
|
+
quiet: bool = False,
|
|
129
|
+
debug: bool = False,
|
|
130
|
+
force: bool = False,
|
|
131
|
+
nthreads: int | None = None,
|
|
132
|
+
config: list[TsfdivideConfigParameters] | None = None,
|
|
133
|
+
help_: bool = False,
|
|
134
|
+
version: bool = False,
|
|
135
|
+
) -> TsfdivideParameters:
|
|
136
|
+
"""
|
|
137
|
+
Build parameters.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
input1: the first input track scalar file.
|
|
141
|
+
input2: the second input track scalar file.
|
|
142
|
+
output: the output track scalar file.
|
|
143
|
+
info: display information messages.
|
|
144
|
+
quiet: do not display information messages or progress status;\
|
|
145
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
146
|
+
environment variable to a non-empty string.
|
|
147
|
+
debug: display debugging messages.
|
|
148
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
149
|
+
input and output might cause unexpected behaviour).
|
|
150
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
151
|
+
(set to 0 to disable multi-threading).
|
|
152
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
153
|
+
help_: display this information page and exit.
|
|
154
|
+
version: display version information and exit.
|
|
155
|
+
Returns:
|
|
156
|
+
Parameter dictionary
|
|
157
|
+
"""
|
|
158
|
+
params = {
|
|
159
|
+
"__STYXTYPE__": "tsfdivide",
|
|
160
|
+
"info": info,
|
|
161
|
+
"quiet": quiet,
|
|
162
|
+
"debug": debug,
|
|
163
|
+
"force": force,
|
|
164
|
+
"help": help_,
|
|
165
|
+
"version": version,
|
|
166
|
+
"input1": input1,
|
|
167
|
+
"input2": input2,
|
|
168
|
+
"output": output,
|
|
169
|
+
}
|
|
170
|
+
if nthreads is not None:
|
|
171
|
+
params["nthreads"] = nthreads
|
|
172
|
+
if config is not None:
|
|
173
|
+
params["config"] = config
|
|
174
|
+
return params
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def tsfdivide_cargs(
|
|
178
|
+
params: TsfdivideParameters,
|
|
179
|
+
execution: Execution,
|
|
180
|
+
) -> list[str]:
|
|
181
|
+
"""
|
|
182
|
+
Build command-line arguments from parameters.
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
params: The parameters.
|
|
186
|
+
execution: The execution object for resolving input paths.
|
|
187
|
+
Returns:
|
|
188
|
+
Command-line arguments.
|
|
189
|
+
"""
|
|
190
|
+
cargs = []
|
|
191
|
+
cargs.append("tsfdivide")
|
|
192
|
+
if params.get("info"):
|
|
193
|
+
cargs.append("-info")
|
|
194
|
+
if params.get("quiet"):
|
|
195
|
+
cargs.append("-quiet")
|
|
196
|
+
if params.get("debug"):
|
|
197
|
+
cargs.append("-debug")
|
|
198
|
+
if params.get("force"):
|
|
199
|
+
cargs.append("-force")
|
|
200
|
+
if params.get("nthreads") is not None:
|
|
201
|
+
cargs.extend([
|
|
202
|
+
"-nthreads",
|
|
203
|
+
str(params.get("nthreads"))
|
|
204
|
+
])
|
|
205
|
+
if params.get("config") is not None:
|
|
206
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
207
|
+
if params.get("help"):
|
|
208
|
+
cargs.append("-help")
|
|
209
|
+
if params.get("version"):
|
|
210
|
+
cargs.append("-version")
|
|
211
|
+
cargs.append(execution.input_file(params.get("input1")))
|
|
212
|
+
cargs.append(execution.input_file(params.get("input2")))
|
|
213
|
+
cargs.append(params.get("output"))
|
|
214
|
+
return cargs
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def tsfdivide_outputs(
|
|
218
|
+
params: TsfdivideParameters,
|
|
219
|
+
execution: Execution,
|
|
220
|
+
) -> TsfdivideOutputs:
|
|
221
|
+
"""
|
|
222
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
223
|
+
|
|
224
|
+
Args:
|
|
225
|
+
params: The parameters.
|
|
226
|
+
execution: The execution object for resolving input paths.
|
|
227
|
+
Returns:
|
|
228
|
+
Outputs object.
|
|
229
|
+
"""
|
|
230
|
+
ret = TsfdivideOutputs(
|
|
231
|
+
root=execution.output_file("."),
|
|
232
|
+
output=execution.output_file(params.get("output")),
|
|
233
|
+
)
|
|
234
|
+
return ret
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def tsfdivide_execute(
|
|
238
|
+
params: TsfdivideParameters,
|
|
239
|
+
execution: Execution,
|
|
240
|
+
) -> TsfdivideOutputs:
|
|
241
|
+
"""
|
|
242
|
+
Divide corresponding values in track scalar files.
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
References:
|
|
247
|
+
|
|
248
|
+
.
|
|
249
|
+
|
|
250
|
+
Author: MRTrix3 Developers
|
|
251
|
+
|
|
252
|
+
URL: https://www.mrtrix.org/
|
|
253
|
+
|
|
254
|
+
Args:
|
|
255
|
+
params: The parameters.
|
|
256
|
+
execution: The execution object.
|
|
257
|
+
Returns:
|
|
258
|
+
NamedTuple of outputs (described in `TsfdivideOutputs`).
|
|
259
|
+
"""
|
|
260
|
+
params = execution.params(params)
|
|
261
|
+
cargs = tsfdivide_cargs(params, execution)
|
|
262
|
+
ret = tsfdivide_outputs(params, execution)
|
|
263
|
+
execution.run(cargs)
|
|
264
|
+
return ret
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def tsfdivide(
|
|
268
|
+
input1: InputPathType,
|
|
269
|
+
input2: InputPathType,
|
|
270
|
+
output: str,
|
|
271
|
+
info: bool = False,
|
|
272
|
+
quiet: bool = False,
|
|
273
|
+
debug: bool = False,
|
|
274
|
+
force: bool = False,
|
|
275
|
+
nthreads: int | None = None,
|
|
276
|
+
config: list[TsfdivideConfigParameters] | None = None,
|
|
277
|
+
help_: bool = False,
|
|
278
|
+
version: bool = False,
|
|
279
|
+
runner: Runner | None = None,
|
|
280
|
+
) -> TsfdivideOutputs:
|
|
281
|
+
"""
|
|
282
|
+
Divide corresponding values in track scalar files.
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
References:
|
|
287
|
+
|
|
288
|
+
.
|
|
289
|
+
|
|
290
|
+
Author: MRTrix3 Developers
|
|
291
|
+
|
|
292
|
+
URL: https://www.mrtrix.org/
|
|
293
|
+
|
|
294
|
+
Args:
|
|
295
|
+
input1: the first input track scalar file.
|
|
296
|
+
input2: the second input track scalar file.
|
|
297
|
+
output: the output track scalar file.
|
|
298
|
+
info: display information messages.
|
|
299
|
+
quiet: do not display information messages or progress status;\
|
|
300
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
301
|
+
environment variable to a non-empty string.
|
|
302
|
+
debug: display debugging messages.
|
|
303
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
304
|
+
input and output might cause unexpected behaviour).
|
|
305
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
306
|
+
(set to 0 to disable multi-threading).
|
|
307
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
308
|
+
help_: display this information page and exit.
|
|
309
|
+
version: display version information and exit.
|
|
310
|
+
runner: Command runner.
|
|
311
|
+
Returns:
|
|
312
|
+
NamedTuple of outputs (described in `TsfdivideOutputs`).
|
|
313
|
+
"""
|
|
314
|
+
runner = runner or get_global_runner()
|
|
315
|
+
execution = runner.start_execution(TSFDIVIDE_METADATA)
|
|
316
|
+
params = tsfdivide_params(
|
|
317
|
+
info=info,
|
|
318
|
+
quiet=quiet,
|
|
319
|
+
debug=debug,
|
|
320
|
+
force=force,
|
|
321
|
+
nthreads=nthreads,
|
|
322
|
+
config=config,
|
|
323
|
+
help_=help_,
|
|
324
|
+
version=version,
|
|
325
|
+
input1=input1,
|
|
326
|
+
input2=input2,
|
|
327
|
+
output=output,
|
|
328
|
+
)
|
|
329
|
+
return tsfdivide_execute(params, execution)
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
__all__ = [
|
|
333
|
+
"TSFDIVIDE_METADATA",
|
|
334
|
+
"TsfdivideConfigParameters",
|
|
335
|
+
"TsfdivideOutputs",
|
|
336
|
+
"TsfdivideParameters",
|
|
337
|
+
"tsfdivide",
|
|
338
|
+
"tsfdivide_config_params",
|
|
339
|
+
"tsfdivide_params",
|
|
340
|
+
]
|