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
|
FIXELCONVERT_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="e14b8ead7201552625ae27a34473502808101400.boutiques",
|
|
10
10
|
name="fixelconvert",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,38 +14,78 @@ FIXELCONVERT_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
FixelconvertConfigParameters = typing.TypedDict('FixelconvertConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
FixelconvertConfigParametersTagged = typing.TypedDict('FixelconvertConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
FixelconvertVariousStringParameters = typing.TypedDict('FixelconvertVariousStringParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["VariousString"]],
|
|
30
|
+
"obj": str,
|
|
31
|
+
})
|
|
32
|
+
FixelconvertVariousStringParametersTagged = typing.TypedDict('FixelconvertVariousStringParametersTagged', {
|
|
33
|
+
"@type": typing.Literal["VariousString"],
|
|
25
34
|
"obj": str,
|
|
26
35
|
})
|
|
27
36
|
|
|
28
37
|
|
|
29
38
|
FixelconvertVariousFileParameters = typing.TypedDict('FixelconvertVariousFileParameters', {
|
|
30
|
-
"
|
|
39
|
+
"@type": typing.NotRequired[typing.Literal["VariousFile"]],
|
|
40
|
+
"obj": InputPathType,
|
|
41
|
+
})
|
|
42
|
+
FixelconvertVariousFileParametersTagged = typing.TypedDict('FixelconvertVariousFileParametersTagged', {
|
|
43
|
+
"@type": typing.Literal["VariousFile"],
|
|
31
44
|
"obj": InputPathType,
|
|
32
45
|
})
|
|
33
46
|
|
|
34
47
|
|
|
35
48
|
FixelconvertVariousString1Parameters = typing.TypedDict('FixelconvertVariousString1Parameters', {
|
|
36
|
-
"
|
|
49
|
+
"@type": typing.NotRequired[typing.Literal["VariousString_1"]],
|
|
50
|
+
"obj": str,
|
|
51
|
+
})
|
|
52
|
+
FixelconvertVariousString1ParametersTagged = typing.TypedDict('FixelconvertVariousString1ParametersTagged', {
|
|
53
|
+
"@type": typing.Literal["VariousString_1"],
|
|
37
54
|
"obj": str,
|
|
38
55
|
})
|
|
39
56
|
|
|
40
57
|
|
|
41
58
|
FixelconvertVariousFile1Parameters = typing.TypedDict('FixelconvertVariousFile1Parameters', {
|
|
42
|
-
"
|
|
59
|
+
"@type": typing.NotRequired[typing.Literal["VariousFile_1"]],
|
|
60
|
+
"obj": InputPathType,
|
|
61
|
+
})
|
|
62
|
+
FixelconvertVariousFile1ParametersTagged = typing.TypedDict('FixelconvertVariousFile1ParametersTagged', {
|
|
63
|
+
"@type": typing.Literal["VariousFile_1"],
|
|
43
64
|
"obj": InputPathType,
|
|
44
65
|
})
|
|
45
66
|
|
|
46
67
|
|
|
47
68
|
FixelconvertParameters = typing.TypedDict('FixelconvertParameters', {
|
|
48
|
-
"
|
|
69
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/fixelconvert"]],
|
|
70
|
+
"name": typing.NotRequired[str | None],
|
|
71
|
+
"nii": bool,
|
|
72
|
+
"out_size": bool,
|
|
73
|
+
"template": typing.NotRequired[InputPathType | None],
|
|
74
|
+
"value": typing.NotRequired[InputPathType | None],
|
|
75
|
+
"in_size": typing.NotRequired[InputPathType | None],
|
|
76
|
+
"info": bool,
|
|
77
|
+
"quiet": bool,
|
|
78
|
+
"debug": bool,
|
|
79
|
+
"force": bool,
|
|
80
|
+
"nthreads": typing.NotRequired[int | None],
|
|
81
|
+
"config": typing.NotRequired[list[FixelconvertConfigParameters] | None],
|
|
82
|
+
"help": bool,
|
|
83
|
+
"version": bool,
|
|
84
|
+
"fixel_in": typing.Union[FixelconvertVariousStringParametersTagged, FixelconvertVariousFileParametersTagged],
|
|
85
|
+
"fixel_out": typing.Union[FixelconvertVariousString1ParametersTagged, FixelconvertVariousFile1ParametersTagged],
|
|
86
|
+
})
|
|
87
|
+
FixelconvertParametersTagged = typing.TypedDict('FixelconvertParametersTagged', {
|
|
88
|
+
"@type": typing.Literal["mrtrix/fixelconvert"],
|
|
49
89
|
"name": typing.NotRequired[str | None],
|
|
50
90
|
"nii": bool,
|
|
51
91
|
"out_size": bool,
|
|
@@ -60,12 +100,12 @@ FixelconvertParameters = typing.TypedDict('FixelconvertParameters', {
|
|
|
60
100
|
"config": typing.NotRequired[list[FixelconvertConfigParameters] | None],
|
|
61
101
|
"help": bool,
|
|
62
102
|
"version": bool,
|
|
63
|
-
"fixel_in": typing.Union[
|
|
64
|
-
"fixel_out": typing.Union[
|
|
103
|
+
"fixel_in": typing.Union[FixelconvertVariousStringParametersTagged, FixelconvertVariousFileParametersTagged],
|
|
104
|
+
"fixel_out": typing.Union[FixelconvertVariousString1ParametersTagged, FixelconvertVariousFile1ParametersTagged],
|
|
65
105
|
})
|
|
66
106
|
|
|
67
107
|
|
|
68
|
-
def
|
|
108
|
+
def fixelconvert_fixel_in_cargs_dyn_fn(
|
|
69
109
|
t: str,
|
|
70
110
|
) -> typing.Any:
|
|
71
111
|
"""
|
|
@@ -77,16 +117,44 @@ def dyn_cargs(
|
|
|
77
117
|
Build cargs function.
|
|
78
118
|
"""
|
|
79
119
|
return {
|
|
80
|
-
"fixelconvert": fixelconvert_cargs,
|
|
81
|
-
"config": fixelconvert_config_cargs,
|
|
82
120
|
"VariousString": fixelconvert_various_string_cargs,
|
|
83
121
|
"VariousFile": fixelconvert_various_file_cargs,
|
|
122
|
+
}.get(t)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def fixelconvert_fixel_in_outputs_dyn_fn(
|
|
126
|
+
t: str,
|
|
127
|
+
) -> typing.Any:
|
|
128
|
+
"""
|
|
129
|
+
Get build outputs function by command type.
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
t: Command type.
|
|
133
|
+
Returns:
|
|
134
|
+
Build outputs function.
|
|
135
|
+
"""
|
|
136
|
+
return {
|
|
137
|
+
}.get(t)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def fixelconvert_fixel_out_cargs_dyn_fn(
|
|
141
|
+
t: str,
|
|
142
|
+
) -> typing.Any:
|
|
143
|
+
"""
|
|
144
|
+
Get build cargs function by command type.
|
|
145
|
+
|
|
146
|
+
Args:
|
|
147
|
+
t: Command type.
|
|
148
|
+
Returns:
|
|
149
|
+
Build cargs function.
|
|
150
|
+
"""
|
|
151
|
+
return {
|
|
84
152
|
"VariousString_1": fixelconvert_various_string_1_cargs,
|
|
85
153
|
"VariousFile_1": fixelconvert_various_file_1_cargs,
|
|
86
154
|
}.get(t)
|
|
87
155
|
|
|
88
156
|
|
|
89
|
-
def
|
|
157
|
+
def fixelconvert_fixel_out_outputs_dyn_fn(
|
|
90
158
|
t: str,
|
|
91
159
|
) -> typing.Any:
|
|
92
160
|
"""
|
|
@@ -104,7 +172,7 @@ def dyn_outputs(
|
|
|
104
172
|
def fixelconvert_config_params(
|
|
105
173
|
key: str,
|
|
106
174
|
value: str,
|
|
107
|
-
) ->
|
|
175
|
+
) -> FixelconvertConfigParametersTagged:
|
|
108
176
|
"""
|
|
109
177
|
Build parameters.
|
|
110
178
|
|
|
@@ -115,7 +183,7 @@ def fixelconvert_config_params(
|
|
|
115
183
|
Parameter dictionary
|
|
116
184
|
"""
|
|
117
185
|
params = {
|
|
118
|
-
"
|
|
186
|
+
"@type": "config",
|
|
119
187
|
"key": key,
|
|
120
188
|
"value": value,
|
|
121
189
|
}
|
|
@@ -137,14 +205,14 @@ def fixelconvert_config_cargs(
|
|
|
137
205
|
"""
|
|
138
206
|
cargs = []
|
|
139
207
|
cargs.append("-config")
|
|
140
|
-
cargs.append(params.get("key"))
|
|
141
|
-
cargs.append(params.get("value"))
|
|
208
|
+
cargs.append(params.get("key", None))
|
|
209
|
+
cargs.append(params.get("value", None))
|
|
142
210
|
return cargs
|
|
143
211
|
|
|
144
212
|
|
|
145
213
|
def fixelconvert_various_string_params(
|
|
146
214
|
obj: str,
|
|
147
|
-
) ->
|
|
215
|
+
) -> FixelconvertVariousStringParametersTagged:
|
|
148
216
|
"""
|
|
149
217
|
Build parameters.
|
|
150
218
|
|
|
@@ -154,7 +222,7 @@ def fixelconvert_various_string_params(
|
|
|
154
222
|
Parameter dictionary
|
|
155
223
|
"""
|
|
156
224
|
params = {
|
|
157
|
-
"
|
|
225
|
+
"@type": "VariousString",
|
|
158
226
|
"obj": obj,
|
|
159
227
|
}
|
|
160
228
|
return params
|
|
@@ -174,13 +242,13 @@ def fixelconvert_various_string_cargs(
|
|
|
174
242
|
Command-line arguments.
|
|
175
243
|
"""
|
|
176
244
|
cargs = []
|
|
177
|
-
cargs.append(params.get("obj"))
|
|
245
|
+
cargs.append(params.get("obj", None))
|
|
178
246
|
return cargs
|
|
179
247
|
|
|
180
248
|
|
|
181
249
|
def fixelconvert_various_file_params(
|
|
182
250
|
obj: InputPathType,
|
|
183
|
-
) ->
|
|
251
|
+
) -> FixelconvertVariousFileParametersTagged:
|
|
184
252
|
"""
|
|
185
253
|
Build parameters.
|
|
186
254
|
|
|
@@ -190,7 +258,7 @@ def fixelconvert_various_file_params(
|
|
|
190
258
|
Parameter dictionary
|
|
191
259
|
"""
|
|
192
260
|
params = {
|
|
193
|
-
"
|
|
261
|
+
"@type": "VariousFile",
|
|
194
262
|
"obj": obj,
|
|
195
263
|
}
|
|
196
264
|
return params
|
|
@@ -210,13 +278,13 @@ def fixelconvert_various_file_cargs(
|
|
|
210
278
|
Command-line arguments.
|
|
211
279
|
"""
|
|
212
280
|
cargs = []
|
|
213
|
-
cargs.append(execution.input_file(params.get("obj")))
|
|
281
|
+
cargs.append(execution.input_file(params.get("obj", None)))
|
|
214
282
|
return cargs
|
|
215
283
|
|
|
216
284
|
|
|
217
285
|
def fixelconvert_various_string_1_params(
|
|
218
286
|
obj: str,
|
|
219
|
-
) ->
|
|
287
|
+
) -> FixelconvertVariousString1ParametersTagged:
|
|
220
288
|
"""
|
|
221
289
|
Build parameters.
|
|
222
290
|
|
|
@@ -226,7 +294,7 @@ def fixelconvert_various_string_1_params(
|
|
|
226
294
|
Parameter dictionary
|
|
227
295
|
"""
|
|
228
296
|
params = {
|
|
229
|
-
"
|
|
297
|
+
"@type": "VariousString_1",
|
|
230
298
|
"obj": obj,
|
|
231
299
|
}
|
|
232
300
|
return params
|
|
@@ -246,13 +314,13 @@ def fixelconvert_various_string_1_cargs(
|
|
|
246
314
|
Command-line arguments.
|
|
247
315
|
"""
|
|
248
316
|
cargs = []
|
|
249
|
-
cargs.append(params.get("obj"))
|
|
317
|
+
cargs.append(params.get("obj", None))
|
|
250
318
|
return cargs
|
|
251
319
|
|
|
252
320
|
|
|
253
321
|
def fixelconvert_various_file_1_params(
|
|
254
322
|
obj: InputPathType,
|
|
255
|
-
) ->
|
|
323
|
+
) -> FixelconvertVariousFile1ParametersTagged:
|
|
256
324
|
"""
|
|
257
325
|
Build parameters.
|
|
258
326
|
|
|
@@ -262,7 +330,7 @@ def fixelconvert_various_file_1_params(
|
|
|
262
330
|
Parameter dictionary
|
|
263
331
|
"""
|
|
264
332
|
params = {
|
|
265
|
-
"
|
|
333
|
+
"@type": "VariousFile_1",
|
|
266
334
|
"obj": obj,
|
|
267
335
|
}
|
|
268
336
|
return params
|
|
@@ -282,21 +350,21 @@ def fixelconvert_various_file_1_cargs(
|
|
|
282
350
|
Command-line arguments.
|
|
283
351
|
"""
|
|
284
352
|
cargs = []
|
|
285
|
-
cargs.append(execution.input_file(params.get("obj")))
|
|
353
|
+
cargs.append(execution.input_file(params.get("obj", None)))
|
|
286
354
|
return cargs
|
|
287
355
|
|
|
288
356
|
|
|
289
357
|
class FixelconvertOutputs(typing.NamedTuple):
|
|
290
358
|
"""
|
|
291
|
-
Output object returned when calling `
|
|
359
|
+
Output object returned when calling `FixelconvertParameters(...)`.
|
|
292
360
|
"""
|
|
293
361
|
root: OutputPathType
|
|
294
362
|
"""Output root folder. This is the root folder for all outputs."""
|
|
295
363
|
|
|
296
364
|
|
|
297
365
|
def fixelconvert_params(
|
|
298
|
-
fixel_in: typing.Union[
|
|
299
|
-
fixel_out: typing.Union[
|
|
366
|
+
fixel_in: typing.Union[FixelconvertVariousStringParametersTagged, FixelconvertVariousFileParametersTagged],
|
|
367
|
+
fixel_out: typing.Union[FixelconvertVariousString1ParametersTagged, FixelconvertVariousFile1ParametersTagged],
|
|
300
368
|
name: str | None = None,
|
|
301
369
|
nii: bool = False,
|
|
302
370
|
out_size: bool = False,
|
|
@@ -311,7 +379,7 @@ def fixelconvert_params(
|
|
|
311
379
|
config: list[FixelconvertConfigParameters] | None = None,
|
|
312
380
|
help_: bool = False,
|
|
313
381
|
version: bool = False,
|
|
314
|
-
) ->
|
|
382
|
+
) -> FixelconvertParametersTagged:
|
|
315
383
|
"""
|
|
316
384
|
Build parameters.
|
|
317
385
|
|
|
@@ -344,7 +412,7 @@ def fixelconvert_params(
|
|
|
344
412
|
Parameter dictionary
|
|
345
413
|
"""
|
|
346
414
|
params = {
|
|
347
|
-
"
|
|
415
|
+
"@type": "mrtrix/fixelconvert",
|
|
348
416
|
"nii": nii,
|
|
349
417
|
"out_size": out_size,
|
|
350
418
|
"info": info,
|
|
@@ -386,51 +454,51 @@ def fixelconvert_cargs(
|
|
|
386
454
|
"""
|
|
387
455
|
cargs = []
|
|
388
456
|
cargs.append("fixelconvert")
|
|
389
|
-
if params.get("name") is not None:
|
|
457
|
+
if params.get("name", None) is not None:
|
|
390
458
|
cargs.extend([
|
|
391
459
|
"-name",
|
|
392
|
-
params.get("name")
|
|
460
|
+
params.get("name", None)
|
|
393
461
|
])
|
|
394
|
-
if params.get("nii"):
|
|
462
|
+
if params.get("nii", False):
|
|
395
463
|
cargs.append("-nii")
|
|
396
|
-
if params.get("out_size"):
|
|
464
|
+
if params.get("out_size", False):
|
|
397
465
|
cargs.append("-out_size")
|
|
398
|
-
if params.get("template") is not None:
|
|
466
|
+
if params.get("template", None) is not None:
|
|
399
467
|
cargs.extend([
|
|
400
468
|
"-template",
|
|
401
|
-
execution.input_file(params.get("template"))
|
|
469
|
+
execution.input_file(params.get("template", None))
|
|
402
470
|
])
|
|
403
|
-
if params.get("value") is not None:
|
|
471
|
+
if params.get("value", None) is not None:
|
|
404
472
|
cargs.extend([
|
|
405
473
|
"-value",
|
|
406
|
-
execution.input_file(params.get("value"))
|
|
474
|
+
execution.input_file(params.get("value", None))
|
|
407
475
|
])
|
|
408
|
-
if params.get("in_size") is not None:
|
|
476
|
+
if params.get("in_size", None) is not None:
|
|
409
477
|
cargs.extend([
|
|
410
478
|
"-in_size",
|
|
411
|
-
execution.input_file(params.get("in_size"))
|
|
479
|
+
execution.input_file(params.get("in_size", None))
|
|
412
480
|
])
|
|
413
|
-
if params.get("info"):
|
|
481
|
+
if params.get("info", False):
|
|
414
482
|
cargs.append("-info")
|
|
415
|
-
if params.get("quiet"):
|
|
483
|
+
if params.get("quiet", False):
|
|
416
484
|
cargs.append("-quiet")
|
|
417
|
-
if params.get("debug"):
|
|
485
|
+
if params.get("debug", False):
|
|
418
486
|
cargs.append("-debug")
|
|
419
|
-
if params.get("force"):
|
|
487
|
+
if params.get("force", False):
|
|
420
488
|
cargs.append("-force")
|
|
421
|
-
if params.get("nthreads") is not None:
|
|
489
|
+
if params.get("nthreads", None) is not None:
|
|
422
490
|
cargs.extend([
|
|
423
491
|
"-nthreads",
|
|
424
|
-
str(params.get("nthreads"))
|
|
492
|
+
str(params.get("nthreads", None))
|
|
425
493
|
])
|
|
426
|
-
if params.get("config") is not None:
|
|
427
|
-
cargs.extend([a for c in [
|
|
428
|
-
if params.get("help"):
|
|
494
|
+
if params.get("config", None) is not None:
|
|
495
|
+
cargs.extend([a for c in [fixelconvert_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
496
|
+
if params.get("help", False):
|
|
429
497
|
cargs.append("-help")
|
|
430
|
-
if params.get("version"):
|
|
498
|
+
if params.get("version", False):
|
|
431
499
|
cargs.append("-version")
|
|
432
|
-
cargs.extend(
|
|
433
|
-
cargs.extend(
|
|
500
|
+
cargs.extend(fixelconvert_fixel_in_cargs_dyn_fn(params.get("fixel_in", None)["@type"])(params.get("fixel_in", None), execution))
|
|
501
|
+
cargs.extend(fixelconvert_fixel_out_cargs_dyn_fn(params.get("fixel_out", None)["@type"])(params.get("fixel_out", None), execution))
|
|
434
502
|
return cargs
|
|
435
503
|
|
|
436
504
|
|
|
@@ -455,9 +523,11 @@ def fixelconvert_outputs(
|
|
|
455
523
|
|
|
456
524
|
def fixelconvert_execute(
|
|
457
525
|
params: FixelconvertParameters,
|
|
458
|
-
|
|
526
|
+
runner: Runner | None = None,
|
|
459
527
|
) -> FixelconvertOutputs:
|
|
460
528
|
"""
|
|
529
|
+
fixelconvert
|
|
530
|
+
|
|
461
531
|
Convert between the old format fixel image (.msf / .msh) and the new fixel
|
|
462
532
|
directory format.
|
|
463
533
|
|
|
@@ -473,10 +543,12 @@ def fixelconvert_execute(
|
|
|
473
543
|
|
|
474
544
|
Args:
|
|
475
545
|
params: The parameters.
|
|
476
|
-
|
|
546
|
+
runner: Command runner.
|
|
477
547
|
Returns:
|
|
478
548
|
NamedTuple of outputs (described in `FixelconvertOutputs`).
|
|
479
549
|
"""
|
|
550
|
+
runner = runner or get_global_runner()
|
|
551
|
+
execution = runner.start_execution(FIXELCONVERT_METADATA)
|
|
480
552
|
params = execution.params(params)
|
|
481
553
|
cargs = fixelconvert_cargs(params, execution)
|
|
482
554
|
ret = fixelconvert_outputs(params, execution)
|
|
@@ -485,8 +557,8 @@ def fixelconvert_execute(
|
|
|
485
557
|
|
|
486
558
|
|
|
487
559
|
def fixelconvert(
|
|
488
|
-
fixel_in: typing.Union[
|
|
489
|
-
fixel_out: typing.Union[
|
|
560
|
+
fixel_in: typing.Union[FixelconvertVariousStringParametersTagged, FixelconvertVariousFileParametersTagged],
|
|
561
|
+
fixel_out: typing.Union[FixelconvertVariousString1ParametersTagged, FixelconvertVariousFile1ParametersTagged],
|
|
490
562
|
name: str | None = None,
|
|
491
563
|
nii: bool = False,
|
|
492
564
|
out_size: bool = False,
|
|
@@ -504,6 +576,8 @@ def fixelconvert(
|
|
|
504
576
|
runner: Runner | None = None,
|
|
505
577
|
) -> FixelconvertOutputs:
|
|
506
578
|
"""
|
|
579
|
+
fixelconvert
|
|
580
|
+
|
|
507
581
|
Convert between the old format fixel image (.msf / .msh) and the new fixel
|
|
508
582
|
directory format.
|
|
509
583
|
|
|
@@ -546,8 +620,6 @@ def fixelconvert(
|
|
|
546
620
|
Returns:
|
|
547
621
|
NamedTuple of outputs (described in `FixelconvertOutputs`).
|
|
548
622
|
"""
|
|
549
|
-
runner = runner or get_global_runner()
|
|
550
|
-
execution = runner.start_execution(FIXELCONVERT_METADATA)
|
|
551
623
|
params = fixelconvert_params(
|
|
552
624
|
name=name,
|
|
553
625
|
nii=nii,
|
|
@@ -566,20 +638,15 @@ def fixelconvert(
|
|
|
566
638
|
fixel_in=fixel_in,
|
|
567
639
|
fixel_out=fixel_out,
|
|
568
640
|
)
|
|
569
|
-
return fixelconvert_execute(params,
|
|
641
|
+
return fixelconvert_execute(params, runner)
|
|
570
642
|
|
|
571
643
|
|
|
572
644
|
__all__ = [
|
|
573
645
|
"FIXELCONVERT_METADATA",
|
|
574
|
-
"FixelconvertConfigParameters",
|
|
575
646
|
"FixelconvertOutputs",
|
|
576
|
-
"FixelconvertParameters",
|
|
577
|
-
"FixelconvertVariousFile1Parameters",
|
|
578
|
-
"FixelconvertVariousFileParameters",
|
|
579
|
-
"FixelconvertVariousString1Parameters",
|
|
580
|
-
"FixelconvertVariousStringParameters",
|
|
581
647
|
"fixelconvert",
|
|
582
648
|
"fixelconvert_config_params",
|
|
649
|
+
"fixelconvert_execute",
|
|
583
650
|
"fixelconvert_params",
|
|
584
651
|
"fixelconvert_various_file_1_params",
|
|
585
652
|
"fixelconvert_various_file_params",
|