niwrap-mrtrix 0.6.2__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.2.dist-info/METADATA +0 -8
- niwrap_mrtrix-0.6.2.dist-info/RECORD +0 -119
- niwrap_mrtrix-0.6.2.dist-info/WHEEL +0 -4
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
DWIEXTRACT_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="0021ca6ba5d653dd2d95adc256257bec0ea68206.boutiques",
|
|
10
10
|
name="dwiextract",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,47 +14,75 @@ DWIEXTRACT_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
DwiextractFslgradParameters = typing.TypedDict('DwiextractFslgradParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["fslgrad"]],
|
|
18
|
+
"bvecs": InputPathType,
|
|
19
|
+
"bvals": InputPathType,
|
|
20
|
+
})
|
|
21
|
+
DwiextractFslgradParametersTagged = typing.TypedDict('DwiextractFslgradParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["fslgrad"],
|
|
18
23
|
"bvecs": InputPathType,
|
|
19
24
|
"bvals": InputPathType,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
DwiextractExportGradFslParameters = typing.TypedDict('DwiextractExportGradFslParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["export_grad_fsl"]],
|
|
30
|
+
"bvecs_path": str,
|
|
31
|
+
"bvals_path": str,
|
|
32
|
+
})
|
|
33
|
+
DwiextractExportGradFslParametersTagged = typing.TypedDict('DwiextractExportGradFslParametersTagged', {
|
|
34
|
+
"@type": typing.Literal["export_grad_fsl"],
|
|
25
35
|
"bvecs_path": str,
|
|
26
36
|
"bvals_path": str,
|
|
27
37
|
})
|
|
28
38
|
|
|
29
39
|
|
|
30
40
|
DwiextractImportPeEddyParameters = typing.TypedDict('DwiextractImportPeEddyParameters', {
|
|
31
|
-
"
|
|
41
|
+
"@type": typing.NotRequired[typing.Literal["import_pe_eddy"]],
|
|
42
|
+
"config": InputPathType,
|
|
43
|
+
"indices": InputPathType,
|
|
44
|
+
})
|
|
45
|
+
DwiextractImportPeEddyParametersTagged = typing.TypedDict('DwiextractImportPeEddyParametersTagged', {
|
|
46
|
+
"@type": typing.Literal["import_pe_eddy"],
|
|
32
47
|
"config": InputPathType,
|
|
33
48
|
"indices": InputPathType,
|
|
34
49
|
})
|
|
35
50
|
|
|
36
51
|
|
|
37
52
|
DwiextractVariousStringParameters = typing.TypedDict('DwiextractVariousStringParameters', {
|
|
38
|
-
"
|
|
53
|
+
"@type": typing.NotRequired[typing.Literal["VariousString"]],
|
|
54
|
+
"obj": str,
|
|
55
|
+
})
|
|
56
|
+
DwiextractVariousStringParametersTagged = typing.TypedDict('DwiextractVariousStringParametersTagged', {
|
|
57
|
+
"@type": typing.Literal["VariousString"],
|
|
39
58
|
"obj": str,
|
|
40
59
|
})
|
|
41
60
|
|
|
42
61
|
|
|
43
62
|
DwiextractVariousFileParameters = typing.TypedDict('DwiextractVariousFileParameters', {
|
|
44
|
-
"
|
|
63
|
+
"@type": typing.NotRequired[typing.Literal["VariousFile"]],
|
|
64
|
+
"obj": InputPathType,
|
|
65
|
+
})
|
|
66
|
+
DwiextractVariousFileParametersTagged = typing.TypedDict('DwiextractVariousFileParametersTagged', {
|
|
67
|
+
"@type": typing.Literal["VariousFile"],
|
|
45
68
|
"obj": InputPathType,
|
|
46
69
|
})
|
|
47
70
|
|
|
48
71
|
|
|
49
72
|
DwiextractConfigParameters = typing.TypedDict('DwiextractConfigParameters', {
|
|
50
|
-
"
|
|
73
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
74
|
+
"key": str,
|
|
75
|
+
"value": str,
|
|
76
|
+
})
|
|
77
|
+
DwiextractConfigParametersTagged = typing.TypedDict('DwiextractConfigParametersTagged', {
|
|
78
|
+
"@type": typing.Literal["config"],
|
|
51
79
|
"key": str,
|
|
52
80
|
"value": str,
|
|
53
81
|
})
|
|
54
82
|
|
|
55
83
|
|
|
56
84
|
DwiextractParameters = typing.TypedDict('DwiextractParameters', {
|
|
57
|
-
"
|
|
85
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/dwiextract"]],
|
|
58
86
|
"bzero": bool,
|
|
59
87
|
"no_bzero": bool,
|
|
60
88
|
"singleshell": bool,
|
|
@@ -66,7 +94,32 @@ DwiextractParameters = typing.TypedDict('DwiextractParameters', {
|
|
|
66
94
|
"import_pe_table": typing.NotRequired[InputPathType | None],
|
|
67
95
|
"import_pe_eddy": typing.NotRequired[DwiextractImportPeEddyParameters | None],
|
|
68
96
|
"pe": typing.NotRequired[list[float] | None],
|
|
69
|
-
"strides": typing.NotRequired[typing.Union[
|
|
97
|
+
"strides": typing.NotRequired[typing.Union[DwiextractVariousStringParametersTagged, DwiextractVariousFileParametersTagged] | None],
|
|
98
|
+
"info": bool,
|
|
99
|
+
"quiet": bool,
|
|
100
|
+
"debug": bool,
|
|
101
|
+
"force": bool,
|
|
102
|
+
"nthreads": typing.NotRequired[int | None],
|
|
103
|
+
"config": typing.NotRequired[list[DwiextractConfigParameters] | None],
|
|
104
|
+
"help": bool,
|
|
105
|
+
"version": bool,
|
|
106
|
+
"input": InputPathType,
|
|
107
|
+
"output": str,
|
|
108
|
+
})
|
|
109
|
+
DwiextractParametersTagged = typing.TypedDict('DwiextractParametersTagged', {
|
|
110
|
+
"@type": typing.Literal["mrtrix/dwiextract"],
|
|
111
|
+
"bzero": bool,
|
|
112
|
+
"no_bzero": bool,
|
|
113
|
+
"singleshell": bool,
|
|
114
|
+
"grad": typing.NotRequired[InputPathType | None],
|
|
115
|
+
"fslgrad": typing.NotRequired[DwiextractFslgradParameters | None],
|
|
116
|
+
"shells": typing.NotRequired[list[float] | None],
|
|
117
|
+
"export_grad_mrtrix": typing.NotRequired[str | None],
|
|
118
|
+
"export_grad_fsl": typing.NotRequired[DwiextractExportGradFslParameters | None],
|
|
119
|
+
"import_pe_table": typing.NotRequired[InputPathType | None],
|
|
120
|
+
"import_pe_eddy": typing.NotRequired[DwiextractImportPeEddyParameters | None],
|
|
121
|
+
"pe": typing.NotRequired[list[float] | None],
|
|
122
|
+
"strides": typing.NotRequired[typing.Union[DwiextractVariousStringParametersTagged, DwiextractVariousFileParametersTagged] | None],
|
|
70
123
|
"info": bool,
|
|
71
124
|
"quiet": bool,
|
|
72
125
|
"debug": bool,
|
|
@@ -80,7 +133,7 @@ DwiextractParameters = typing.TypedDict('DwiextractParameters', {
|
|
|
80
133
|
})
|
|
81
134
|
|
|
82
135
|
|
|
83
|
-
def
|
|
136
|
+
def dwiextract_strides_cargs_dyn_fn(
|
|
84
137
|
t: str,
|
|
85
138
|
) -> typing.Any:
|
|
86
139
|
"""
|
|
@@ -92,17 +145,12 @@ def dyn_cargs(
|
|
|
92
145
|
Build cargs function.
|
|
93
146
|
"""
|
|
94
147
|
return {
|
|
95
|
-
"dwiextract": dwiextract_cargs,
|
|
96
|
-
"fslgrad": dwiextract_fslgrad_cargs,
|
|
97
|
-
"export_grad_fsl": dwiextract_export_grad_fsl_cargs,
|
|
98
|
-
"import_pe_eddy": dwiextract_import_pe_eddy_cargs,
|
|
99
148
|
"VariousString": dwiextract_various_string_cargs,
|
|
100
149
|
"VariousFile": dwiextract_various_file_cargs,
|
|
101
|
-
"config": dwiextract_config_cargs,
|
|
102
150
|
}.get(t)
|
|
103
151
|
|
|
104
152
|
|
|
105
|
-
def
|
|
153
|
+
def dwiextract_strides_outputs_dyn_fn(
|
|
106
154
|
t: str,
|
|
107
155
|
) -> typing.Any:
|
|
108
156
|
"""
|
|
@@ -114,15 +162,13 @@ def dyn_outputs(
|
|
|
114
162
|
Build outputs function.
|
|
115
163
|
"""
|
|
116
164
|
return {
|
|
117
|
-
"dwiextract": dwiextract_outputs,
|
|
118
|
-
"export_grad_fsl": dwiextract_export_grad_fsl_outputs,
|
|
119
165
|
}.get(t)
|
|
120
166
|
|
|
121
167
|
|
|
122
168
|
def dwiextract_fslgrad_params(
|
|
123
169
|
bvecs: InputPathType,
|
|
124
170
|
bvals: InputPathType,
|
|
125
|
-
) ->
|
|
171
|
+
) -> DwiextractFslgradParametersTagged:
|
|
126
172
|
"""
|
|
127
173
|
Build parameters.
|
|
128
174
|
|
|
@@ -139,7 +185,7 @@ def dwiextract_fslgrad_params(
|
|
|
139
185
|
Parameter dictionary
|
|
140
186
|
"""
|
|
141
187
|
params = {
|
|
142
|
-
"
|
|
188
|
+
"@type": "fslgrad",
|
|
143
189
|
"bvecs": bvecs,
|
|
144
190
|
"bvals": bvals,
|
|
145
191
|
}
|
|
@@ -161,8 +207,8 @@ def dwiextract_fslgrad_cargs(
|
|
|
161
207
|
"""
|
|
162
208
|
cargs = []
|
|
163
209
|
cargs.append("-fslgrad")
|
|
164
|
-
cargs.append(execution.input_file(params.get("bvecs")))
|
|
165
|
-
cargs.append(execution.input_file(params.get("bvals")))
|
|
210
|
+
cargs.append(execution.input_file(params.get("bvecs", None)))
|
|
211
|
+
cargs.append(execution.input_file(params.get("bvals", None)))
|
|
166
212
|
return cargs
|
|
167
213
|
|
|
168
214
|
|
|
@@ -183,7 +229,7 @@ class DwiextractExportGradFslOutputs(typing.NamedTuple):
|
|
|
183
229
|
def dwiextract_export_grad_fsl_params(
|
|
184
230
|
bvecs_path: str,
|
|
185
231
|
bvals_path: str,
|
|
186
|
-
) ->
|
|
232
|
+
) -> DwiextractExportGradFslParametersTagged:
|
|
187
233
|
"""
|
|
188
234
|
Build parameters.
|
|
189
235
|
|
|
@@ -196,7 +242,7 @@ def dwiextract_export_grad_fsl_params(
|
|
|
196
242
|
Parameter dictionary
|
|
197
243
|
"""
|
|
198
244
|
params = {
|
|
199
|
-
"
|
|
245
|
+
"@type": "export_grad_fsl",
|
|
200
246
|
"bvecs_path": bvecs_path,
|
|
201
247
|
"bvals_path": bvals_path,
|
|
202
248
|
}
|
|
@@ -218,8 +264,8 @@ def dwiextract_export_grad_fsl_cargs(
|
|
|
218
264
|
"""
|
|
219
265
|
cargs = []
|
|
220
266
|
cargs.append("-export_grad_fsl")
|
|
221
|
-
cargs.append(params.get("bvecs_path"))
|
|
222
|
-
cargs.append(params.get("bvals_path"))
|
|
267
|
+
cargs.append(params.get("bvecs_path", None))
|
|
268
|
+
cargs.append(params.get("bvals_path", None))
|
|
223
269
|
return cargs
|
|
224
270
|
|
|
225
271
|
|
|
@@ -238,8 +284,8 @@ def dwiextract_export_grad_fsl_outputs(
|
|
|
238
284
|
"""
|
|
239
285
|
ret = DwiextractExportGradFslOutputs(
|
|
240
286
|
root=execution.output_file("."),
|
|
241
|
-
bvecs_path=execution.output_file(params.get("bvecs_path")),
|
|
242
|
-
bvals_path=execution.output_file(params.get("bvals_path")),
|
|
287
|
+
bvecs_path=execution.output_file(params.get("bvecs_path", None)),
|
|
288
|
+
bvals_path=execution.output_file(params.get("bvals_path", None)),
|
|
243
289
|
)
|
|
244
290
|
return ret
|
|
245
291
|
|
|
@@ -247,7 +293,7 @@ def dwiextract_export_grad_fsl_outputs(
|
|
|
247
293
|
def dwiextract_import_pe_eddy_params(
|
|
248
294
|
config: InputPathType,
|
|
249
295
|
indices: InputPathType,
|
|
250
|
-
) ->
|
|
296
|
+
) -> DwiextractImportPeEddyParametersTagged:
|
|
251
297
|
"""
|
|
252
298
|
Build parameters.
|
|
253
299
|
|
|
@@ -260,7 +306,7 @@ def dwiextract_import_pe_eddy_params(
|
|
|
260
306
|
Parameter dictionary
|
|
261
307
|
"""
|
|
262
308
|
params = {
|
|
263
|
-
"
|
|
309
|
+
"@type": "import_pe_eddy",
|
|
264
310
|
"config": config,
|
|
265
311
|
"indices": indices,
|
|
266
312
|
}
|
|
@@ -282,14 +328,14 @@ def dwiextract_import_pe_eddy_cargs(
|
|
|
282
328
|
"""
|
|
283
329
|
cargs = []
|
|
284
330
|
cargs.append("-import_pe_eddy")
|
|
285
|
-
cargs.append(execution.input_file(params.get("config")))
|
|
286
|
-
cargs.append(execution.input_file(params.get("indices")))
|
|
331
|
+
cargs.append(execution.input_file(params.get("config", None)))
|
|
332
|
+
cargs.append(execution.input_file(params.get("indices", None)))
|
|
287
333
|
return cargs
|
|
288
334
|
|
|
289
335
|
|
|
290
336
|
def dwiextract_various_string_params(
|
|
291
337
|
obj: str,
|
|
292
|
-
) ->
|
|
338
|
+
) -> DwiextractVariousStringParametersTagged:
|
|
293
339
|
"""
|
|
294
340
|
Build parameters.
|
|
295
341
|
|
|
@@ -299,7 +345,7 @@ def dwiextract_various_string_params(
|
|
|
299
345
|
Parameter dictionary
|
|
300
346
|
"""
|
|
301
347
|
params = {
|
|
302
|
-
"
|
|
348
|
+
"@type": "VariousString",
|
|
303
349
|
"obj": obj,
|
|
304
350
|
}
|
|
305
351
|
return params
|
|
@@ -319,13 +365,13 @@ def dwiextract_various_string_cargs(
|
|
|
319
365
|
Command-line arguments.
|
|
320
366
|
"""
|
|
321
367
|
cargs = []
|
|
322
|
-
cargs.append(params.get("obj"))
|
|
368
|
+
cargs.append(params.get("obj", None))
|
|
323
369
|
return cargs
|
|
324
370
|
|
|
325
371
|
|
|
326
372
|
def dwiextract_various_file_params(
|
|
327
373
|
obj: InputPathType,
|
|
328
|
-
) ->
|
|
374
|
+
) -> DwiextractVariousFileParametersTagged:
|
|
329
375
|
"""
|
|
330
376
|
Build parameters.
|
|
331
377
|
|
|
@@ -335,7 +381,7 @@ def dwiextract_various_file_params(
|
|
|
335
381
|
Parameter dictionary
|
|
336
382
|
"""
|
|
337
383
|
params = {
|
|
338
|
-
"
|
|
384
|
+
"@type": "VariousFile",
|
|
339
385
|
"obj": obj,
|
|
340
386
|
}
|
|
341
387
|
return params
|
|
@@ -355,14 +401,14 @@ def dwiextract_various_file_cargs(
|
|
|
355
401
|
Command-line arguments.
|
|
356
402
|
"""
|
|
357
403
|
cargs = []
|
|
358
|
-
cargs.append(execution.input_file(params.get("obj")))
|
|
404
|
+
cargs.append(execution.input_file(params.get("obj", None)))
|
|
359
405
|
return cargs
|
|
360
406
|
|
|
361
407
|
|
|
362
408
|
def dwiextract_config_params(
|
|
363
409
|
key: str,
|
|
364
410
|
value: str,
|
|
365
|
-
) ->
|
|
411
|
+
) -> DwiextractConfigParametersTagged:
|
|
366
412
|
"""
|
|
367
413
|
Build parameters.
|
|
368
414
|
|
|
@@ -373,7 +419,7 @@ def dwiextract_config_params(
|
|
|
373
419
|
Parameter dictionary
|
|
374
420
|
"""
|
|
375
421
|
params = {
|
|
376
|
-
"
|
|
422
|
+
"@type": "config",
|
|
377
423
|
"key": key,
|
|
378
424
|
"value": value,
|
|
379
425
|
}
|
|
@@ -395,14 +441,14 @@ def dwiextract_config_cargs(
|
|
|
395
441
|
"""
|
|
396
442
|
cargs = []
|
|
397
443
|
cargs.append("-config")
|
|
398
|
-
cargs.append(params.get("key"))
|
|
399
|
-
cargs.append(params.get("value"))
|
|
444
|
+
cargs.append(params.get("key", None))
|
|
445
|
+
cargs.append(params.get("value", None))
|
|
400
446
|
return cargs
|
|
401
447
|
|
|
402
448
|
|
|
403
449
|
class DwiextractOutputs(typing.NamedTuple):
|
|
404
450
|
"""
|
|
405
|
-
Output object returned when calling `
|
|
451
|
+
Output object returned when calling `DwiextractParameters(...)`.
|
|
406
452
|
"""
|
|
407
453
|
root: OutputPathType
|
|
408
454
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -428,7 +474,7 @@ def dwiextract_params(
|
|
|
428
474
|
import_pe_table: InputPathType | None = None,
|
|
429
475
|
import_pe_eddy: DwiextractImportPeEddyParameters | None = None,
|
|
430
476
|
pe: list[float] | None = None,
|
|
431
|
-
strides: typing.Union[
|
|
477
|
+
strides: typing.Union[DwiextractVariousStringParametersTagged, DwiextractVariousFileParametersTagged] | None = None,
|
|
432
478
|
info: bool = False,
|
|
433
479
|
quiet: bool = False,
|
|
434
480
|
debug: bool = False,
|
|
@@ -437,7 +483,7 @@ def dwiextract_params(
|
|
|
437
483
|
config: list[DwiextractConfigParameters] | None = None,
|
|
438
484
|
help_: bool = False,
|
|
439
485
|
version: bool = False,
|
|
440
|
-
) ->
|
|
486
|
+
) -> DwiextractParametersTagged:
|
|
441
487
|
"""
|
|
442
488
|
Build parameters.
|
|
443
489
|
|
|
@@ -502,7 +548,7 @@ def dwiextract_params(
|
|
|
502
548
|
Parameter dictionary
|
|
503
549
|
"""
|
|
504
550
|
params = {
|
|
505
|
-
"
|
|
551
|
+
"@type": "mrtrix/dwiextract",
|
|
506
552
|
"bzero": bzero,
|
|
507
553
|
"no_bzero": no_bzero,
|
|
508
554
|
"singleshell": singleshell,
|
|
@@ -555,69 +601,69 @@ def dwiextract_cargs(
|
|
|
555
601
|
"""
|
|
556
602
|
cargs = []
|
|
557
603
|
cargs.append("dwiextract")
|
|
558
|
-
if params.get("bzero"):
|
|
604
|
+
if params.get("bzero", False):
|
|
559
605
|
cargs.append("-bzero")
|
|
560
|
-
if params.get("no_bzero"):
|
|
606
|
+
if params.get("no_bzero", False):
|
|
561
607
|
cargs.append("-no_bzero")
|
|
562
|
-
if params.get("singleshell"):
|
|
608
|
+
if params.get("singleshell", False):
|
|
563
609
|
cargs.append("-singleshell")
|
|
564
|
-
if params.get("grad") is not None:
|
|
610
|
+
if params.get("grad", None) is not None:
|
|
565
611
|
cargs.extend([
|
|
566
612
|
"-grad",
|
|
567
|
-
execution.input_file(params.get("grad"))
|
|
613
|
+
execution.input_file(params.get("grad", None))
|
|
568
614
|
])
|
|
569
|
-
if params.get("fslgrad") is not None:
|
|
570
|
-
cargs.extend(
|
|
571
|
-
if params.get("shells") is not None:
|
|
615
|
+
if params.get("fslgrad", None) is not None:
|
|
616
|
+
cargs.extend(dwiextract_fslgrad_cargs(params.get("fslgrad", None), execution))
|
|
617
|
+
if params.get("shells", None) is not None:
|
|
572
618
|
cargs.extend([
|
|
573
619
|
"-shells",
|
|
574
|
-
",".join(map(str, params.get("shells")))
|
|
620
|
+
",".join(map(str, params.get("shells", None)))
|
|
575
621
|
])
|
|
576
|
-
if params.get("export_grad_mrtrix") is not None:
|
|
622
|
+
if params.get("export_grad_mrtrix", None) is not None:
|
|
577
623
|
cargs.extend([
|
|
578
624
|
"-export_grad_mrtrix",
|
|
579
|
-
params.get("export_grad_mrtrix")
|
|
625
|
+
params.get("export_grad_mrtrix", None)
|
|
580
626
|
])
|
|
581
|
-
if params.get("export_grad_fsl") is not None:
|
|
582
|
-
cargs.extend(
|
|
583
|
-
if params.get("import_pe_table") is not None:
|
|
627
|
+
if params.get("export_grad_fsl", None) is not None:
|
|
628
|
+
cargs.extend(dwiextract_export_grad_fsl_cargs(params.get("export_grad_fsl", None), execution))
|
|
629
|
+
if params.get("import_pe_table", None) is not None:
|
|
584
630
|
cargs.extend([
|
|
585
631
|
"-import_pe_table",
|
|
586
|
-
execution.input_file(params.get("import_pe_table"))
|
|
632
|
+
execution.input_file(params.get("import_pe_table", None))
|
|
587
633
|
])
|
|
588
|
-
if params.get("import_pe_eddy") is not None:
|
|
589
|
-
cargs.extend(
|
|
590
|
-
if params.get("pe") is not None:
|
|
634
|
+
if params.get("import_pe_eddy", None) is not None:
|
|
635
|
+
cargs.extend(dwiextract_import_pe_eddy_cargs(params.get("import_pe_eddy", None), execution))
|
|
636
|
+
if params.get("pe", None) is not None:
|
|
591
637
|
cargs.extend([
|
|
592
638
|
"-pe",
|
|
593
|
-
",".join(map(str, params.get("pe")))
|
|
639
|
+
",".join(map(str, params.get("pe", None)))
|
|
594
640
|
])
|
|
595
|
-
if params.get("strides") is not None:
|
|
641
|
+
if params.get("strides", None) is not None:
|
|
596
642
|
cargs.extend([
|
|
597
643
|
"-strides",
|
|
598
|
-
*
|
|
644
|
+
*dwiextract_strides_cargs_dyn_fn(params.get("strides", None)["@type"])(params.get("strides", None), execution)
|
|
599
645
|
])
|
|
600
|
-
if params.get("info"):
|
|
646
|
+
if params.get("info", False):
|
|
601
647
|
cargs.append("-info")
|
|
602
|
-
if params.get("quiet"):
|
|
648
|
+
if params.get("quiet", False):
|
|
603
649
|
cargs.append("-quiet")
|
|
604
|
-
if params.get("debug"):
|
|
650
|
+
if params.get("debug", False):
|
|
605
651
|
cargs.append("-debug")
|
|
606
|
-
if params.get("force"):
|
|
652
|
+
if params.get("force", False):
|
|
607
653
|
cargs.append("-force")
|
|
608
|
-
if params.get("nthreads") is not None:
|
|
654
|
+
if params.get("nthreads", None) is not None:
|
|
609
655
|
cargs.extend([
|
|
610
656
|
"-nthreads",
|
|
611
|
-
str(params.get("nthreads"))
|
|
657
|
+
str(params.get("nthreads", None))
|
|
612
658
|
])
|
|
613
|
-
if params.get("config") is not None:
|
|
614
|
-
cargs.extend([a for c in [
|
|
615
|
-
if params.get("help"):
|
|
659
|
+
if params.get("config", None) is not None:
|
|
660
|
+
cargs.extend([a for c in [dwiextract_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
661
|
+
if params.get("help", False):
|
|
616
662
|
cargs.append("-help")
|
|
617
|
-
if params.get("version"):
|
|
663
|
+
if params.get("version", False):
|
|
618
664
|
cargs.append("-version")
|
|
619
|
-
cargs.append(execution.input_file(params.get("input")))
|
|
620
|
-
cargs.append(params.get("output"))
|
|
665
|
+
cargs.append(execution.input_file(params.get("input", None)))
|
|
666
|
+
cargs.append(params.get("output", None))
|
|
621
667
|
return cargs
|
|
622
668
|
|
|
623
669
|
|
|
@@ -636,20 +682,22 @@ def dwiextract_outputs(
|
|
|
636
682
|
"""
|
|
637
683
|
ret = DwiextractOutputs(
|
|
638
684
|
root=execution.output_file("."),
|
|
639
|
-
output=execution.output_file(params.get("output")),
|
|
640
|
-
export_grad_mrtrix=execution.output_file(params.get("export_grad_mrtrix")) if (params.get("export_grad_mrtrix") is not None) else None,
|
|
641
|
-
export_grad_fsl=
|
|
685
|
+
output=execution.output_file(params.get("output", None)),
|
|
686
|
+
export_grad_mrtrix=execution.output_file(params.get("export_grad_mrtrix", None)) if (params.get("export_grad_mrtrix") is not None) else None,
|
|
687
|
+
export_grad_fsl=dwiextract_export_grad_fsl_outputs(params.get("export_grad_fsl"), execution) if params.get("export_grad_fsl") else None,
|
|
642
688
|
)
|
|
643
689
|
return ret
|
|
644
690
|
|
|
645
691
|
|
|
646
692
|
def dwiextract_execute(
|
|
647
693
|
params: DwiextractParameters,
|
|
648
|
-
|
|
694
|
+
runner: Runner | None = None,
|
|
649
695
|
) -> DwiextractOutputs:
|
|
650
696
|
"""
|
|
651
|
-
|
|
652
|
-
|
|
697
|
+
dwiextract
|
|
698
|
+
|
|
699
|
+
Extract diffusion-weighted volumes, b=0 volumes, or certain shells from a
|
|
700
|
+
DWI dataset.
|
|
653
701
|
|
|
654
702
|
|
|
655
703
|
|
|
@@ -663,10 +711,12 @@ def dwiextract_execute(
|
|
|
663
711
|
|
|
664
712
|
Args:
|
|
665
713
|
params: The parameters.
|
|
666
|
-
|
|
714
|
+
runner: Command runner.
|
|
667
715
|
Returns:
|
|
668
716
|
NamedTuple of outputs (described in `DwiextractOutputs`).
|
|
669
717
|
"""
|
|
718
|
+
runner = runner or get_global_runner()
|
|
719
|
+
execution = runner.start_execution(DWIEXTRACT_METADATA)
|
|
670
720
|
params = execution.params(params)
|
|
671
721
|
cargs = dwiextract_cargs(params, execution)
|
|
672
722
|
ret = dwiextract_outputs(params, execution)
|
|
@@ -688,7 +738,7 @@ def dwiextract(
|
|
|
688
738
|
import_pe_table: InputPathType | None = None,
|
|
689
739
|
import_pe_eddy: DwiextractImportPeEddyParameters | None = None,
|
|
690
740
|
pe: list[float] | None = None,
|
|
691
|
-
strides: typing.Union[
|
|
741
|
+
strides: typing.Union[DwiextractVariousStringParametersTagged, DwiextractVariousFileParametersTagged] | None = None,
|
|
692
742
|
info: bool = False,
|
|
693
743
|
quiet: bool = False,
|
|
694
744
|
debug: bool = False,
|
|
@@ -700,8 +750,10 @@ def dwiextract(
|
|
|
700
750
|
runner: Runner | None = None,
|
|
701
751
|
) -> DwiextractOutputs:
|
|
702
752
|
"""
|
|
703
|
-
|
|
704
|
-
|
|
753
|
+
dwiextract
|
|
754
|
+
|
|
755
|
+
Extract diffusion-weighted volumes, b=0 volumes, or certain shells from a
|
|
756
|
+
DWI dataset.
|
|
705
757
|
|
|
706
758
|
|
|
707
759
|
|
|
@@ -774,8 +826,6 @@ def dwiextract(
|
|
|
774
826
|
Returns:
|
|
775
827
|
NamedTuple of outputs (described in `DwiextractOutputs`).
|
|
776
828
|
"""
|
|
777
|
-
runner = runner or get_global_runner()
|
|
778
|
-
execution = runner.start_execution(DWIEXTRACT_METADATA)
|
|
779
829
|
params = dwiextract_params(
|
|
780
830
|
bzero=bzero,
|
|
781
831
|
no_bzero=no_bzero,
|
|
@@ -800,22 +850,16 @@ def dwiextract(
|
|
|
800
850
|
input_=input_,
|
|
801
851
|
output=output,
|
|
802
852
|
)
|
|
803
|
-
return dwiextract_execute(params,
|
|
853
|
+
return dwiextract_execute(params, runner)
|
|
804
854
|
|
|
805
855
|
|
|
806
856
|
__all__ = [
|
|
807
857
|
"DWIEXTRACT_METADATA",
|
|
808
|
-
"DwiextractConfigParameters",
|
|
809
858
|
"DwiextractExportGradFslOutputs",
|
|
810
|
-
"DwiextractExportGradFslParameters",
|
|
811
|
-
"DwiextractFslgradParameters",
|
|
812
|
-
"DwiextractImportPeEddyParameters",
|
|
813
859
|
"DwiextractOutputs",
|
|
814
|
-
"DwiextractParameters",
|
|
815
|
-
"DwiextractVariousFileParameters",
|
|
816
|
-
"DwiextractVariousStringParameters",
|
|
817
860
|
"dwiextract",
|
|
818
861
|
"dwiextract_config_params",
|
|
862
|
+
"dwiextract_execute",
|
|
819
863
|
"dwiextract_export_grad_fsl_params",
|
|
820
864
|
"dwiextract_fslgrad_params",
|
|
821
865
|
"dwiextract_import_pe_eddy_params",
|