niwrap-mrtrix 0.6.3__py3-none-any.whl → 0.7.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 +133 -0
- niwrap_mrtrix/mrtrix/afdconnectivity.py +59 -68
- niwrap_mrtrix/mrtrix/amp2response.py +72 -77
- niwrap_mrtrix/mrtrix/amp2sh.py +109 -74
- niwrap_mrtrix/mrtrix/connectome2tck.py +77 -79
- niwrap_mrtrix/mrtrix/connectomeedit.py +52 -62
- niwrap_mrtrix/mrtrix/connectomestats.py +117 -104
- niwrap_mrtrix/mrtrix/dcmedit.py +68 -73
- niwrap_mrtrix/mrtrix/dcminfo.py +67 -72
- niwrap_mrtrix/mrtrix/dirflip.py +56 -66
- niwrap_mrtrix/mrtrix/dirgen.py +68 -75
- niwrap_mrtrix/mrtrix/dirmerge.py +56 -66
- niwrap_mrtrix/mrtrix/dirorder.py +53 -64
- niwrap_mrtrix/mrtrix/dirsplit.py +56 -66
- niwrap_mrtrix/mrtrix/dirstat.py +70 -75
- niwrap_mrtrix/mrtrix/dwi2adc.py +67 -74
- niwrap_mrtrix/mrtrix/dwi2fod.py +141 -96
- niwrap_mrtrix/mrtrix/dwi2mask.py +70 -76
- niwrap_mrtrix/mrtrix/dwi2response.py +238 -157
- niwrap_mrtrix/mrtrix/dwi2tensor.py +87 -88
- niwrap_mrtrix/mrtrix/dwibiascorrect.py +97 -95
- niwrap_mrtrix/mrtrix/dwidenoise.py +67 -74
- niwrap_mrtrix/mrtrix/dwiextract.py +143 -99
- niwrap_mrtrix/mrtrix/dwigradcheck.py +89 -91
- niwrap_mrtrix/mrtrix/fixel2peaks.py +77 -51
- niwrap_mrtrix/mrtrix/fixel2sh.py +54 -65
- niwrap_mrtrix/mrtrix/fixel2tsf.py +56 -66
- niwrap_mrtrix/mrtrix/fixel2voxel.py +62 -70
- niwrap_mrtrix/mrtrix/fixelcfestats.py +145 -93
- niwrap_mrtrix/mrtrix/fixelconnectivity.py +62 -70
- niwrap_mrtrix/mrtrix/fixelconvert.py +136 -69
- niwrap_mrtrix/mrtrix/fixelcorrespondence.py +61 -69
- niwrap_mrtrix/mrtrix/fixelcrop.py +53 -64
- niwrap_mrtrix/mrtrix/fixelfilter.py +139 -71
- niwrap_mrtrix/mrtrix/fixelreorient.py +53 -64
- niwrap_mrtrix/mrtrix/fod2dec.py +70 -75
- niwrap_mrtrix/mrtrix/fod2fixel.py +84 -85
- niwrap_mrtrix/mrtrix/label2colour.py +58 -67
- niwrap_mrtrix/mrtrix/label2mesh.py +53 -64
- niwrap_mrtrix/mrtrix/labelconvert.py +58 -67
- niwrap_mrtrix/mrtrix/labelstats.py +53 -63
- niwrap_mrtrix/mrtrix/maskdump.py +52 -64
- niwrap_mrtrix/mrtrix/maskfilter.py +93 -61
- niwrap_mrtrix/mrtrix/mesh2voxel.py +53 -64
- niwrap_mrtrix/mrtrix/meshconvert.py +66 -73
- niwrap_mrtrix/mrtrix/meshfilter.py +59 -68
- niwrap_mrtrix/mrtrix/mraverageheader.py +62 -70
- niwrap_mrtrix/mrtrix/mrcalc.py +522 -397
- niwrap_mrtrix/mrtrix/mrcat.py +59 -68
- niwrap_mrtrix/mrtrix/mrcentroid.py +53 -63
- niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +58 -67
- niwrap_mrtrix/mrtrix/mrclusterstats.py +119 -105
- niwrap_mrtrix/mrtrix/mrcolour.py +62 -70
- niwrap_mrtrix/mrtrix/mrconvert.py +275 -173
- niwrap_mrtrix/mrtrix/mrdegibbs.py +66 -73
- niwrap_mrtrix/mrtrix/mrdump.py +55 -66
- niwrap_mrtrix/mrtrix/mredit.py +97 -94
- niwrap_mrtrix/mrtrix/mrfilter.py +124 -81
- niwrap_mrtrix/mrtrix/mrgrid.py +131 -88
- niwrap_mrtrix/mrtrix/mrhistmatch.py +64 -71
- niwrap_mrtrix/mrtrix/mrhistogram.py +64 -71
- niwrap_mrtrix/mrtrix/mrinfo.py +160 -137
- niwrap_mrtrix/mrtrix/mrmath.py +65 -73
- niwrap_mrtrix/mrtrix/mrmetric.py +69 -73
- niwrap_mrtrix/mrtrix/mrregister.py +263 -212
- niwrap_mrtrix/mrtrix/mrstats.py +66 -72
- niwrap_mrtrix/mrtrix/mrthreshold.py +80 -81
- niwrap_mrtrix/mrtrix/mrtransform.py +162 -109
- niwrap_mrtrix/mrtrix/mtnormalise.py +85 -88
- niwrap_mrtrix/mrtrix/peaks2amp.py +51 -63
- niwrap_mrtrix/mrtrix/peaks2fixel.py +54 -65
- niwrap_mrtrix/mrtrix/responsemean.py +51 -62
- niwrap_mrtrix/mrtrix/sh2amp.py +98 -65
- niwrap_mrtrix/mrtrix/sh2peaks.py +81 -83
- niwrap_mrtrix/mrtrix/sh2power.py +53 -64
- niwrap_mrtrix/mrtrix/sh2response.py +62 -70
- niwrap_mrtrix/mrtrix/shbasis.py +51 -62
- niwrap_mrtrix/mrtrix/shconv.py +78 -52
- niwrap_mrtrix/mrtrix/tck2connectome.py +93 -88
- niwrap_mrtrix/mrtrix/tck2fixel.py +57 -65
- niwrap_mrtrix/mrtrix/tckconvert.py +99 -65
- niwrap_mrtrix/mrtrix/tckdfc.py +82 -83
- niwrap_mrtrix/mrtrix/tckedit.py +240 -122
- niwrap_mrtrix/mrtrix/tckgen.py +364 -207
- niwrap_mrtrix/mrtrix/tckglobal.py +127 -115
- niwrap_mrtrix/mrtrix/tckinfo.py +50 -61
- niwrap_mrtrix/mrtrix/tckmap.py +121 -79
- niwrap_mrtrix/mrtrix/tckresample.py +97 -93
- niwrap_mrtrix/mrtrix/tcksample.py +62 -69
- niwrap_mrtrix/mrtrix/tcksift.py +102 -97
- niwrap_mrtrix/mrtrix/tcksift2.py +119 -107
- niwrap_mrtrix/mrtrix/tckstats.py +72 -78
- niwrap_mrtrix/mrtrix/tcktransform.py +53 -64
- niwrap_mrtrix/mrtrix/tensor2metric.py +93 -94
- niwrap_mrtrix/mrtrix/transformcalc.py +53 -64
- niwrap_mrtrix/mrtrix/transformcompose.py +74 -48
- niwrap_mrtrix/mrtrix/transformconvert.py +53 -64
- niwrap_mrtrix/mrtrix/tsfdivide.py +53 -64
- niwrap_mrtrix/mrtrix/tsfinfo.py +53 -63
- niwrap_mrtrix/mrtrix/tsfmult.py +51 -63
- niwrap_mrtrix/mrtrix/tsfsmooth.py +54 -65
- niwrap_mrtrix/mrtrix/tsfthreshold.py +55 -65
- niwrap_mrtrix/mrtrix/tsfvalidate.py +50 -61
- niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +54 -65
- niwrap_mrtrix/mrtrix/v_5tt2vis.py +69 -75
- niwrap_mrtrix/mrtrix/v_5ttcheck.py +51 -62
- niwrap_mrtrix/mrtrix/v_5ttedit.py +73 -79
- niwrap_mrtrix/mrtrix/v_5ttgen.py +132 -86
- niwrap_mrtrix/mrtrix/vectorstats.py +92 -88
- niwrap_mrtrix/mrtrix/voxel2fixel.py +54 -63
- niwrap_mrtrix/mrtrix/voxel2mesh.py +56 -66
- niwrap_mrtrix/mrtrix/warp2metric.py +71 -77
- niwrap_mrtrix/mrtrix/warpconvert.py +61 -69
- niwrap_mrtrix/mrtrix/warpcorrect.py +61 -71
- niwrap_mrtrix/mrtrix/warpinit.py +51 -63
- niwrap_mrtrix/mrtrix/warpinvert.py +56 -66
- niwrap_mrtrix-0.7.0.dist-info/METADATA +8 -0
- niwrap_mrtrix-0.7.0.dist-info/RECORD +119 -0
- niwrap_mrtrix-0.7.0.dist-info/WHEEL +4 -0
- niwrap_mrtrix-0.6.3.dist-info/METADATA +0 -8
- niwrap_mrtrix-0.6.3.dist-info/RECORD +0 -119
- niwrap_mrtrix-0.6.3.dist-info/WHEEL +0 -4
niwrap_mrtrix/mrtrix/tsfmult.py
CHANGED
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
TSFMULT_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="e103c6aff1dbf08096f6707a523cbafcb15a4c92.boutiques",
|
|
10
10
|
name="tsfmult",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,14 +14,32 @@ TSFMULT_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
TsfmultConfigParameters = typing.TypedDict('TsfmultConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
TsfmultConfigParametersTagged = typing.TypedDict('TsfmultConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
TsfmultParameters = typing.TypedDict('TsfmultParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/tsfmult"]],
|
|
30
|
+
"info": bool,
|
|
31
|
+
"quiet": bool,
|
|
32
|
+
"debug": bool,
|
|
33
|
+
"force": bool,
|
|
34
|
+
"nthreads": typing.NotRequired[int | None],
|
|
35
|
+
"config": typing.NotRequired[list[TsfmultConfigParameters] | None],
|
|
36
|
+
"help": bool,
|
|
37
|
+
"version": bool,
|
|
38
|
+
"input1": InputPathType,
|
|
39
|
+
"output": str,
|
|
40
|
+
})
|
|
41
|
+
TsfmultParametersTagged = typing.TypedDict('TsfmultParametersTagged', {
|
|
42
|
+
"@type": typing.Literal["mrtrix/tsfmult"],
|
|
25
43
|
"info": bool,
|
|
26
44
|
"quiet": bool,
|
|
27
45
|
"debug": bool,
|
|
@@ -33,45 +51,12 @@ TsfmultParameters = typing.TypedDict('TsfmultParameters', {
|
|
|
33
51
|
"input1": InputPathType,
|
|
34
52
|
"output": str,
|
|
35
53
|
})
|
|
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
|
-
"tsfmult": tsfmult_cargs,
|
|
51
|
-
"config": tsfmult_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
|
-
"tsfmult": tsfmult_outputs,
|
|
68
|
-
}.get(t)
|
|
69
54
|
|
|
70
55
|
|
|
71
56
|
def tsfmult_config_params(
|
|
72
57
|
key: str,
|
|
73
58
|
value: str,
|
|
74
|
-
) ->
|
|
59
|
+
) -> TsfmultConfigParametersTagged:
|
|
75
60
|
"""
|
|
76
61
|
Build parameters.
|
|
77
62
|
|
|
@@ -82,7 +67,7 @@ def tsfmult_config_params(
|
|
|
82
67
|
Parameter dictionary
|
|
83
68
|
"""
|
|
84
69
|
params = {
|
|
85
|
-
"
|
|
70
|
+
"@type": "config",
|
|
86
71
|
"key": key,
|
|
87
72
|
"value": value,
|
|
88
73
|
}
|
|
@@ -104,14 +89,14 @@ def tsfmult_config_cargs(
|
|
|
104
89
|
"""
|
|
105
90
|
cargs = []
|
|
106
91
|
cargs.append("-config")
|
|
107
|
-
cargs.append(params.get("key"))
|
|
108
|
-
cargs.append(params.get("value"))
|
|
92
|
+
cargs.append(params.get("key", None))
|
|
93
|
+
cargs.append(params.get("value", None))
|
|
109
94
|
return cargs
|
|
110
95
|
|
|
111
96
|
|
|
112
97
|
class TsfmultOutputs(typing.NamedTuple):
|
|
113
98
|
"""
|
|
114
|
-
Output object returned when calling `
|
|
99
|
+
Output object returned when calling `TsfmultParameters(...)`.
|
|
115
100
|
"""
|
|
116
101
|
root: OutputPathType
|
|
117
102
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -130,7 +115,7 @@ def tsfmult_params(
|
|
|
130
115
|
config: list[TsfmultConfigParameters] | None = None,
|
|
131
116
|
help_: bool = False,
|
|
132
117
|
version: bool = False,
|
|
133
|
-
) ->
|
|
118
|
+
) -> TsfmultParametersTagged:
|
|
134
119
|
"""
|
|
135
120
|
Build parameters.
|
|
136
121
|
|
|
@@ -153,7 +138,7 @@ def tsfmult_params(
|
|
|
153
138
|
Parameter dictionary
|
|
154
139
|
"""
|
|
155
140
|
params = {
|
|
156
|
-
"
|
|
141
|
+
"@type": "mrtrix/tsfmult",
|
|
157
142
|
"info": info,
|
|
158
143
|
"quiet": quiet,
|
|
159
144
|
"debug": debug,
|
|
@@ -185,27 +170,27 @@ def tsfmult_cargs(
|
|
|
185
170
|
"""
|
|
186
171
|
cargs = []
|
|
187
172
|
cargs.append("tsfmult")
|
|
188
|
-
if params.get("info"):
|
|
173
|
+
if params.get("info", False):
|
|
189
174
|
cargs.append("-info")
|
|
190
|
-
if params.get("quiet"):
|
|
175
|
+
if params.get("quiet", False):
|
|
191
176
|
cargs.append("-quiet")
|
|
192
|
-
if params.get("debug"):
|
|
177
|
+
if params.get("debug", False):
|
|
193
178
|
cargs.append("-debug")
|
|
194
|
-
if params.get("force"):
|
|
179
|
+
if params.get("force", False):
|
|
195
180
|
cargs.append("-force")
|
|
196
|
-
if params.get("nthreads") is not None:
|
|
181
|
+
if params.get("nthreads", None) is not None:
|
|
197
182
|
cargs.extend([
|
|
198
183
|
"-nthreads",
|
|
199
|
-
str(params.get("nthreads"))
|
|
184
|
+
str(params.get("nthreads", None))
|
|
200
185
|
])
|
|
201
|
-
if params.get("config") is not None:
|
|
202
|
-
cargs.extend([a for c in [
|
|
203
|
-
if params.get("help"):
|
|
186
|
+
if params.get("config", None) is not None:
|
|
187
|
+
cargs.extend([a for c in [tsfmult_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
188
|
+
if params.get("help", False):
|
|
204
189
|
cargs.append("-help")
|
|
205
|
-
if params.get("version"):
|
|
190
|
+
if params.get("version", False):
|
|
206
191
|
cargs.append("-version")
|
|
207
|
-
cargs.append(execution.input_file(params.get("input1")))
|
|
208
|
-
cargs.append(params.get("output"))
|
|
192
|
+
cargs.append(execution.input_file(params.get("input1", None)))
|
|
193
|
+
cargs.append(params.get("output", None))
|
|
209
194
|
return cargs
|
|
210
195
|
|
|
211
196
|
|
|
@@ -224,16 +209,18 @@ def tsfmult_outputs(
|
|
|
224
209
|
"""
|
|
225
210
|
ret = TsfmultOutputs(
|
|
226
211
|
root=execution.output_file("."),
|
|
227
|
-
output=execution.output_file(params.get("output")),
|
|
212
|
+
output=execution.output_file(params.get("output", None)),
|
|
228
213
|
)
|
|
229
214
|
return ret
|
|
230
215
|
|
|
231
216
|
|
|
232
217
|
def tsfmult_execute(
|
|
233
218
|
params: TsfmultParameters,
|
|
234
|
-
|
|
219
|
+
runner: Runner | None = None,
|
|
235
220
|
) -> TsfmultOutputs:
|
|
236
221
|
"""
|
|
222
|
+
tsfmult
|
|
223
|
+
|
|
237
224
|
Multiply corresponding values in track scalar files.
|
|
238
225
|
|
|
239
226
|
|
|
@@ -248,10 +235,12 @@ def tsfmult_execute(
|
|
|
248
235
|
|
|
249
236
|
Args:
|
|
250
237
|
params: The parameters.
|
|
251
|
-
|
|
238
|
+
runner: Command runner.
|
|
252
239
|
Returns:
|
|
253
240
|
NamedTuple of outputs (described in `TsfmultOutputs`).
|
|
254
241
|
"""
|
|
242
|
+
runner = runner or get_global_runner()
|
|
243
|
+
execution = runner.start_execution(TSFMULT_METADATA)
|
|
255
244
|
params = execution.params(params)
|
|
256
245
|
cargs = tsfmult_cargs(params, execution)
|
|
257
246
|
ret = tsfmult_outputs(params, execution)
|
|
@@ -273,6 +262,8 @@ def tsfmult(
|
|
|
273
262
|
runner: Runner | None = None,
|
|
274
263
|
) -> TsfmultOutputs:
|
|
275
264
|
"""
|
|
265
|
+
tsfmult
|
|
266
|
+
|
|
276
267
|
Multiply corresponding values in track scalar files.
|
|
277
268
|
|
|
278
269
|
|
|
@@ -304,8 +295,6 @@ def tsfmult(
|
|
|
304
295
|
Returns:
|
|
305
296
|
NamedTuple of outputs (described in `TsfmultOutputs`).
|
|
306
297
|
"""
|
|
307
|
-
runner = runner or get_global_runner()
|
|
308
|
-
execution = runner.start_execution(TSFMULT_METADATA)
|
|
309
298
|
params = tsfmult_params(
|
|
310
299
|
info=info,
|
|
311
300
|
quiet=quiet,
|
|
@@ -318,15 +307,14 @@ def tsfmult(
|
|
|
318
307
|
input1=input1,
|
|
319
308
|
output=output,
|
|
320
309
|
)
|
|
321
|
-
return tsfmult_execute(params,
|
|
310
|
+
return tsfmult_execute(params, runner)
|
|
322
311
|
|
|
323
312
|
|
|
324
313
|
__all__ = [
|
|
325
314
|
"TSFMULT_METADATA",
|
|
326
|
-
"TsfmultConfigParameters",
|
|
327
315
|
"TsfmultOutputs",
|
|
328
|
-
"TsfmultParameters",
|
|
329
316
|
"tsfmult",
|
|
330
317
|
"tsfmult_config_params",
|
|
318
|
+
"tsfmult_execute",
|
|
331
319
|
"tsfmult_params",
|
|
332
320
|
]
|
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
TSFSMOOTH_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="a24677b3a0e32a059af6e1aaa2200e029ee94f11.boutiques",
|
|
10
10
|
name="tsfsmooth",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,14 +14,33 @@ TSFSMOOTH_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
TsfsmoothConfigParameters = typing.TypedDict('TsfsmoothConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
TsfsmoothConfigParametersTagged = typing.TypedDict('TsfsmoothConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
TsfsmoothParameters = typing.TypedDict('TsfsmoothParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/tsfsmooth"]],
|
|
30
|
+
"stdev": typing.NotRequired[float | None],
|
|
31
|
+
"info": bool,
|
|
32
|
+
"quiet": bool,
|
|
33
|
+
"debug": bool,
|
|
34
|
+
"force": bool,
|
|
35
|
+
"nthreads": typing.NotRequired[int | None],
|
|
36
|
+
"config": typing.NotRequired[list[TsfsmoothConfigParameters] | None],
|
|
37
|
+
"help": bool,
|
|
38
|
+
"version": bool,
|
|
39
|
+
"input": InputPathType,
|
|
40
|
+
"output": str,
|
|
41
|
+
})
|
|
42
|
+
TsfsmoothParametersTagged = typing.TypedDict('TsfsmoothParametersTagged', {
|
|
43
|
+
"@type": typing.Literal["mrtrix/tsfsmooth"],
|
|
25
44
|
"stdev": typing.NotRequired[float | None],
|
|
26
45
|
"info": bool,
|
|
27
46
|
"quiet": bool,
|
|
@@ -34,45 +53,12 @@ TsfsmoothParameters = typing.TypedDict('TsfsmoothParameters', {
|
|
|
34
53
|
"input": InputPathType,
|
|
35
54
|
"output": str,
|
|
36
55
|
})
|
|
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
|
-
"tsfsmooth": tsfsmooth_cargs,
|
|
52
|
-
"config": tsfsmooth_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
|
-
"tsfsmooth": tsfsmooth_outputs,
|
|
69
|
-
}.get(t)
|
|
70
56
|
|
|
71
57
|
|
|
72
58
|
def tsfsmooth_config_params(
|
|
73
59
|
key: str,
|
|
74
60
|
value: str,
|
|
75
|
-
) ->
|
|
61
|
+
) -> TsfsmoothConfigParametersTagged:
|
|
76
62
|
"""
|
|
77
63
|
Build parameters.
|
|
78
64
|
|
|
@@ -83,7 +69,7 @@ def tsfsmooth_config_params(
|
|
|
83
69
|
Parameter dictionary
|
|
84
70
|
"""
|
|
85
71
|
params = {
|
|
86
|
-
"
|
|
72
|
+
"@type": "config",
|
|
87
73
|
"key": key,
|
|
88
74
|
"value": value,
|
|
89
75
|
}
|
|
@@ -105,14 +91,14 @@ def tsfsmooth_config_cargs(
|
|
|
105
91
|
"""
|
|
106
92
|
cargs = []
|
|
107
93
|
cargs.append("-config")
|
|
108
|
-
cargs.append(params.get("key"))
|
|
109
|
-
cargs.append(params.get("value"))
|
|
94
|
+
cargs.append(params.get("key", None))
|
|
95
|
+
cargs.append(params.get("value", None))
|
|
110
96
|
return cargs
|
|
111
97
|
|
|
112
98
|
|
|
113
99
|
class TsfsmoothOutputs(typing.NamedTuple):
|
|
114
100
|
"""
|
|
115
|
-
Output object returned when calling `
|
|
101
|
+
Output object returned when calling `TsfsmoothParameters(...)`.
|
|
116
102
|
"""
|
|
117
103
|
root: OutputPathType
|
|
118
104
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -132,7 +118,7 @@ def tsfsmooth_params(
|
|
|
132
118
|
config: list[TsfsmoothConfigParameters] | None = None,
|
|
133
119
|
help_: bool = False,
|
|
134
120
|
version: bool = False,
|
|
135
|
-
) ->
|
|
121
|
+
) -> TsfsmoothParametersTagged:
|
|
136
122
|
"""
|
|
137
123
|
Build parameters.
|
|
138
124
|
|
|
@@ -157,7 +143,7 @@ def tsfsmooth_params(
|
|
|
157
143
|
Parameter dictionary
|
|
158
144
|
"""
|
|
159
145
|
params = {
|
|
160
|
-
"
|
|
146
|
+
"@type": "mrtrix/tsfsmooth",
|
|
161
147
|
"info": info,
|
|
162
148
|
"quiet": quiet,
|
|
163
149
|
"debug": debug,
|
|
@@ -191,32 +177,32 @@ def tsfsmooth_cargs(
|
|
|
191
177
|
"""
|
|
192
178
|
cargs = []
|
|
193
179
|
cargs.append("tsfsmooth")
|
|
194
|
-
if params.get("stdev") is not None:
|
|
180
|
+
if params.get("stdev", None) is not None:
|
|
195
181
|
cargs.extend([
|
|
196
182
|
"-stdev",
|
|
197
|
-
str(params.get("stdev"))
|
|
183
|
+
str(params.get("stdev", None))
|
|
198
184
|
])
|
|
199
|
-
if params.get("info"):
|
|
185
|
+
if params.get("info", False):
|
|
200
186
|
cargs.append("-info")
|
|
201
|
-
if params.get("quiet"):
|
|
187
|
+
if params.get("quiet", False):
|
|
202
188
|
cargs.append("-quiet")
|
|
203
|
-
if params.get("debug"):
|
|
189
|
+
if params.get("debug", False):
|
|
204
190
|
cargs.append("-debug")
|
|
205
|
-
if params.get("force"):
|
|
191
|
+
if params.get("force", False):
|
|
206
192
|
cargs.append("-force")
|
|
207
|
-
if params.get("nthreads") is not None:
|
|
193
|
+
if params.get("nthreads", None) is not None:
|
|
208
194
|
cargs.extend([
|
|
209
195
|
"-nthreads",
|
|
210
|
-
str(params.get("nthreads"))
|
|
196
|
+
str(params.get("nthreads", None))
|
|
211
197
|
])
|
|
212
|
-
if params.get("config") is not None:
|
|
213
|
-
cargs.extend([a for c in [
|
|
214
|
-
if params.get("help"):
|
|
198
|
+
if params.get("config", None) is not None:
|
|
199
|
+
cargs.extend([a for c in [tsfsmooth_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
200
|
+
if params.get("help", False):
|
|
215
201
|
cargs.append("-help")
|
|
216
|
-
if params.get("version"):
|
|
202
|
+
if params.get("version", False):
|
|
217
203
|
cargs.append("-version")
|
|
218
|
-
cargs.append(execution.input_file(params.get("input")))
|
|
219
|
-
cargs.append(params.get("output"))
|
|
204
|
+
cargs.append(execution.input_file(params.get("input", None)))
|
|
205
|
+
cargs.append(params.get("output", None))
|
|
220
206
|
return cargs
|
|
221
207
|
|
|
222
208
|
|
|
@@ -235,16 +221,18 @@ def tsfsmooth_outputs(
|
|
|
235
221
|
"""
|
|
236
222
|
ret = TsfsmoothOutputs(
|
|
237
223
|
root=execution.output_file("."),
|
|
238
|
-
output=execution.output_file(params.get("output")),
|
|
224
|
+
output=execution.output_file(params.get("output", None)),
|
|
239
225
|
)
|
|
240
226
|
return ret
|
|
241
227
|
|
|
242
228
|
|
|
243
229
|
def tsfsmooth_execute(
|
|
244
230
|
params: TsfsmoothParameters,
|
|
245
|
-
|
|
231
|
+
runner: Runner | None = None,
|
|
246
232
|
) -> TsfsmoothOutputs:
|
|
247
233
|
"""
|
|
234
|
+
tsfsmooth
|
|
235
|
+
|
|
248
236
|
Gaussian filter a track scalar file.
|
|
249
237
|
|
|
250
238
|
|
|
@@ -259,10 +247,12 @@ def tsfsmooth_execute(
|
|
|
259
247
|
|
|
260
248
|
Args:
|
|
261
249
|
params: The parameters.
|
|
262
|
-
|
|
250
|
+
runner: Command runner.
|
|
263
251
|
Returns:
|
|
264
252
|
NamedTuple of outputs (described in `TsfsmoothOutputs`).
|
|
265
253
|
"""
|
|
254
|
+
runner = runner or get_global_runner()
|
|
255
|
+
execution = runner.start_execution(TSFSMOOTH_METADATA)
|
|
266
256
|
params = execution.params(params)
|
|
267
257
|
cargs = tsfsmooth_cargs(params, execution)
|
|
268
258
|
ret = tsfsmooth_outputs(params, execution)
|
|
@@ -285,6 +275,8 @@ def tsfsmooth(
|
|
|
285
275
|
runner: Runner | None = None,
|
|
286
276
|
) -> TsfsmoothOutputs:
|
|
287
277
|
"""
|
|
278
|
+
tsfsmooth
|
|
279
|
+
|
|
288
280
|
Gaussian filter a track scalar file.
|
|
289
281
|
|
|
290
282
|
|
|
@@ -318,8 +310,6 @@ def tsfsmooth(
|
|
|
318
310
|
Returns:
|
|
319
311
|
NamedTuple of outputs (described in `TsfsmoothOutputs`).
|
|
320
312
|
"""
|
|
321
|
-
runner = runner or get_global_runner()
|
|
322
|
-
execution = runner.start_execution(TSFSMOOTH_METADATA)
|
|
323
313
|
params = tsfsmooth_params(
|
|
324
314
|
stdev=stdev,
|
|
325
315
|
info=info,
|
|
@@ -333,15 +323,14 @@ def tsfsmooth(
|
|
|
333
323
|
input_=input_,
|
|
334
324
|
output=output,
|
|
335
325
|
)
|
|
336
|
-
return tsfsmooth_execute(params,
|
|
326
|
+
return tsfsmooth_execute(params, runner)
|
|
337
327
|
|
|
338
328
|
|
|
339
329
|
__all__ = [
|
|
340
330
|
"TSFSMOOTH_METADATA",
|
|
341
|
-
"TsfsmoothConfigParameters",
|
|
342
331
|
"TsfsmoothOutputs",
|
|
343
|
-
"TsfsmoothParameters",
|
|
344
332
|
"tsfsmooth",
|
|
345
333
|
"tsfsmooth_config_params",
|
|
334
|
+
"tsfsmooth_execute",
|
|
346
335
|
"tsfsmooth_params",
|
|
347
336
|
]
|