niwrap-mrtrix3tissue 0.8.4__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.
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""
|
|
2
|
+
MRTrix3Tissue
|
|
3
|
+
|
|
4
|
+
MRtrix3Tissue is a fork of the MRtrix3 project. It aims to add capabilities for
|
|
5
|
+
3-Tissue CSD modelling and analysis to a complete version of the MRtrix3
|
|
6
|
+
software.
|
|
7
|
+
|
|
8
|
+
Author: MRTrix3Tissue Developers
|
|
9
|
+
|
|
10
|
+
URL: https://3tissue.github.io/
|
|
11
|
+
"""
|
|
12
|
+
# This file was auto generated by Styx.
|
|
13
|
+
# Do not edit this file directly.
|
|
14
|
+
|
|
15
|
+
from .ss3t_csd_beta1 import *
|
|
16
|
+
from styxdefs import Runner as _Runner
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def execute(
|
|
20
|
+
params: dict,
|
|
21
|
+
runner: _Runner | None = None,
|
|
22
|
+
) -> None:
|
|
23
|
+
"""
|
|
24
|
+
Run a command in this package dynamically from a params object.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
params: The parameters.
|
|
28
|
+
runner: Command runner.
|
|
29
|
+
"""
|
|
30
|
+
return {
|
|
31
|
+
"mrtrix3tissue/ss3t_csd_beta1": ss3t_csd_beta1_execute,
|
|
32
|
+
}[params["@type"]](params, runner)
|
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
# This file was auto generated by Styx.
|
|
2
|
+
# Do not edit this file directly.
|
|
3
|
+
|
|
4
|
+
import typing
|
|
5
|
+
import pathlib
|
|
6
|
+
from styxdefs import *
|
|
7
|
+
|
|
8
|
+
SS3T_CSD_BETA1_METADATA = Metadata(
|
|
9
|
+
id="1232a653007a6a29f9cc9f7f319bd002a791411a.boutiques",
|
|
10
|
+
name="ss3t_csd_beta1",
|
|
11
|
+
package="mrtrix3tissue",
|
|
12
|
+
container_image_tag="brainlife/3tissue:5.2.8",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
_Ss3tCsdBeta1ConfigParamsDictNoTag = typing.TypedDict('_Ss3tCsdBeta1ConfigParamsDictNoTag', {
|
|
17
|
+
"key": str,
|
|
18
|
+
"value": str,
|
|
19
|
+
})
|
|
20
|
+
Ss3tCsdBeta1ConfigParamsDictTagged = typing.TypedDict('Ss3tCsdBeta1ConfigParamsDictTagged', {
|
|
21
|
+
"@type": typing.Literal["config"],
|
|
22
|
+
"key": str,
|
|
23
|
+
"value": str,
|
|
24
|
+
})
|
|
25
|
+
Ss3tCsdBeta1ConfigParamsDict = _Ss3tCsdBeta1ConfigParamsDictNoTag | Ss3tCsdBeta1ConfigParamsDictTagged
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
_Ss3tCsdBeta1ResponseOdfParamsDictNoTag = typing.TypedDict('_Ss3tCsdBeta1ResponseOdfParamsDictNoTag', {
|
|
29
|
+
"response": InputPathType,
|
|
30
|
+
"odf": str,
|
|
31
|
+
})
|
|
32
|
+
Ss3tCsdBeta1ResponseOdfParamsDictTagged = typing.TypedDict('Ss3tCsdBeta1ResponseOdfParamsDictTagged', {
|
|
33
|
+
"@type": typing.Literal["response_odf"],
|
|
34
|
+
"response": InputPathType,
|
|
35
|
+
"odf": str,
|
|
36
|
+
})
|
|
37
|
+
Ss3tCsdBeta1ResponseOdfParamsDict = _Ss3tCsdBeta1ResponseOdfParamsDictNoTag | Ss3tCsdBeta1ResponseOdfParamsDictTagged
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
_Ss3tCsdBeta1ParamsDictNoTag = typing.TypedDict('_Ss3tCsdBeta1ParamsDictNoTag', {
|
|
41
|
+
"mask": typing.NotRequired[InputPathType | None],
|
|
42
|
+
"bzero_pct": typing.NotRequired[float | None],
|
|
43
|
+
"niter": typing.NotRequired[int | None],
|
|
44
|
+
"info": bool,
|
|
45
|
+
"quiet": bool,
|
|
46
|
+
"debug": bool,
|
|
47
|
+
"force": bool,
|
|
48
|
+
"nthreads": typing.NotRequired[int | None],
|
|
49
|
+
"config": typing.NotRequired[list[Ss3tCsdBeta1ConfigParamsDict] | None],
|
|
50
|
+
"help": bool,
|
|
51
|
+
"version": bool,
|
|
52
|
+
"dwi": InputPathType,
|
|
53
|
+
"response_odf": list[Ss3tCsdBeta1ResponseOdfParamsDict],
|
|
54
|
+
})
|
|
55
|
+
Ss3tCsdBeta1ParamsDictTagged = typing.TypedDict('Ss3tCsdBeta1ParamsDictTagged', {
|
|
56
|
+
"@type": typing.Literal["mrtrix3tissue/ss3t_csd_beta1"],
|
|
57
|
+
"mask": typing.NotRequired[InputPathType | None],
|
|
58
|
+
"bzero_pct": typing.NotRequired[float | None],
|
|
59
|
+
"niter": typing.NotRequired[int | None],
|
|
60
|
+
"info": bool,
|
|
61
|
+
"quiet": bool,
|
|
62
|
+
"debug": bool,
|
|
63
|
+
"force": bool,
|
|
64
|
+
"nthreads": typing.NotRequired[int | None],
|
|
65
|
+
"config": typing.NotRequired[list[Ss3tCsdBeta1ConfigParamsDict] | None],
|
|
66
|
+
"help": bool,
|
|
67
|
+
"version": bool,
|
|
68
|
+
"dwi": InputPathType,
|
|
69
|
+
"response_odf": list[Ss3tCsdBeta1ResponseOdfParamsDict],
|
|
70
|
+
})
|
|
71
|
+
Ss3tCsdBeta1ParamsDict = _Ss3tCsdBeta1ParamsDictNoTag | Ss3tCsdBeta1ParamsDictTagged
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def ss3t_csd_beta1_config(
|
|
75
|
+
key: str,
|
|
76
|
+
value: str,
|
|
77
|
+
) -> Ss3tCsdBeta1ConfigParamsDictTagged:
|
|
78
|
+
"""
|
|
79
|
+
Build parameters.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
83
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
84
|
+
Returns:
|
|
85
|
+
Parameter dictionary
|
|
86
|
+
"""
|
|
87
|
+
params = {
|
|
88
|
+
"@type": "config",
|
|
89
|
+
"key": key,
|
|
90
|
+
"value": value,
|
|
91
|
+
}
|
|
92
|
+
return params
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def ss3t_csd_beta1_config_validate(
|
|
96
|
+
params: typing.Any,
|
|
97
|
+
) -> None:
|
|
98
|
+
"""
|
|
99
|
+
Validate parameters. Throws an error if `params` is not a valid
|
|
100
|
+
`Ss3tCsdBeta1ConfigParamsDict` object.
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
params: The parameters object to validate.
|
|
104
|
+
"""
|
|
105
|
+
if params is None or not isinstance(params, dict):
|
|
106
|
+
raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
|
|
107
|
+
if params.get("key", None) is None:
|
|
108
|
+
raise StyxValidationError("`key` must not be None")
|
|
109
|
+
if not isinstance(params["key"], str):
|
|
110
|
+
raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
|
|
111
|
+
if params.get("value", None) is None:
|
|
112
|
+
raise StyxValidationError("`value` must not be None")
|
|
113
|
+
if not isinstance(params["value"], str):
|
|
114
|
+
raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def ss3t_csd_beta1_config_cargs(
|
|
118
|
+
params: Ss3tCsdBeta1ConfigParamsDict,
|
|
119
|
+
execution: Execution,
|
|
120
|
+
) -> list[str]:
|
|
121
|
+
"""
|
|
122
|
+
Build command-line arguments from parameters.
|
|
123
|
+
|
|
124
|
+
Args:
|
|
125
|
+
params: The parameters.
|
|
126
|
+
execution: The execution object for resolving input paths.
|
|
127
|
+
Returns:
|
|
128
|
+
Command-line arguments.
|
|
129
|
+
"""
|
|
130
|
+
cargs = []
|
|
131
|
+
cargs.append("-config")
|
|
132
|
+
cargs.append(params.get("key", None))
|
|
133
|
+
cargs.append(params.get("value", None))
|
|
134
|
+
return cargs
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class Ss3tCsdBeta1ResponseOdfOutputs(typing.NamedTuple):
|
|
138
|
+
"""
|
|
139
|
+
Output object returned when calling `list[Ss3tCsdBeta1ResponseOdfParamsDict](...)`.
|
|
140
|
+
"""
|
|
141
|
+
root: OutputPathType
|
|
142
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
143
|
+
odf: OutputPathType
|
|
144
|
+
"""output ODF image"""
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def ss3t_csd_beta1_response_odf(
|
|
148
|
+
response: InputPathType,
|
|
149
|
+
odf: str,
|
|
150
|
+
) -> Ss3tCsdBeta1ResponseOdfParamsDictTagged:
|
|
151
|
+
"""
|
|
152
|
+
Build parameters.
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
response: input tissue response.
|
|
156
|
+
odf: output ODF image.
|
|
157
|
+
Returns:
|
|
158
|
+
Parameter dictionary
|
|
159
|
+
"""
|
|
160
|
+
params = {
|
|
161
|
+
"@type": "response_odf",
|
|
162
|
+
"response": response,
|
|
163
|
+
"odf": odf,
|
|
164
|
+
}
|
|
165
|
+
return params
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def ss3t_csd_beta1_response_odf_validate(
|
|
169
|
+
params: typing.Any,
|
|
170
|
+
) -> None:
|
|
171
|
+
"""
|
|
172
|
+
Validate parameters. Throws an error if `params` is not a valid
|
|
173
|
+
`Ss3tCsdBeta1ResponseOdfParamsDict` object.
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
params: The parameters object to validate.
|
|
177
|
+
"""
|
|
178
|
+
if params is None or not isinstance(params, dict):
|
|
179
|
+
raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
|
|
180
|
+
if params.get("response", None) is None:
|
|
181
|
+
raise StyxValidationError("`response` must not be None")
|
|
182
|
+
if not isinstance(params["response"], (pathlib.Path, str)):
|
|
183
|
+
raise StyxValidationError(f'`response` has the wrong type: Received `{type(params.get("response", None))}` expected `InputPathType`')
|
|
184
|
+
if params.get("odf", None) is None:
|
|
185
|
+
raise StyxValidationError("`odf` must not be None")
|
|
186
|
+
if not isinstance(params["odf"], str):
|
|
187
|
+
raise StyxValidationError(f'`odf` has the wrong type: Received `{type(params.get("odf", None))}` expected `str`')
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def ss3t_csd_beta1_response_odf_cargs(
|
|
191
|
+
params: Ss3tCsdBeta1ResponseOdfParamsDict,
|
|
192
|
+
execution: Execution,
|
|
193
|
+
) -> list[str]:
|
|
194
|
+
"""
|
|
195
|
+
Build command-line arguments from parameters.
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
params: The parameters.
|
|
199
|
+
execution: The execution object for resolving input paths.
|
|
200
|
+
Returns:
|
|
201
|
+
Command-line arguments.
|
|
202
|
+
"""
|
|
203
|
+
cargs = []
|
|
204
|
+
cargs.append(execution.input_file(params.get("response", None)))
|
|
205
|
+
cargs.append(params.get("odf", None))
|
|
206
|
+
return cargs
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def ss3t_csd_beta1_response_odf_outputs(
|
|
210
|
+
params: Ss3tCsdBeta1ResponseOdfParamsDict,
|
|
211
|
+
execution: Execution,
|
|
212
|
+
) -> Ss3tCsdBeta1ResponseOdfOutputs:
|
|
213
|
+
"""
|
|
214
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
215
|
+
|
|
216
|
+
Args:
|
|
217
|
+
params: The parameters.
|
|
218
|
+
execution: The execution object for resolving input paths.
|
|
219
|
+
Returns:
|
|
220
|
+
Outputs object.
|
|
221
|
+
"""
|
|
222
|
+
ret = Ss3tCsdBeta1ResponseOdfOutputs(
|
|
223
|
+
root=execution.output_file("."),
|
|
224
|
+
odf=execution.output_file(params.get("odf", None)),
|
|
225
|
+
)
|
|
226
|
+
return ret
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class Ss3tCsdBeta1Outputs(typing.NamedTuple):
|
|
230
|
+
"""
|
|
231
|
+
Output object returned when calling `Ss3tCsdBeta1ParamsDict(...)`.
|
|
232
|
+
"""
|
|
233
|
+
root: OutputPathType
|
|
234
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
235
|
+
response_odf: list[Ss3tCsdBeta1ResponseOdfOutputs]
|
|
236
|
+
"""Outputs from `ss3t_csd_beta1_response_odf_outputs`.This is a list of
|
|
237
|
+
outputs with the same length and order as the inputs."""
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def ss3t_csd_beta1_params(
|
|
241
|
+
dwi: InputPathType,
|
|
242
|
+
response_odf: list[Ss3tCsdBeta1ResponseOdfParamsDict],
|
|
243
|
+
mask: InputPathType | None = None,
|
|
244
|
+
bzero_pct: float | None = None,
|
|
245
|
+
niter: int | None = None,
|
|
246
|
+
info: bool = False,
|
|
247
|
+
quiet: bool = False,
|
|
248
|
+
debug: bool = False,
|
|
249
|
+
force: bool = False,
|
|
250
|
+
nthreads: int | None = None,
|
|
251
|
+
config: list[Ss3tCsdBeta1ConfigParamsDict] | None = None,
|
|
252
|
+
help_: bool = False,
|
|
253
|
+
version: bool = False,
|
|
254
|
+
) -> Ss3tCsdBeta1ParamsDictTagged:
|
|
255
|
+
"""
|
|
256
|
+
Build parameters.
|
|
257
|
+
|
|
258
|
+
Args:
|
|
259
|
+
dwi: the input diffusion-weighted image.
|
|
260
|
+
response_odf: pairs of input tissue response and output ODF images.
|
|
261
|
+
mask: only perform computation within the specified binary brain mask\
|
|
262
|
+
image.
|
|
263
|
+
bzero_pct: the threshold below which the amplitude of the FOD is\
|
|
264
|
+
assumed to be zero, expressed as an absolute amplitude (default = 0).
|
|
265
|
+
niter: the maximum number of iterations to perform for each voxel\
|
|
266
|
+
(default = 50). Use '-niter 0' for a linear unconstrained spherical\
|
|
267
|
+
deconvolution.
|
|
268
|
+
info: display information messages.
|
|
269
|
+
quiet: do not display information messages or progress status;\
|
|
270
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
271
|
+
environment variable to a non-empty string.
|
|
272
|
+
debug: display debugging messages.
|
|
273
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
274
|
+
input and output might cause unexpected behaviour).
|
|
275
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
276
|
+
(set to 0 to disable multi-threading).
|
|
277
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
278
|
+
help_: display this information page and exit.
|
|
279
|
+
version: display version information and exit.
|
|
280
|
+
Returns:
|
|
281
|
+
Parameter dictionary
|
|
282
|
+
"""
|
|
283
|
+
params = {
|
|
284
|
+
"@type": "mrtrix3tissue/ss3t_csd_beta1",
|
|
285
|
+
"info": info,
|
|
286
|
+
"quiet": quiet,
|
|
287
|
+
"debug": debug,
|
|
288
|
+
"force": force,
|
|
289
|
+
"help": help_,
|
|
290
|
+
"version": version,
|
|
291
|
+
"dwi": dwi,
|
|
292
|
+
"response_odf": response_odf,
|
|
293
|
+
}
|
|
294
|
+
if mask is not None:
|
|
295
|
+
params["mask"] = mask
|
|
296
|
+
if bzero_pct is not None:
|
|
297
|
+
params["bzero_pct"] = bzero_pct
|
|
298
|
+
if niter is not None:
|
|
299
|
+
params["niter"] = niter
|
|
300
|
+
if nthreads is not None:
|
|
301
|
+
params["nthreads"] = nthreads
|
|
302
|
+
if config is not None:
|
|
303
|
+
params["config"] = config
|
|
304
|
+
return params
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
def ss3t_csd_beta1_validate(
|
|
308
|
+
params: typing.Any,
|
|
309
|
+
) -> None:
|
|
310
|
+
"""
|
|
311
|
+
Validate parameters. Throws an error if `params` is not a valid
|
|
312
|
+
`Ss3tCsdBeta1ParamsDict` object.
|
|
313
|
+
|
|
314
|
+
Args:
|
|
315
|
+
params: The parameters object to validate.
|
|
316
|
+
"""
|
|
317
|
+
if params is None or not isinstance(params, dict):
|
|
318
|
+
raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
|
|
319
|
+
if params.get("mask", None) is not None:
|
|
320
|
+
if not isinstance(params["mask"], (pathlib.Path, str)):
|
|
321
|
+
raise StyxValidationError(f'`mask` has the wrong type: Received `{type(params.get("mask", None))}` expected `InputPathType | None`')
|
|
322
|
+
if params.get("bzero_pct", None) is not None:
|
|
323
|
+
if not isinstance(params["bzero_pct"], (float, int)):
|
|
324
|
+
raise StyxValidationError(f'`bzero_pct` has the wrong type: Received `{type(params.get("bzero_pct", None))}` expected `float | None`')
|
|
325
|
+
if params.get("niter", None) is not None:
|
|
326
|
+
if not isinstance(params["niter"], int):
|
|
327
|
+
raise StyxValidationError(f'`niter` has the wrong type: Received `{type(params.get("niter", None))}` expected `int | None`')
|
|
328
|
+
if params.get("info", False) is None:
|
|
329
|
+
raise StyxValidationError("`info` must not be None")
|
|
330
|
+
if not isinstance(params["info"], bool):
|
|
331
|
+
raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
|
|
332
|
+
if params.get("quiet", False) is None:
|
|
333
|
+
raise StyxValidationError("`quiet` must not be None")
|
|
334
|
+
if not isinstance(params["quiet"], bool):
|
|
335
|
+
raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
|
|
336
|
+
if params.get("debug", False) is None:
|
|
337
|
+
raise StyxValidationError("`debug` must not be None")
|
|
338
|
+
if not isinstance(params["debug"], bool):
|
|
339
|
+
raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
|
|
340
|
+
if params.get("force", False) is None:
|
|
341
|
+
raise StyxValidationError("`force` must not be None")
|
|
342
|
+
if not isinstance(params["force"], bool):
|
|
343
|
+
raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
|
|
344
|
+
if params.get("nthreads", None) is not None:
|
|
345
|
+
if not isinstance(params["nthreads"], int):
|
|
346
|
+
raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
|
|
347
|
+
if params.get("config", None) is not None:
|
|
348
|
+
if not isinstance(params["config"], list):
|
|
349
|
+
raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[Ss3tCsdBeta1ConfigParamsDict] | None`')
|
|
350
|
+
for e in params["config"]:
|
|
351
|
+
ss3t_csd_beta1_config_validate(e)
|
|
352
|
+
if params.get("help", False) is None:
|
|
353
|
+
raise StyxValidationError("`help` must not be None")
|
|
354
|
+
if not isinstance(params["help"], bool):
|
|
355
|
+
raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
|
|
356
|
+
if params.get("version", False) is None:
|
|
357
|
+
raise StyxValidationError("`version` must not be None")
|
|
358
|
+
if not isinstance(params["version"], bool):
|
|
359
|
+
raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
|
|
360
|
+
if params.get("dwi", None) is None:
|
|
361
|
+
raise StyxValidationError("`dwi` must not be None")
|
|
362
|
+
if not isinstance(params["dwi"], (pathlib.Path, str)):
|
|
363
|
+
raise StyxValidationError(f'`dwi` has the wrong type: Received `{type(params.get("dwi", None))}` expected `InputPathType`')
|
|
364
|
+
if params.get("response_odf", None) is None:
|
|
365
|
+
raise StyxValidationError("`response_odf` must not be None")
|
|
366
|
+
if not isinstance(params["response_odf"], list):
|
|
367
|
+
raise StyxValidationError(f'`response_odf` has the wrong type: Received `{type(params.get("response_odf", None))}` expected `list[Ss3tCsdBeta1ResponseOdfParamsDict]`')
|
|
368
|
+
for e in params["response_odf"]:
|
|
369
|
+
ss3t_csd_beta1_response_odf_validate(e)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
def ss3t_csd_beta1_cargs(
|
|
373
|
+
params: Ss3tCsdBeta1ParamsDict,
|
|
374
|
+
execution: Execution,
|
|
375
|
+
) -> list[str]:
|
|
376
|
+
"""
|
|
377
|
+
Build command-line arguments from parameters.
|
|
378
|
+
|
|
379
|
+
Args:
|
|
380
|
+
params: The parameters.
|
|
381
|
+
execution: The execution object for resolving input paths.
|
|
382
|
+
Returns:
|
|
383
|
+
Command-line arguments.
|
|
384
|
+
"""
|
|
385
|
+
cargs = []
|
|
386
|
+
cargs.append("ss3t_csd_beta1")
|
|
387
|
+
if params.get("mask", None) is not None:
|
|
388
|
+
cargs.extend([
|
|
389
|
+
"-mask",
|
|
390
|
+
execution.input_file(params.get("mask", None))
|
|
391
|
+
])
|
|
392
|
+
if params.get("bzero_pct", None) is not None:
|
|
393
|
+
cargs.extend([
|
|
394
|
+
"-bzero_pct",
|
|
395
|
+
str(params.get("bzero_pct", None))
|
|
396
|
+
])
|
|
397
|
+
if params.get("niter", None) is not None:
|
|
398
|
+
cargs.extend([
|
|
399
|
+
"-niter",
|
|
400
|
+
str(params.get("niter", None))
|
|
401
|
+
])
|
|
402
|
+
if params.get("info", False):
|
|
403
|
+
cargs.append("-info")
|
|
404
|
+
if params.get("quiet", False):
|
|
405
|
+
cargs.append("-quiet")
|
|
406
|
+
if params.get("debug", False):
|
|
407
|
+
cargs.append("-debug")
|
|
408
|
+
if params.get("force", False):
|
|
409
|
+
cargs.append("-force")
|
|
410
|
+
if params.get("nthreads", None) is not None:
|
|
411
|
+
cargs.extend([
|
|
412
|
+
"-nthreads",
|
|
413
|
+
str(params.get("nthreads", None))
|
|
414
|
+
])
|
|
415
|
+
if params.get("config", None) is not None:
|
|
416
|
+
cargs.extend([a for c in [ss3t_csd_beta1_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
417
|
+
if params.get("help", False):
|
|
418
|
+
cargs.append("-help")
|
|
419
|
+
if params.get("version", False):
|
|
420
|
+
cargs.append("-version")
|
|
421
|
+
cargs.append(execution.input_file(params.get("dwi", None)))
|
|
422
|
+
cargs.extend([a for c in [ss3t_csd_beta1_response_odf_cargs(s, execution) for s in params.get("response_odf", None)] for a in c])
|
|
423
|
+
return cargs
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def ss3t_csd_beta1_outputs(
|
|
427
|
+
params: Ss3tCsdBeta1ParamsDict,
|
|
428
|
+
execution: Execution,
|
|
429
|
+
) -> Ss3tCsdBeta1Outputs:
|
|
430
|
+
"""
|
|
431
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
432
|
+
|
|
433
|
+
Args:
|
|
434
|
+
params: The parameters.
|
|
435
|
+
execution: The execution object for resolving input paths.
|
|
436
|
+
Returns:
|
|
437
|
+
Outputs object.
|
|
438
|
+
"""
|
|
439
|
+
ret = Ss3tCsdBeta1Outputs(
|
|
440
|
+
root=execution.output_file("."),
|
|
441
|
+
response_odf=[ss3t_csd_beta1_response_odf_outputs(i, execution) if ss3t_csd_beta1_response_odf_outputs else None for i in params.get("response_odf")],
|
|
442
|
+
)
|
|
443
|
+
return ret
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
def ss3t_csd_beta1_execute(
|
|
447
|
+
params: Ss3tCsdBeta1ParamsDict,
|
|
448
|
+
runner: Runner | None = None,
|
|
449
|
+
) -> Ss3tCsdBeta1Outputs:
|
|
450
|
+
"""
|
|
451
|
+
ss3t_csd_beta1
|
|
452
|
+
|
|
453
|
+
SS3T-CSD: beta 1 implementation
|
|
454
|
+
|
|
455
|
+
* Dhollander, T. & Connelly, A. A novel iterative approach to reap the
|
|
456
|
+
benefits of multi-tissue CSD from just single-shell (+b=0) diffusion MRI
|
|
457
|
+
data. Proc Intl Soc Mag Reson Med, 2016, 3010.
|
|
458
|
+
|
|
459
|
+
Author: MRTrix3Tissue Developers
|
|
460
|
+
|
|
461
|
+
URL: https://3tissue.github.io/
|
|
462
|
+
|
|
463
|
+
Args:
|
|
464
|
+
params: The parameters.
|
|
465
|
+
runner: Command runner.
|
|
466
|
+
Returns:
|
|
467
|
+
NamedTuple of outputs (described in `Ss3tCsdBeta1Outputs`).
|
|
468
|
+
"""
|
|
469
|
+
ss3t_csd_beta1_validate(params)
|
|
470
|
+
runner = runner or get_global_runner()
|
|
471
|
+
execution = runner.start_execution(SS3T_CSD_BETA1_METADATA)
|
|
472
|
+
params = execution.params(params)
|
|
473
|
+
cargs = ss3t_csd_beta1_cargs(params, execution)
|
|
474
|
+
ret = ss3t_csd_beta1_outputs(params, execution)
|
|
475
|
+
execution.run(cargs)
|
|
476
|
+
return ret
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
def ss3t_csd_beta1(
|
|
480
|
+
dwi: InputPathType,
|
|
481
|
+
response_odf: list[Ss3tCsdBeta1ResponseOdfParamsDict],
|
|
482
|
+
mask: InputPathType | None = None,
|
|
483
|
+
bzero_pct: float | None = None,
|
|
484
|
+
niter: int | None = None,
|
|
485
|
+
info: bool = False,
|
|
486
|
+
quiet: bool = False,
|
|
487
|
+
debug: bool = False,
|
|
488
|
+
force: bool = False,
|
|
489
|
+
nthreads: int | None = None,
|
|
490
|
+
config: list[Ss3tCsdBeta1ConfigParamsDict] | None = None,
|
|
491
|
+
help_: bool = False,
|
|
492
|
+
version: bool = False,
|
|
493
|
+
runner: Runner | None = None,
|
|
494
|
+
) -> Ss3tCsdBeta1Outputs:
|
|
495
|
+
"""
|
|
496
|
+
ss3t_csd_beta1
|
|
497
|
+
|
|
498
|
+
SS3T-CSD: beta 1 implementation
|
|
499
|
+
|
|
500
|
+
* Dhollander, T. & Connelly, A. A novel iterative approach to reap the
|
|
501
|
+
benefits of multi-tissue CSD from just single-shell (+b=0) diffusion MRI
|
|
502
|
+
data. Proc Intl Soc Mag Reson Med, 2016, 3010.
|
|
503
|
+
|
|
504
|
+
Author: MRTrix3Tissue Developers
|
|
505
|
+
|
|
506
|
+
URL: https://3tissue.github.io/
|
|
507
|
+
|
|
508
|
+
Args:
|
|
509
|
+
dwi: the input diffusion-weighted image.
|
|
510
|
+
response_odf: pairs of input tissue response and output ODF images.
|
|
511
|
+
mask: only perform computation within the specified binary brain mask\
|
|
512
|
+
image.
|
|
513
|
+
bzero_pct: the threshold below which the amplitude of the FOD is\
|
|
514
|
+
assumed to be zero, expressed as an absolute amplitude (default = 0).
|
|
515
|
+
niter: the maximum number of iterations to perform for each voxel\
|
|
516
|
+
(default = 50). Use '-niter 0' for a linear unconstrained spherical\
|
|
517
|
+
deconvolution.
|
|
518
|
+
info: display information messages.
|
|
519
|
+
quiet: do not display information messages or progress status;\
|
|
520
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
521
|
+
environment variable to a non-empty string.
|
|
522
|
+
debug: display debugging messages.
|
|
523
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
524
|
+
input and output might cause unexpected behaviour).
|
|
525
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
526
|
+
(set to 0 to disable multi-threading).
|
|
527
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
528
|
+
help_: display this information page and exit.
|
|
529
|
+
version: display version information and exit.
|
|
530
|
+
runner: Command runner.
|
|
531
|
+
Returns:
|
|
532
|
+
NamedTuple of outputs (described in `Ss3tCsdBeta1Outputs`).
|
|
533
|
+
"""
|
|
534
|
+
params = ss3t_csd_beta1_params(
|
|
535
|
+
mask=mask,
|
|
536
|
+
bzero_pct=bzero_pct,
|
|
537
|
+
niter=niter,
|
|
538
|
+
info=info,
|
|
539
|
+
quiet=quiet,
|
|
540
|
+
debug=debug,
|
|
541
|
+
force=force,
|
|
542
|
+
nthreads=nthreads,
|
|
543
|
+
config=config,
|
|
544
|
+
help_=help_,
|
|
545
|
+
version=version,
|
|
546
|
+
dwi=dwi,
|
|
547
|
+
response_odf=response_odf,
|
|
548
|
+
)
|
|
549
|
+
return ss3t_csd_beta1_execute(params, runner)
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
__all__ = [
|
|
553
|
+
"SS3T_CSD_BETA1_METADATA",
|
|
554
|
+
"Ss3tCsdBeta1ConfigParamsDict",
|
|
555
|
+
"Ss3tCsdBeta1ConfigParamsDictTagged",
|
|
556
|
+
"Ss3tCsdBeta1Outputs",
|
|
557
|
+
"Ss3tCsdBeta1ParamsDict",
|
|
558
|
+
"Ss3tCsdBeta1ParamsDictTagged",
|
|
559
|
+
"Ss3tCsdBeta1ResponseOdfOutputs",
|
|
560
|
+
"Ss3tCsdBeta1ResponseOdfParamsDict",
|
|
561
|
+
"Ss3tCsdBeta1ResponseOdfParamsDictTagged",
|
|
562
|
+
"ss3t_csd_beta1",
|
|
563
|
+
"ss3t_csd_beta1_config",
|
|
564
|
+
"ss3t_csd_beta1_execute",
|
|
565
|
+
"ss3t_csd_beta1_params",
|
|
566
|
+
"ss3t_csd_beta1_response_odf",
|
|
567
|
+
]
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
niwrap_mrtrix3tissue/mrtrix3tissue/__init__.py,sha256=pHiDAzutZi7jtRz-qQzcPoEyGYNLh9wQqlcaMZ-TLto,755
|
|
2
|
+
niwrap_mrtrix3tissue/mrtrix3tissue/ss3t_csd_beta1.py,sha256=EE6vvJERxfUR94-mWpXnFMILWMUf0Cxj76kIWtOZTgA,20804
|
|
3
|
+
niwrap_mrtrix3tissue-0.8.4.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
4
|
+
niwrap_mrtrix3tissue-0.8.4.dist-info/METADATA,sha256=cNoHjPSlv_4d2X7t-UgpWspmvXNiCYPim3KaPurCc4o,199
|
|
5
|
+
niwrap_mrtrix3tissue-0.8.4.dist-info/RECORD,,
|