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
|
CONNECTOME2TCK_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="ae2ef98104119bc0342c1596e2bea3d807ec75ef.boutiques",
|
|
10
10
|
name="connectome2tck",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,14 +14,41 @@ CONNECTOME2TCK_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
Connectome2tckConfigParameters = typing.TypedDict('Connectome2tckConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
Connectome2tckConfigParametersTagged = typing.TypedDict('Connectome2tckConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
Connectome2tckParameters = typing.TypedDict('Connectome2tckParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/connectome2tck"]],
|
|
30
|
+
"nodes": typing.NotRequired[list[int] | None],
|
|
31
|
+
"exclusive": bool,
|
|
32
|
+
"files": typing.NotRequired[str | None],
|
|
33
|
+
"exemplars": typing.NotRequired[InputPathType | None],
|
|
34
|
+
"keep_unassigned": bool,
|
|
35
|
+
"keep_self": bool,
|
|
36
|
+
"tck_weights_in": typing.NotRequired[InputPathType | None],
|
|
37
|
+
"prefix_tck_weights_out": typing.NotRequired[str | None],
|
|
38
|
+
"info": bool,
|
|
39
|
+
"quiet": bool,
|
|
40
|
+
"debug": bool,
|
|
41
|
+
"force": bool,
|
|
42
|
+
"nthreads": typing.NotRequired[int | None],
|
|
43
|
+
"config": typing.NotRequired[list[Connectome2tckConfigParameters] | None],
|
|
44
|
+
"help": bool,
|
|
45
|
+
"version": bool,
|
|
46
|
+
"tracks_in": InputPathType,
|
|
47
|
+
"assignments_in": InputPathType,
|
|
48
|
+
"prefix_out": str,
|
|
49
|
+
})
|
|
50
|
+
Connectome2tckParametersTagged = typing.TypedDict('Connectome2tckParametersTagged', {
|
|
51
|
+
"@type": typing.Literal["mrtrix/connectome2tck"],
|
|
25
52
|
"nodes": typing.NotRequired[list[int] | None],
|
|
26
53
|
"exclusive": bool,
|
|
27
54
|
"files": typing.NotRequired[str | None],
|
|
@@ -42,44 +69,12 @@ Connectome2tckParameters = typing.TypedDict('Connectome2tckParameters', {
|
|
|
42
69
|
"assignments_in": InputPathType,
|
|
43
70
|
"prefix_out": str,
|
|
44
71
|
})
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def dyn_cargs(
|
|
48
|
-
t: str,
|
|
49
|
-
) -> typing.Any:
|
|
50
|
-
"""
|
|
51
|
-
Get build cargs function by command type.
|
|
52
|
-
|
|
53
|
-
Args:
|
|
54
|
-
t: Command type.
|
|
55
|
-
Returns:
|
|
56
|
-
Build cargs function.
|
|
57
|
-
"""
|
|
58
|
-
return {
|
|
59
|
-
"connectome2tck": connectome2tck_cargs,
|
|
60
|
-
"config": connectome2tck_config_cargs,
|
|
61
|
-
}.get(t)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def dyn_outputs(
|
|
65
|
-
t: str,
|
|
66
|
-
) -> typing.Any:
|
|
67
|
-
"""
|
|
68
|
-
Get build outputs function by command type.
|
|
69
|
-
|
|
70
|
-
Args:
|
|
71
|
-
t: Command type.
|
|
72
|
-
Returns:
|
|
73
|
-
Build outputs function.
|
|
74
|
-
"""
|
|
75
|
-
return {
|
|
76
|
-
}.get(t)
|
|
77
72
|
|
|
78
73
|
|
|
79
74
|
def connectome2tck_config_params(
|
|
80
75
|
key: str,
|
|
81
76
|
value: str,
|
|
82
|
-
) ->
|
|
77
|
+
) -> Connectome2tckConfigParametersTagged:
|
|
83
78
|
"""
|
|
84
79
|
Build parameters.
|
|
85
80
|
|
|
@@ -90,7 +85,7 @@ def connectome2tck_config_params(
|
|
|
90
85
|
Parameter dictionary
|
|
91
86
|
"""
|
|
92
87
|
params = {
|
|
93
|
-
"
|
|
88
|
+
"@type": "config",
|
|
94
89
|
"key": key,
|
|
95
90
|
"value": value,
|
|
96
91
|
}
|
|
@@ -112,14 +107,14 @@ def connectome2tck_config_cargs(
|
|
|
112
107
|
"""
|
|
113
108
|
cargs = []
|
|
114
109
|
cargs.append("-config")
|
|
115
|
-
cargs.append(params.get("key"))
|
|
116
|
-
cargs.append(params.get("value"))
|
|
110
|
+
cargs.append(params.get("key", None))
|
|
111
|
+
cargs.append(params.get("value", None))
|
|
117
112
|
return cargs
|
|
118
113
|
|
|
119
114
|
|
|
120
115
|
class Connectome2tckOutputs(typing.NamedTuple):
|
|
121
116
|
"""
|
|
122
|
-
Output object returned when calling `
|
|
117
|
+
Output object returned when calling `Connectome2tckParameters(...)`.
|
|
123
118
|
"""
|
|
124
119
|
root: OutputPathType
|
|
125
120
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -145,7 +140,7 @@ def connectome2tck_params(
|
|
|
145
140
|
config: list[Connectome2tckConfigParameters] | None = None,
|
|
146
141
|
help_: bool = False,
|
|
147
142
|
version: bool = False,
|
|
148
|
-
) ->
|
|
143
|
+
) -> Connectome2tckParametersTagged:
|
|
149
144
|
"""
|
|
150
145
|
Build parameters.
|
|
151
146
|
|
|
@@ -191,7 +186,7 @@ def connectome2tck_params(
|
|
|
191
186
|
Parameter dictionary
|
|
192
187
|
"""
|
|
193
188
|
params = {
|
|
194
|
-
"
|
|
189
|
+
"@type": "mrtrix/connectome2tck",
|
|
195
190
|
"exclusive": exclusive,
|
|
196
191
|
"keep_unassigned": keep_unassigned,
|
|
197
192
|
"keep_self": keep_self,
|
|
@@ -237,59 +232,59 @@ def connectome2tck_cargs(
|
|
|
237
232
|
"""
|
|
238
233
|
cargs = []
|
|
239
234
|
cargs.append("connectome2tck")
|
|
240
|
-
if params.get("nodes") is not None:
|
|
235
|
+
if params.get("nodes", None) is not None:
|
|
241
236
|
cargs.extend([
|
|
242
237
|
"-nodes",
|
|
243
|
-
",".join(map(str, params.get("nodes")))
|
|
238
|
+
",".join(map(str, params.get("nodes", None)))
|
|
244
239
|
])
|
|
245
|
-
if params.get("exclusive"):
|
|
240
|
+
if params.get("exclusive", False):
|
|
246
241
|
cargs.append("-exclusive")
|
|
247
|
-
if params.get("files") is not None:
|
|
242
|
+
if params.get("files", None) is not None:
|
|
248
243
|
cargs.extend([
|
|
249
244
|
"-files",
|
|
250
|
-
params.get("files")
|
|
245
|
+
params.get("files", None)
|
|
251
246
|
])
|
|
252
|
-
if params.get("exemplars") is not None:
|
|
247
|
+
if params.get("exemplars", None) is not None:
|
|
253
248
|
cargs.extend([
|
|
254
249
|
"-exemplars",
|
|
255
|
-
execution.input_file(params.get("exemplars"))
|
|
250
|
+
execution.input_file(params.get("exemplars", None))
|
|
256
251
|
])
|
|
257
|
-
if params.get("keep_unassigned"):
|
|
252
|
+
if params.get("keep_unassigned", False):
|
|
258
253
|
cargs.append("-keep_unassigned")
|
|
259
|
-
if params.get("keep_self"):
|
|
254
|
+
if params.get("keep_self", False):
|
|
260
255
|
cargs.append("-keep_self")
|
|
261
|
-
if params.get("tck_weights_in") is not None:
|
|
256
|
+
if params.get("tck_weights_in", None) is not None:
|
|
262
257
|
cargs.extend([
|
|
263
258
|
"-tck_weights_in",
|
|
264
|
-
execution.input_file(params.get("tck_weights_in"))
|
|
259
|
+
execution.input_file(params.get("tck_weights_in", None))
|
|
265
260
|
])
|
|
266
|
-
if params.get("prefix_tck_weights_out") is not None:
|
|
261
|
+
if params.get("prefix_tck_weights_out", None) is not None:
|
|
267
262
|
cargs.extend([
|
|
268
263
|
"-prefix_tck_weights_out",
|
|
269
|
-
params.get("prefix_tck_weights_out")
|
|
264
|
+
params.get("prefix_tck_weights_out", None)
|
|
270
265
|
])
|
|
271
|
-
if params.get("info"):
|
|
266
|
+
if params.get("info", False):
|
|
272
267
|
cargs.append("-info")
|
|
273
|
-
if params.get("quiet"):
|
|
268
|
+
if params.get("quiet", False):
|
|
274
269
|
cargs.append("-quiet")
|
|
275
|
-
if params.get("debug"):
|
|
270
|
+
if params.get("debug", False):
|
|
276
271
|
cargs.append("-debug")
|
|
277
|
-
if params.get("force"):
|
|
272
|
+
if params.get("force", False):
|
|
278
273
|
cargs.append("-force")
|
|
279
|
-
if params.get("nthreads") is not None:
|
|
274
|
+
if params.get("nthreads", None) is not None:
|
|
280
275
|
cargs.extend([
|
|
281
276
|
"-nthreads",
|
|
282
|
-
str(params.get("nthreads"))
|
|
277
|
+
str(params.get("nthreads", None))
|
|
283
278
|
])
|
|
284
|
-
if params.get("config") is not None:
|
|
285
|
-
cargs.extend([a for c in [
|
|
286
|
-
if params.get("help"):
|
|
279
|
+
if params.get("config", None) is not None:
|
|
280
|
+
cargs.extend([a for c in [connectome2tck_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
281
|
+
if params.get("help", False):
|
|
287
282
|
cargs.append("-help")
|
|
288
|
-
if params.get("version"):
|
|
283
|
+
if params.get("version", False):
|
|
289
284
|
cargs.append("-version")
|
|
290
|
-
cargs.append(execution.input_file(params.get("tracks_in")))
|
|
291
|
-
cargs.append(execution.input_file(params.get("assignments_in")))
|
|
292
|
-
cargs.append(params.get("prefix_out"))
|
|
285
|
+
cargs.append(execution.input_file(params.get("tracks_in", None)))
|
|
286
|
+
cargs.append(execution.input_file(params.get("assignments_in", None)))
|
|
287
|
+
cargs.append(params.get("prefix_out", None))
|
|
293
288
|
return cargs
|
|
294
289
|
|
|
295
290
|
|
|
@@ -314,11 +309,13 @@ def connectome2tck_outputs(
|
|
|
314
309
|
|
|
315
310
|
def connectome2tck_execute(
|
|
316
311
|
params: Connectome2tckParameters,
|
|
317
|
-
|
|
312
|
+
runner: Runner | None = None,
|
|
318
313
|
) -> Connectome2tckOutputs:
|
|
319
314
|
"""
|
|
320
|
-
|
|
321
|
-
|
|
315
|
+
connectome2tck
|
|
316
|
+
|
|
317
|
+
Extract streamlines from a tractogram based on their assignment to
|
|
318
|
+
parcellated nodes.
|
|
322
319
|
|
|
323
320
|
The compulsory input file "assignments_in" should contain a text file where
|
|
324
321
|
there is one row for each streamline, and each row contains a list of
|
|
@@ -338,10 +335,12 @@ def connectome2tck_execute(
|
|
|
338
335
|
|
|
339
336
|
Args:
|
|
340
337
|
params: The parameters.
|
|
341
|
-
|
|
338
|
+
runner: Command runner.
|
|
342
339
|
Returns:
|
|
343
340
|
NamedTuple of outputs (described in `Connectome2tckOutputs`).
|
|
344
341
|
"""
|
|
342
|
+
runner = runner or get_global_runner()
|
|
343
|
+
execution = runner.start_execution(CONNECTOME2TCK_METADATA)
|
|
345
344
|
params = execution.params(params)
|
|
346
345
|
cargs = connectome2tck_cargs(params, execution)
|
|
347
346
|
ret = connectome2tck_outputs(params, execution)
|
|
@@ -372,8 +371,10 @@ def connectome2tck(
|
|
|
372
371
|
runner: Runner | None = None,
|
|
373
372
|
) -> Connectome2tckOutputs:
|
|
374
373
|
"""
|
|
375
|
-
|
|
376
|
-
|
|
374
|
+
connectome2tck
|
|
375
|
+
|
|
376
|
+
Extract streamlines from a tractogram based on their assignment to
|
|
377
|
+
parcellated nodes.
|
|
377
378
|
|
|
378
379
|
The compulsory input file "assignments_in" should contain a text file where
|
|
379
380
|
there is one row for each streamline, and each row contains a list of
|
|
@@ -433,8 +434,6 @@ def connectome2tck(
|
|
|
433
434
|
Returns:
|
|
434
435
|
NamedTuple of outputs (described in `Connectome2tckOutputs`).
|
|
435
436
|
"""
|
|
436
|
-
runner = runner or get_global_runner()
|
|
437
|
-
execution = runner.start_execution(CONNECTOME2TCK_METADATA)
|
|
438
437
|
params = connectome2tck_params(
|
|
439
438
|
nodes=nodes,
|
|
440
439
|
exclusive=exclusive,
|
|
@@ -456,15 +455,14 @@ def connectome2tck(
|
|
|
456
455
|
assignments_in=assignments_in,
|
|
457
456
|
prefix_out=prefix_out,
|
|
458
457
|
)
|
|
459
|
-
return connectome2tck_execute(params,
|
|
458
|
+
return connectome2tck_execute(params, runner)
|
|
460
459
|
|
|
461
460
|
|
|
462
461
|
__all__ = [
|
|
463
462
|
"CONNECTOME2TCK_METADATA",
|
|
464
|
-
"Connectome2tckConfigParameters",
|
|
465
463
|
"Connectome2tckOutputs",
|
|
466
|
-
"Connectome2tckParameters",
|
|
467
464
|
"connectome2tck",
|
|
468
465
|
"connectome2tck_config_params",
|
|
466
|
+
"connectome2tck_execute",
|
|
469
467
|
"connectome2tck_params",
|
|
470
468
|
]
|
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
CONNECTOMEEDIT_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="7462d968f7a03c022c8bae779dc4c0ddb21e6a0f.boutiques",
|
|
10
10
|
name="connectomeedit",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,14 +14,33 @@ CONNECTOMEEDIT_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
ConnectomeeditConfigParameters = typing.TypedDict('ConnectomeeditConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
ConnectomeeditConfigParametersTagged = typing.TypedDict('ConnectomeeditConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
ConnectomeeditParameters = typing.TypedDict('ConnectomeeditParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/connectomeedit"]],
|
|
30
|
+
"info": bool,
|
|
31
|
+
"quiet": bool,
|
|
32
|
+
"debug": bool,
|
|
33
|
+
"force": bool,
|
|
34
|
+
"nthreads": typing.NotRequired[int | None],
|
|
35
|
+
"config": typing.NotRequired[list[ConnectomeeditConfigParameters] | None],
|
|
36
|
+
"help": bool,
|
|
37
|
+
"version": bool,
|
|
38
|
+
"input": str,
|
|
39
|
+
"operation": str,
|
|
40
|
+
"output": str,
|
|
41
|
+
})
|
|
42
|
+
ConnectomeeditParametersTagged = typing.TypedDict('ConnectomeeditParametersTagged', {
|
|
43
|
+
"@type": typing.Literal["mrtrix/connectomeedit"],
|
|
25
44
|
"info": bool,
|
|
26
45
|
"quiet": bool,
|
|
27
46
|
"debug": bool,
|
|
@@ -34,44 +53,12 @@ ConnectomeeditParameters = typing.TypedDict('ConnectomeeditParameters', {
|
|
|
34
53
|
"operation": str,
|
|
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
|
-
"connectomeedit": connectomeedit_cargs,
|
|
52
|
-
"config": connectomeedit_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
|
-
}.get(t)
|
|
69
56
|
|
|
70
57
|
|
|
71
58
|
def connectomeedit_config_params(
|
|
72
59
|
key: str,
|
|
73
60
|
value: str,
|
|
74
|
-
) ->
|
|
61
|
+
) -> ConnectomeeditConfigParametersTagged:
|
|
75
62
|
"""
|
|
76
63
|
Build parameters.
|
|
77
64
|
|
|
@@ -82,7 +69,7 @@ def connectomeedit_config_params(
|
|
|
82
69
|
Parameter dictionary
|
|
83
70
|
"""
|
|
84
71
|
params = {
|
|
85
|
-
"
|
|
72
|
+
"@type": "config",
|
|
86
73
|
"key": key,
|
|
87
74
|
"value": value,
|
|
88
75
|
}
|
|
@@ -104,14 +91,14 @@ def connectomeedit_config_cargs(
|
|
|
104
91
|
"""
|
|
105
92
|
cargs = []
|
|
106
93
|
cargs.append("-config")
|
|
107
|
-
cargs.append(params.get("key"))
|
|
108
|
-
cargs.append(params.get("value"))
|
|
94
|
+
cargs.append(params.get("key", None))
|
|
95
|
+
cargs.append(params.get("value", None))
|
|
109
96
|
return cargs
|
|
110
97
|
|
|
111
98
|
|
|
112
99
|
class ConnectomeeditOutputs(typing.NamedTuple):
|
|
113
100
|
"""
|
|
114
|
-
Output object returned when calling `
|
|
101
|
+
Output object returned when calling `ConnectomeeditParameters(...)`.
|
|
115
102
|
"""
|
|
116
103
|
root: OutputPathType
|
|
117
104
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -129,7 +116,7 @@ def connectomeedit_params(
|
|
|
129
116
|
config: list[ConnectomeeditConfigParameters] | None = None,
|
|
130
117
|
help_: bool = False,
|
|
131
118
|
version: bool = False,
|
|
132
|
-
) ->
|
|
119
|
+
) -> ConnectomeeditParametersTagged:
|
|
133
120
|
"""
|
|
134
121
|
Build parameters.
|
|
135
122
|
|
|
@@ -154,7 +141,7 @@ def connectomeedit_params(
|
|
|
154
141
|
Parameter dictionary
|
|
155
142
|
"""
|
|
156
143
|
params = {
|
|
157
|
-
"
|
|
144
|
+
"@type": "mrtrix/connectomeedit",
|
|
158
145
|
"info": info,
|
|
159
146
|
"quiet": quiet,
|
|
160
147
|
"debug": debug,
|
|
@@ -187,28 +174,28 @@ def connectomeedit_cargs(
|
|
|
187
174
|
"""
|
|
188
175
|
cargs = []
|
|
189
176
|
cargs.append("connectomeedit")
|
|
190
|
-
if params.get("info"):
|
|
177
|
+
if params.get("info", False):
|
|
191
178
|
cargs.append("-info")
|
|
192
|
-
if params.get("quiet"):
|
|
179
|
+
if params.get("quiet", False):
|
|
193
180
|
cargs.append("-quiet")
|
|
194
|
-
if params.get("debug"):
|
|
181
|
+
if params.get("debug", False):
|
|
195
182
|
cargs.append("-debug")
|
|
196
|
-
if params.get("force"):
|
|
183
|
+
if params.get("force", False):
|
|
197
184
|
cargs.append("-force")
|
|
198
|
-
if params.get("nthreads") is not None:
|
|
185
|
+
if params.get("nthreads", None) is not None:
|
|
199
186
|
cargs.extend([
|
|
200
187
|
"-nthreads",
|
|
201
|
-
str(params.get("nthreads"))
|
|
188
|
+
str(params.get("nthreads", None))
|
|
202
189
|
])
|
|
203
|
-
if params.get("config") is not None:
|
|
204
|
-
cargs.extend([a for c in [
|
|
205
|
-
if params.get("help"):
|
|
190
|
+
if params.get("config", None) is not None:
|
|
191
|
+
cargs.extend([a for c in [connectomeedit_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
192
|
+
if params.get("help", False):
|
|
206
193
|
cargs.append("-help")
|
|
207
|
-
if params.get("version"):
|
|
194
|
+
if params.get("version", False):
|
|
208
195
|
cargs.append("-version")
|
|
209
|
-
cargs.append(params.get("input"))
|
|
210
|
-
cargs.append(params.get("operation"))
|
|
211
|
-
cargs.append(params.get("output"))
|
|
196
|
+
cargs.append(params.get("input", None))
|
|
197
|
+
cargs.append(params.get("operation", None))
|
|
198
|
+
cargs.append(params.get("output", None))
|
|
212
199
|
return cargs
|
|
213
200
|
|
|
214
201
|
|
|
@@ -233,9 +220,11 @@ def connectomeedit_outputs(
|
|
|
233
220
|
|
|
234
221
|
def connectomeedit_execute(
|
|
235
222
|
params: ConnectomeeditParameters,
|
|
236
|
-
|
|
223
|
+
runner: Runner | None = None,
|
|
237
224
|
) -> ConnectomeeditOutputs:
|
|
238
225
|
"""
|
|
226
|
+
connectomeedit
|
|
227
|
+
|
|
239
228
|
Perform basic operations on a connectome.
|
|
240
229
|
|
|
241
230
|
|
|
@@ -250,10 +239,12 @@ def connectomeedit_execute(
|
|
|
250
239
|
|
|
251
240
|
Args:
|
|
252
241
|
params: The parameters.
|
|
253
|
-
|
|
242
|
+
runner: Command runner.
|
|
254
243
|
Returns:
|
|
255
244
|
NamedTuple of outputs (described in `ConnectomeeditOutputs`).
|
|
256
245
|
"""
|
|
246
|
+
runner = runner or get_global_runner()
|
|
247
|
+
execution = runner.start_execution(CONNECTOMEEDIT_METADATA)
|
|
257
248
|
params = execution.params(params)
|
|
258
249
|
cargs = connectomeedit_cargs(params, execution)
|
|
259
250
|
ret = connectomeedit_outputs(params, execution)
|
|
@@ -276,6 +267,8 @@ def connectomeedit(
|
|
|
276
267
|
runner: Runner | None = None,
|
|
277
268
|
) -> ConnectomeeditOutputs:
|
|
278
269
|
"""
|
|
270
|
+
connectomeedit
|
|
271
|
+
|
|
279
272
|
Perform basic operations on a connectome.
|
|
280
273
|
|
|
281
274
|
|
|
@@ -309,8 +302,6 @@ def connectomeedit(
|
|
|
309
302
|
Returns:
|
|
310
303
|
NamedTuple of outputs (described in `ConnectomeeditOutputs`).
|
|
311
304
|
"""
|
|
312
|
-
runner = runner or get_global_runner()
|
|
313
|
-
execution = runner.start_execution(CONNECTOMEEDIT_METADATA)
|
|
314
305
|
params = connectomeedit_params(
|
|
315
306
|
info=info,
|
|
316
307
|
quiet=quiet,
|
|
@@ -324,15 +315,14 @@ def connectomeedit(
|
|
|
324
315
|
operation=operation,
|
|
325
316
|
output=output,
|
|
326
317
|
)
|
|
327
|
-
return connectomeedit_execute(params,
|
|
318
|
+
return connectomeedit_execute(params, runner)
|
|
328
319
|
|
|
329
320
|
|
|
330
321
|
__all__ = [
|
|
331
322
|
"CONNECTOMEEDIT_METADATA",
|
|
332
|
-
"ConnectomeeditConfigParameters",
|
|
333
323
|
"ConnectomeeditOutputs",
|
|
334
|
-
"ConnectomeeditParameters",
|
|
335
324
|
"connectomeedit",
|
|
336
325
|
"connectomeedit_config_params",
|
|
326
|
+
"connectomeedit_execute",
|
|
337
327
|
"connectomeedit_params",
|
|
338
328
|
]
|