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
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
TCKGLOBAL_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="31e24266a6d4374cd9c0a8ed5d9d697b1c511208.boutiques",
|
|
10
10
|
name="tckglobal",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,20 +14,64 @@ TCKGLOBAL_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
TckglobalRisoParameters = typing.TypedDict('TckglobalRisoParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["riso"]],
|
|
18
|
+
"response": InputPathType,
|
|
19
|
+
})
|
|
20
|
+
TckglobalRisoParametersTagged = typing.TypedDict('TckglobalRisoParametersTagged', {
|
|
21
|
+
"@type": typing.Literal["riso"],
|
|
18
22
|
"response": InputPathType,
|
|
19
23
|
})
|
|
20
24
|
|
|
21
25
|
|
|
22
26
|
TckglobalConfigParameters = typing.TypedDict('TckglobalConfigParameters', {
|
|
23
|
-
"
|
|
27
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
28
|
+
"key": str,
|
|
29
|
+
"value": str,
|
|
30
|
+
})
|
|
31
|
+
TckglobalConfigParametersTagged = typing.TypedDict('TckglobalConfigParametersTagged', {
|
|
32
|
+
"@type": typing.Literal["config"],
|
|
24
33
|
"key": str,
|
|
25
34
|
"value": str,
|
|
26
35
|
})
|
|
27
36
|
|
|
28
37
|
|
|
29
38
|
TckglobalParameters = typing.TypedDict('TckglobalParameters', {
|
|
30
|
-
"
|
|
39
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/tckglobal"]],
|
|
40
|
+
"grad": typing.NotRequired[InputPathType | None],
|
|
41
|
+
"mask": typing.NotRequired[InputPathType | None],
|
|
42
|
+
"riso": typing.NotRequired[list[TckglobalRisoParameters] | None],
|
|
43
|
+
"lmax": typing.NotRequired[int | None],
|
|
44
|
+
"length": typing.NotRequired[float | None],
|
|
45
|
+
"weight": typing.NotRequired[float | None],
|
|
46
|
+
"ppot": typing.NotRequired[float | None],
|
|
47
|
+
"cpot": typing.NotRequired[float | None],
|
|
48
|
+
"t0": typing.NotRequired[float | None],
|
|
49
|
+
"t1": typing.NotRequired[float | None],
|
|
50
|
+
"niter": typing.NotRequired[int | None],
|
|
51
|
+
"fod": typing.NotRequired[str | None],
|
|
52
|
+
"noapo": bool,
|
|
53
|
+
"fiso": typing.NotRequired[str | None],
|
|
54
|
+
"eext": typing.NotRequired[str | None],
|
|
55
|
+
"etrend": typing.NotRequired[str | None],
|
|
56
|
+
"balance": typing.NotRequired[float | None],
|
|
57
|
+
"density": typing.NotRequired[float | None],
|
|
58
|
+
"prob": typing.NotRequired[list[float] | None],
|
|
59
|
+
"beta": typing.NotRequired[float | None],
|
|
60
|
+
"lambda": typing.NotRequired[float | None],
|
|
61
|
+
"info": bool,
|
|
62
|
+
"quiet": bool,
|
|
63
|
+
"debug": bool,
|
|
64
|
+
"force": bool,
|
|
65
|
+
"nthreads": typing.NotRequired[int | None],
|
|
66
|
+
"config": typing.NotRequired[list[TckglobalConfigParameters] | None],
|
|
67
|
+
"help": bool,
|
|
68
|
+
"version": bool,
|
|
69
|
+
"source": InputPathType,
|
|
70
|
+
"response": InputPathType,
|
|
71
|
+
"tracks": str,
|
|
72
|
+
})
|
|
73
|
+
TckglobalParametersTagged = typing.TypedDict('TckglobalParametersTagged', {
|
|
74
|
+
"@type": typing.Literal["mrtrix/tckglobal"],
|
|
31
75
|
"grad": typing.NotRequired[InputPathType | None],
|
|
32
76
|
"mask": typing.NotRequired[InputPathType | None],
|
|
33
77
|
"riso": typing.NotRequired[list[TckglobalRisoParameters] | None],
|
|
@@ -61,45 +105,11 @@ TckglobalParameters = typing.TypedDict('TckglobalParameters', {
|
|
|
61
105
|
"response": InputPathType,
|
|
62
106
|
"tracks": str,
|
|
63
107
|
})
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
def dyn_cargs(
|
|
67
|
-
t: str,
|
|
68
|
-
) -> typing.Any:
|
|
69
|
-
"""
|
|
70
|
-
Get build cargs function by command type.
|
|
71
|
-
|
|
72
|
-
Args:
|
|
73
|
-
t: Command type.
|
|
74
|
-
Returns:
|
|
75
|
-
Build cargs function.
|
|
76
|
-
"""
|
|
77
|
-
return {
|
|
78
|
-
"tckglobal": tckglobal_cargs,
|
|
79
|
-
"riso": tckglobal_riso_cargs,
|
|
80
|
-
"config": tckglobal_config_cargs,
|
|
81
|
-
}.get(t)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
def dyn_outputs(
|
|
85
|
-
t: str,
|
|
86
|
-
) -> typing.Any:
|
|
87
|
-
"""
|
|
88
|
-
Get build outputs function by command type.
|
|
89
|
-
|
|
90
|
-
Args:
|
|
91
|
-
t: Command type.
|
|
92
|
-
Returns:
|
|
93
|
-
Build outputs function.
|
|
94
|
-
"""
|
|
95
|
-
return {
|
|
96
|
-
"tckglobal": tckglobal_outputs,
|
|
97
|
-
}.get(t)
|
|
98
108
|
|
|
99
109
|
|
|
100
110
|
def tckglobal_riso_params(
|
|
101
111
|
response: InputPathType,
|
|
102
|
-
) ->
|
|
112
|
+
) -> TckglobalRisoParametersTagged:
|
|
103
113
|
"""
|
|
104
114
|
Build parameters.
|
|
105
115
|
|
|
@@ -110,7 +120,7 @@ def tckglobal_riso_params(
|
|
|
110
120
|
Parameter dictionary
|
|
111
121
|
"""
|
|
112
122
|
params = {
|
|
113
|
-
"
|
|
123
|
+
"@type": "riso",
|
|
114
124
|
"response": response,
|
|
115
125
|
}
|
|
116
126
|
return params
|
|
@@ -131,14 +141,14 @@ def tckglobal_riso_cargs(
|
|
|
131
141
|
"""
|
|
132
142
|
cargs = []
|
|
133
143
|
cargs.append("-riso")
|
|
134
|
-
cargs.append(execution.input_file(params.get("response")))
|
|
144
|
+
cargs.append(execution.input_file(params.get("response", None)))
|
|
135
145
|
return cargs
|
|
136
146
|
|
|
137
147
|
|
|
138
148
|
def tckglobal_config_params(
|
|
139
149
|
key: str,
|
|
140
150
|
value: str,
|
|
141
|
-
) ->
|
|
151
|
+
) -> TckglobalConfigParametersTagged:
|
|
142
152
|
"""
|
|
143
153
|
Build parameters.
|
|
144
154
|
|
|
@@ -149,7 +159,7 @@ def tckglobal_config_params(
|
|
|
149
159
|
Parameter dictionary
|
|
150
160
|
"""
|
|
151
161
|
params = {
|
|
152
|
-
"
|
|
162
|
+
"@type": "config",
|
|
153
163
|
"key": key,
|
|
154
164
|
"value": value,
|
|
155
165
|
}
|
|
@@ -171,14 +181,14 @@ def tckglobal_config_cargs(
|
|
|
171
181
|
"""
|
|
172
182
|
cargs = []
|
|
173
183
|
cargs.append("-config")
|
|
174
|
-
cargs.append(params.get("key"))
|
|
175
|
-
cargs.append(params.get("value"))
|
|
184
|
+
cargs.append(params.get("key", None))
|
|
185
|
+
cargs.append(params.get("value", None))
|
|
176
186
|
return cargs
|
|
177
187
|
|
|
178
188
|
|
|
179
189
|
class TckglobalOutputs(typing.NamedTuple):
|
|
180
190
|
"""
|
|
181
|
-
Output object returned when calling `
|
|
191
|
+
Output object returned when calling `TckglobalParameters(...)`.
|
|
182
192
|
"""
|
|
183
193
|
root: OutputPathType
|
|
184
194
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -234,7 +244,7 @@ def tckglobal_params(
|
|
|
234
244
|
config: list[TckglobalConfigParameters] | None = None,
|
|
235
245
|
help_: bool = False,
|
|
236
246
|
version: bool = False,
|
|
237
|
-
) ->
|
|
247
|
+
) -> TckglobalParametersTagged:
|
|
238
248
|
"""
|
|
239
249
|
Build parameters.
|
|
240
250
|
|
|
@@ -306,7 +316,7 @@ def tckglobal_params(
|
|
|
306
316
|
Parameter dictionary
|
|
307
317
|
"""
|
|
308
318
|
params = {
|
|
309
|
-
"
|
|
319
|
+
"@type": "mrtrix/tckglobal",
|
|
310
320
|
"noapo": noapo,
|
|
311
321
|
"info": info,
|
|
312
322
|
"quiet": quiet,
|
|
@@ -380,127 +390,127 @@ def tckglobal_cargs(
|
|
|
380
390
|
"""
|
|
381
391
|
cargs = []
|
|
382
392
|
cargs.append("tckglobal")
|
|
383
|
-
if params.get("grad") is not None:
|
|
393
|
+
if params.get("grad", None) is not None:
|
|
384
394
|
cargs.extend([
|
|
385
395
|
"-grad",
|
|
386
|
-
execution.input_file(params.get("grad"))
|
|
396
|
+
execution.input_file(params.get("grad", None))
|
|
387
397
|
])
|
|
388
|
-
if params.get("mask") is not None:
|
|
398
|
+
if params.get("mask", None) is not None:
|
|
389
399
|
cargs.extend([
|
|
390
400
|
"-mask",
|
|
391
|
-
execution.input_file(params.get("mask"))
|
|
401
|
+
execution.input_file(params.get("mask", None))
|
|
392
402
|
])
|
|
393
|
-
if params.get("riso") is not None:
|
|
394
|
-
cargs.extend([a for c in [
|
|
395
|
-
if params.get("lmax") is not None:
|
|
403
|
+
if params.get("riso", None) is not None:
|
|
404
|
+
cargs.extend([a for c in [tckglobal_riso_cargs(s, execution) for s in params.get("riso", None)] for a in c])
|
|
405
|
+
if params.get("lmax", None) is not None:
|
|
396
406
|
cargs.extend([
|
|
397
407
|
"-lmax",
|
|
398
|
-
str(params.get("lmax"))
|
|
408
|
+
str(params.get("lmax", None))
|
|
399
409
|
])
|
|
400
|
-
if params.get("length") is not None:
|
|
410
|
+
if params.get("length", None) is not None:
|
|
401
411
|
cargs.extend([
|
|
402
412
|
"-length",
|
|
403
|
-
str(params.get("length"))
|
|
413
|
+
str(params.get("length", None))
|
|
404
414
|
])
|
|
405
|
-
if params.get("weight") is not None:
|
|
415
|
+
if params.get("weight", None) is not None:
|
|
406
416
|
cargs.extend([
|
|
407
417
|
"-weight",
|
|
408
|
-
str(params.get("weight"))
|
|
418
|
+
str(params.get("weight", None))
|
|
409
419
|
])
|
|
410
|
-
if params.get("ppot") is not None:
|
|
420
|
+
if params.get("ppot", None) is not None:
|
|
411
421
|
cargs.extend([
|
|
412
422
|
"-ppot",
|
|
413
|
-
str(params.get("ppot"))
|
|
423
|
+
str(params.get("ppot", None))
|
|
414
424
|
])
|
|
415
|
-
if params.get("cpot") is not None:
|
|
425
|
+
if params.get("cpot", None) is not None:
|
|
416
426
|
cargs.extend([
|
|
417
427
|
"-cpot",
|
|
418
|
-
str(params.get("cpot"))
|
|
428
|
+
str(params.get("cpot", None))
|
|
419
429
|
])
|
|
420
|
-
if params.get("t0") is not None:
|
|
430
|
+
if params.get("t0", None) is not None:
|
|
421
431
|
cargs.extend([
|
|
422
432
|
"-t0",
|
|
423
|
-
str(params.get("t0"))
|
|
433
|
+
str(params.get("t0", None))
|
|
424
434
|
])
|
|
425
|
-
if params.get("t1") is not None:
|
|
435
|
+
if params.get("t1", None) is not None:
|
|
426
436
|
cargs.extend([
|
|
427
437
|
"-t1",
|
|
428
|
-
str(params.get("t1"))
|
|
438
|
+
str(params.get("t1", None))
|
|
429
439
|
])
|
|
430
|
-
if params.get("niter") is not None:
|
|
440
|
+
if params.get("niter", None) is not None:
|
|
431
441
|
cargs.extend([
|
|
432
442
|
"-niter",
|
|
433
|
-
str(params.get("niter"))
|
|
443
|
+
str(params.get("niter", None))
|
|
434
444
|
])
|
|
435
|
-
if params.get("fod") is not None:
|
|
445
|
+
if params.get("fod", None) is not None:
|
|
436
446
|
cargs.extend([
|
|
437
447
|
"-fod",
|
|
438
|
-
params.get("fod")
|
|
448
|
+
params.get("fod", None)
|
|
439
449
|
])
|
|
440
|
-
if params.get("noapo"):
|
|
450
|
+
if params.get("noapo", False):
|
|
441
451
|
cargs.append("-noapo")
|
|
442
|
-
if params.get("fiso") is not None:
|
|
452
|
+
if params.get("fiso", None) is not None:
|
|
443
453
|
cargs.extend([
|
|
444
454
|
"-fiso",
|
|
445
|
-
params.get("fiso")
|
|
455
|
+
params.get("fiso", None)
|
|
446
456
|
])
|
|
447
|
-
if params.get("eext") is not None:
|
|
457
|
+
if params.get("eext", None) is not None:
|
|
448
458
|
cargs.extend([
|
|
449
459
|
"-eext",
|
|
450
|
-
params.get("eext")
|
|
460
|
+
params.get("eext", None)
|
|
451
461
|
])
|
|
452
|
-
if params.get("etrend") is not None:
|
|
462
|
+
if params.get("etrend", None) is not None:
|
|
453
463
|
cargs.extend([
|
|
454
464
|
"-etrend",
|
|
455
|
-
params.get("etrend")
|
|
465
|
+
params.get("etrend", None)
|
|
456
466
|
])
|
|
457
|
-
if params.get("balance") is not None:
|
|
467
|
+
if params.get("balance", None) is not None:
|
|
458
468
|
cargs.extend([
|
|
459
469
|
"-balance",
|
|
460
|
-
str(params.get("balance"))
|
|
470
|
+
str(params.get("balance", None))
|
|
461
471
|
])
|
|
462
|
-
if params.get("density") is not None:
|
|
472
|
+
if params.get("density", None) is not None:
|
|
463
473
|
cargs.extend([
|
|
464
474
|
"-density",
|
|
465
|
-
str(params.get("density"))
|
|
475
|
+
str(params.get("density", None))
|
|
466
476
|
])
|
|
467
|
-
if params.get("prob") is not None:
|
|
477
|
+
if params.get("prob", None) is not None:
|
|
468
478
|
cargs.extend([
|
|
469
479
|
"-prob",
|
|
470
|
-
*map(str, params.get("prob"))
|
|
480
|
+
*map(str, params.get("prob", None))
|
|
471
481
|
])
|
|
472
|
-
if params.get("beta") is not None:
|
|
482
|
+
if params.get("beta", None) is not None:
|
|
473
483
|
cargs.extend([
|
|
474
484
|
"-beta",
|
|
475
|
-
str(params.get("beta"))
|
|
485
|
+
str(params.get("beta", None))
|
|
476
486
|
])
|
|
477
|
-
if params.get("lambda") is not None:
|
|
487
|
+
if params.get("lambda", None) is not None:
|
|
478
488
|
cargs.extend([
|
|
479
489
|
"-lambda",
|
|
480
|
-
str(params.get("lambda"))
|
|
490
|
+
str(params.get("lambda", None))
|
|
481
491
|
])
|
|
482
|
-
if params.get("info"):
|
|
492
|
+
if params.get("info", False):
|
|
483
493
|
cargs.append("-info")
|
|
484
|
-
if params.get("quiet"):
|
|
494
|
+
if params.get("quiet", False):
|
|
485
495
|
cargs.append("-quiet")
|
|
486
|
-
if params.get("debug"):
|
|
496
|
+
if params.get("debug", False):
|
|
487
497
|
cargs.append("-debug")
|
|
488
|
-
if params.get("force"):
|
|
498
|
+
if params.get("force", False):
|
|
489
499
|
cargs.append("-force")
|
|
490
|
-
if params.get("nthreads") is not None:
|
|
500
|
+
if params.get("nthreads", None) is not None:
|
|
491
501
|
cargs.extend([
|
|
492
502
|
"-nthreads",
|
|
493
|
-
str(params.get("nthreads"))
|
|
503
|
+
str(params.get("nthreads", None))
|
|
494
504
|
])
|
|
495
|
-
if params.get("config") is not None:
|
|
496
|
-
cargs.extend([a for c in [
|
|
497
|
-
if params.get("help"):
|
|
505
|
+
if params.get("config", None) is not None:
|
|
506
|
+
cargs.extend([a for c in [tckglobal_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
507
|
+
if params.get("help", False):
|
|
498
508
|
cargs.append("-help")
|
|
499
|
-
if params.get("version"):
|
|
509
|
+
if params.get("version", False):
|
|
500
510
|
cargs.append("-version")
|
|
501
|
-
cargs.append(execution.input_file(params.get("source")))
|
|
502
|
-
cargs.append(execution.input_file(params.get("response")))
|
|
503
|
-
cargs.append(params.get("tracks"))
|
|
511
|
+
cargs.append(execution.input_file(params.get("source", None)))
|
|
512
|
+
cargs.append(execution.input_file(params.get("response", None)))
|
|
513
|
+
cargs.append(params.get("tracks", None))
|
|
504
514
|
return cargs
|
|
505
515
|
|
|
506
516
|
|
|
@@ -519,20 +529,22 @@ def tckglobal_outputs(
|
|
|
519
529
|
"""
|
|
520
530
|
ret = TckglobalOutputs(
|
|
521
531
|
root=execution.output_file("."),
|
|
522
|
-
tracks=execution.output_file(params.get("tracks")),
|
|
523
|
-
fod=execution.output_file(params.get("fod")) if (params.get("fod") is not None) else None,
|
|
524
|
-
fiso=execution.output_file(params.get("fiso")) if (params.get("fiso") is not None) else None,
|
|
525
|
-
eext=execution.output_file(params.get("eext")) if (params.get("eext") is not None) else None,
|
|
526
|
-
etrend=execution.output_file(params.get("etrend")) if (params.get("etrend") is not None) else None,
|
|
532
|
+
tracks=execution.output_file(params.get("tracks", None)),
|
|
533
|
+
fod=execution.output_file(params.get("fod", None)) if (params.get("fod") is not None) else None,
|
|
534
|
+
fiso=execution.output_file(params.get("fiso", None)) if (params.get("fiso") is not None) else None,
|
|
535
|
+
eext=execution.output_file(params.get("eext", None)) if (params.get("eext") is not None) else None,
|
|
536
|
+
etrend=execution.output_file(params.get("etrend", None)) if (params.get("etrend") is not None) else None,
|
|
527
537
|
)
|
|
528
538
|
return ret
|
|
529
539
|
|
|
530
540
|
|
|
531
541
|
def tckglobal_execute(
|
|
532
542
|
params: TckglobalParameters,
|
|
533
|
-
|
|
543
|
+
runner: Runner | None = None,
|
|
534
544
|
) -> TckglobalOutputs:
|
|
535
545
|
"""
|
|
546
|
+
tckglobal
|
|
547
|
+
|
|
536
548
|
Multi-Shell Multi-Tissue Global Tractography.
|
|
537
549
|
|
|
538
550
|
This command will reconstruct the global white matter fibre tractogram that
|
|
@@ -563,10 +575,12 @@ def tckglobal_execute(
|
|
|
563
575
|
|
|
564
576
|
Args:
|
|
565
577
|
params: The parameters.
|
|
566
|
-
|
|
578
|
+
runner: Command runner.
|
|
567
579
|
Returns:
|
|
568
580
|
NamedTuple of outputs (described in `TckglobalOutputs`).
|
|
569
581
|
"""
|
|
582
|
+
runner = runner or get_global_runner()
|
|
583
|
+
execution = runner.start_execution(TCKGLOBAL_METADATA)
|
|
570
584
|
params = execution.params(params)
|
|
571
585
|
cargs = tckglobal_cargs(params, execution)
|
|
572
586
|
ret = tckglobal_outputs(params, execution)
|
|
@@ -610,6 +624,8 @@ def tckglobal(
|
|
|
610
624
|
runner: Runner | None = None,
|
|
611
625
|
) -> TckglobalOutputs:
|
|
612
626
|
"""
|
|
627
|
+
tckglobal
|
|
628
|
+
|
|
613
629
|
Multi-Shell Multi-Tissue Global Tractography.
|
|
614
630
|
|
|
615
631
|
This command will reconstruct the global white matter fibre tractogram that
|
|
@@ -706,8 +722,6 @@ def tckglobal(
|
|
|
706
722
|
Returns:
|
|
707
723
|
NamedTuple of outputs (described in `TckglobalOutputs`).
|
|
708
724
|
"""
|
|
709
|
-
runner = runner or get_global_runner()
|
|
710
|
-
execution = runner.start_execution(TCKGLOBAL_METADATA)
|
|
711
725
|
params = tckglobal_params(
|
|
712
726
|
grad=grad,
|
|
713
727
|
mask=mask,
|
|
@@ -742,17 +756,15 @@ def tckglobal(
|
|
|
742
756
|
response=response,
|
|
743
757
|
tracks=tracks,
|
|
744
758
|
)
|
|
745
|
-
return tckglobal_execute(params,
|
|
759
|
+
return tckglobal_execute(params, runner)
|
|
746
760
|
|
|
747
761
|
|
|
748
762
|
__all__ = [
|
|
749
763
|
"TCKGLOBAL_METADATA",
|
|
750
|
-
"TckglobalConfigParameters",
|
|
751
764
|
"TckglobalOutputs",
|
|
752
|
-
"TckglobalParameters",
|
|
753
|
-
"TckglobalRisoParameters",
|
|
754
765
|
"tckglobal",
|
|
755
766
|
"tckglobal_config_params",
|
|
767
|
+
"tckglobal_execute",
|
|
756
768
|
"tckglobal_params",
|
|
757
769
|
"tckglobal_riso_params",
|
|
758
770
|
]
|
niwrap_mrtrix/mrtrix/tckinfo.py
CHANGED
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
TCKINFO_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="0d096f25f496f4f8a788a3cdb85dd77497b69433.boutiques",
|
|
10
10
|
name="tckinfo",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,14 +14,32 @@ TCKINFO_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
TckinfoConfigParameters = typing.TypedDict('TckinfoConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
TckinfoConfigParametersTagged = typing.TypedDict('TckinfoConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
TckinfoParameters = typing.TypedDict('TckinfoParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/tckinfo"]],
|
|
30
|
+
"count": bool,
|
|
31
|
+
"info": bool,
|
|
32
|
+
"quiet": bool,
|
|
33
|
+
"debug": bool,
|
|
34
|
+
"force": bool,
|
|
35
|
+
"nthreads": typing.NotRequired[int | None],
|
|
36
|
+
"config": typing.NotRequired[list[TckinfoConfigParameters] | None],
|
|
37
|
+
"help": bool,
|
|
38
|
+
"version": bool,
|
|
39
|
+
"tracks": list[InputPathType],
|
|
40
|
+
})
|
|
41
|
+
TckinfoParametersTagged = typing.TypedDict('TckinfoParametersTagged', {
|
|
42
|
+
"@type": typing.Literal["mrtrix/tckinfo"],
|
|
25
43
|
"count": bool,
|
|
26
44
|
"info": bool,
|
|
27
45
|
"quiet": bool,
|
|
@@ -33,44 +51,12 @@ TckinfoParameters = typing.TypedDict('TckinfoParameters', {
|
|
|
33
51
|
"version": bool,
|
|
34
52
|
"tracks": list[InputPathType],
|
|
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
|
-
"tckinfo": tckinfo_cargs,
|
|
51
|
-
"config": tckinfo_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
54
|
|
|
69
55
|
|
|
70
56
|
def tckinfo_config_params(
|
|
71
57
|
key: str,
|
|
72
58
|
value: str,
|
|
73
|
-
) ->
|
|
59
|
+
) -> TckinfoConfigParametersTagged:
|
|
74
60
|
"""
|
|
75
61
|
Build parameters.
|
|
76
62
|
|
|
@@ -81,7 +67,7 @@ def tckinfo_config_params(
|
|
|
81
67
|
Parameter dictionary
|
|
82
68
|
"""
|
|
83
69
|
params = {
|
|
84
|
-
"
|
|
70
|
+
"@type": "config",
|
|
85
71
|
"key": key,
|
|
86
72
|
"value": value,
|
|
87
73
|
}
|
|
@@ -103,14 +89,14 @@ def tckinfo_config_cargs(
|
|
|
103
89
|
"""
|
|
104
90
|
cargs = []
|
|
105
91
|
cargs.append("-config")
|
|
106
|
-
cargs.append(params.get("key"))
|
|
107
|
-
cargs.append(params.get("value"))
|
|
92
|
+
cargs.append(params.get("key", None))
|
|
93
|
+
cargs.append(params.get("value", None))
|
|
108
94
|
return cargs
|
|
109
95
|
|
|
110
96
|
|
|
111
97
|
class TckinfoOutputs(typing.NamedTuple):
|
|
112
98
|
"""
|
|
113
|
-
Output object returned when calling `
|
|
99
|
+
Output object returned when calling `TckinfoParameters(...)`.
|
|
114
100
|
"""
|
|
115
101
|
root: OutputPathType
|
|
116
102
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -127,7 +113,7 @@ def tckinfo_params(
|
|
|
127
113
|
config: list[TckinfoConfigParameters] | None = None,
|
|
128
114
|
help_: bool = False,
|
|
129
115
|
version: bool = False,
|
|
130
|
-
) ->
|
|
116
|
+
) -> TckinfoParametersTagged:
|
|
131
117
|
"""
|
|
132
118
|
Build parameters.
|
|
133
119
|
|
|
@@ -150,7 +136,7 @@ def tckinfo_params(
|
|
|
150
136
|
Parameter dictionary
|
|
151
137
|
"""
|
|
152
138
|
params = {
|
|
153
|
-
"
|
|
139
|
+
"@type": "mrtrix/tckinfo",
|
|
154
140
|
"count": count,
|
|
155
141
|
"info": info,
|
|
156
142
|
"quiet": quiet,
|
|
@@ -182,28 +168,28 @@ def tckinfo_cargs(
|
|
|
182
168
|
"""
|
|
183
169
|
cargs = []
|
|
184
170
|
cargs.append("tckinfo")
|
|
185
|
-
if params.get("count"):
|
|
171
|
+
if params.get("count", False):
|
|
186
172
|
cargs.append("-count")
|
|
187
|
-
if params.get("info"):
|
|
173
|
+
if params.get("info", False):
|
|
188
174
|
cargs.append("-info")
|
|
189
|
-
if params.get("quiet"):
|
|
175
|
+
if params.get("quiet", False):
|
|
190
176
|
cargs.append("-quiet")
|
|
191
|
-
if params.get("debug"):
|
|
177
|
+
if params.get("debug", False):
|
|
192
178
|
cargs.append("-debug")
|
|
193
|
-
if params.get("force"):
|
|
179
|
+
if params.get("force", False):
|
|
194
180
|
cargs.append("-force")
|
|
195
|
-
if params.get("nthreads") is not None:
|
|
181
|
+
if params.get("nthreads", None) is not None:
|
|
196
182
|
cargs.extend([
|
|
197
183
|
"-nthreads",
|
|
198
|
-
str(params.get("nthreads"))
|
|
184
|
+
str(params.get("nthreads", None))
|
|
199
185
|
])
|
|
200
|
-
if params.get("config") is not None:
|
|
201
|
-
cargs.extend([a for c in [
|
|
202
|
-
if params.get("help"):
|
|
186
|
+
if params.get("config", None) is not None:
|
|
187
|
+
cargs.extend([a for c in [tckinfo_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
188
|
+
if params.get("help", False):
|
|
203
189
|
cargs.append("-help")
|
|
204
|
-
if params.get("version"):
|
|
190
|
+
if params.get("version", False):
|
|
205
191
|
cargs.append("-version")
|
|
206
|
-
cargs.extend([execution.input_file(f) for f in params.get("tracks")])
|
|
192
|
+
cargs.extend([execution.input_file(f) for f in params.get("tracks", None)])
|
|
207
193
|
return cargs
|
|
208
194
|
|
|
209
195
|
|
|
@@ -228,9 +214,11 @@ def tckinfo_outputs(
|
|
|
228
214
|
|
|
229
215
|
def tckinfo_execute(
|
|
230
216
|
params: TckinfoParameters,
|
|
231
|
-
|
|
217
|
+
runner: Runner | None = None,
|
|
232
218
|
) -> TckinfoOutputs:
|
|
233
219
|
"""
|
|
220
|
+
tckinfo
|
|
221
|
+
|
|
234
222
|
Print out information about a track file.
|
|
235
223
|
|
|
236
224
|
|
|
@@ -245,10 +233,12 @@ def tckinfo_execute(
|
|
|
245
233
|
|
|
246
234
|
Args:
|
|
247
235
|
params: The parameters.
|
|
248
|
-
|
|
236
|
+
runner: Command runner.
|
|
249
237
|
Returns:
|
|
250
238
|
NamedTuple of outputs (described in `TckinfoOutputs`).
|
|
251
239
|
"""
|
|
240
|
+
runner = runner or get_global_runner()
|
|
241
|
+
execution = runner.start_execution(TCKINFO_METADATA)
|
|
252
242
|
params = execution.params(params)
|
|
253
243
|
cargs = tckinfo_cargs(params, execution)
|
|
254
244
|
ret = tckinfo_outputs(params, execution)
|
|
@@ -270,6 +260,8 @@ def tckinfo(
|
|
|
270
260
|
runner: Runner | None = None,
|
|
271
261
|
) -> TckinfoOutputs:
|
|
272
262
|
"""
|
|
263
|
+
tckinfo
|
|
264
|
+
|
|
273
265
|
Print out information about a track file.
|
|
274
266
|
|
|
275
267
|
|
|
@@ -301,8 +293,6 @@ def tckinfo(
|
|
|
301
293
|
Returns:
|
|
302
294
|
NamedTuple of outputs (described in `TckinfoOutputs`).
|
|
303
295
|
"""
|
|
304
|
-
runner = runner or get_global_runner()
|
|
305
|
-
execution = runner.start_execution(TCKINFO_METADATA)
|
|
306
296
|
params = tckinfo_params(
|
|
307
297
|
count=count,
|
|
308
298
|
info=info,
|
|
@@ -315,15 +305,14 @@ def tckinfo(
|
|
|
315
305
|
version=version,
|
|
316
306
|
tracks=tracks,
|
|
317
307
|
)
|
|
318
|
-
return tckinfo_execute(params,
|
|
308
|
+
return tckinfo_execute(params, runner)
|
|
319
309
|
|
|
320
310
|
|
|
321
311
|
__all__ = [
|
|
322
312
|
"TCKINFO_METADATA",
|
|
323
|
-
"TckinfoConfigParameters",
|
|
324
313
|
"TckinfoOutputs",
|
|
325
|
-
"TckinfoParameters",
|
|
326
314
|
"tckinfo",
|
|
327
315
|
"tckinfo_config_params",
|
|
316
|
+
"tckinfo_execute",
|
|
328
317
|
"tckinfo_params",
|
|
329
318
|
]
|