niwrap-mrtrix3tissue 0.5.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-mrtrix3tissue might be problematic. Click here for more details.

@@ -0,0 +1,13 @@
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
+ URL: https://3tissue.github.io/
9
+ """
10
+ # This file was auto generated by Styx.
11
+ # Do not edit this file directly.
12
+
13
+ from .ss3t_csd_beta1 import *
@@ -0,0 +1,458 @@
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="3d7ce53d5c0f3941cd5c3621352793549ea67b37.boutiques",
10
+ name="ss3t_csd_beta1",
11
+ package="mrtrix3tissue",
12
+ container_image_tag="brainlife/3tissue:5.2.8",
13
+ )
14
+
15
+
16
+ Ss3tCsdBeta1ConfigParameters = typing.TypedDict('Ss3tCsdBeta1ConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ Ss3tCsdBeta1ResponseOdfParameters = typing.TypedDict('Ss3tCsdBeta1ResponseOdfParameters', {
24
+ "__STYX_TYPE__": typing.Literal["response_odf"],
25
+ "response": InputPathType,
26
+ "odf": str,
27
+ })
28
+
29
+
30
+ Ss3tCsdBeta1Parameters = typing.TypedDict('Ss3tCsdBeta1Parameters', {
31
+ "__STYX_TYPE__": typing.Literal["ss3t_csd_beta1"],
32
+ "mask": typing.NotRequired[InputPathType | None],
33
+ "bzero_pct": typing.NotRequired[float | None],
34
+ "niter": typing.NotRequired[int | None],
35
+ "info": bool,
36
+ "quiet": bool,
37
+ "debug": bool,
38
+ "force": bool,
39
+ "nthreads": typing.NotRequired[int | None],
40
+ "config": typing.NotRequired[list[Ss3tCsdBeta1ConfigParameters] | None],
41
+ "help": bool,
42
+ "version": bool,
43
+ "dwi": InputPathType,
44
+ "response_odf": list[Ss3tCsdBeta1ResponseOdfParameters],
45
+ })
46
+
47
+
48
+ def dyn_cargs(
49
+ t: str,
50
+ ) -> typing.Any:
51
+ """
52
+ Get build cargs function by command type.
53
+
54
+ Args:
55
+ t: Command type.
56
+ Returns:
57
+ Build cargs function.
58
+ """
59
+ return {
60
+ "ss3t_csd_beta1": ss3t_csd_beta1_cargs,
61
+ "config": ss3t_csd_beta1_config_cargs,
62
+ "response_odf": ss3t_csd_beta1_response_odf_cargs,
63
+ }.get(t)
64
+
65
+
66
+ def dyn_outputs(
67
+ t: str,
68
+ ) -> typing.Any:
69
+ """
70
+ Get build outputs function by command type.
71
+
72
+ Args:
73
+ t: Command type.
74
+ Returns:
75
+ Build outputs function.
76
+ """
77
+ return {
78
+ "ss3t_csd_beta1": ss3t_csd_beta1_outputs,
79
+ "response_odf": ss3t_csd_beta1_response_odf_outputs,
80
+ }.get(t)
81
+
82
+
83
+ def ss3t_csd_beta1_config_params(
84
+ key: str,
85
+ value: str,
86
+ ) -> Ss3tCsdBeta1ConfigParameters:
87
+ """
88
+ Build parameters.
89
+
90
+ Args:
91
+ key: temporarily set the value of an MRtrix config file entry.
92
+ value: temporarily set the value of an MRtrix config file entry.
93
+ Returns:
94
+ Parameter dictionary
95
+ """
96
+ params = {
97
+ "__STYXTYPE__": "config",
98
+ "key": key,
99
+ "value": value,
100
+ }
101
+ return params
102
+
103
+
104
+ def ss3t_csd_beta1_config_cargs(
105
+ params: Ss3tCsdBeta1ConfigParameters,
106
+ execution: Execution,
107
+ ) -> list[str]:
108
+ """
109
+ Build command-line arguments from parameters.
110
+
111
+ Args:
112
+ params: The parameters.
113
+ execution: The execution object for resolving input paths.
114
+ Returns:
115
+ Command-line arguments.
116
+ """
117
+ cargs = []
118
+ cargs.append("-config")
119
+ cargs.append(params.get("key"))
120
+ cargs.append(params.get("value"))
121
+ return cargs
122
+
123
+
124
+ class Ss3tCsdBeta1ResponseOdfOutputs(typing.NamedTuple):
125
+ """
126
+ Output object returned when calling `list[Ss3tCsdBeta1ResponseOdfParameters](...)`.
127
+ """
128
+ root: OutputPathType
129
+ """Output root folder. This is the root folder for all outputs."""
130
+ odf: OutputPathType
131
+ """output ODF image"""
132
+
133
+
134
+ def ss3t_csd_beta1_response_odf_params(
135
+ response: InputPathType,
136
+ odf: str,
137
+ ) -> Ss3tCsdBeta1ResponseOdfParameters:
138
+ """
139
+ Build parameters.
140
+
141
+ Args:
142
+ response: input tissue response.
143
+ odf: output ODF image.
144
+ Returns:
145
+ Parameter dictionary
146
+ """
147
+ params = {
148
+ "__STYXTYPE__": "response_odf",
149
+ "response": response,
150
+ "odf": odf,
151
+ }
152
+ return params
153
+
154
+
155
+ def ss3t_csd_beta1_response_odf_cargs(
156
+ params: Ss3tCsdBeta1ResponseOdfParameters,
157
+ execution: Execution,
158
+ ) -> list[str]:
159
+ """
160
+ Build command-line arguments from parameters.
161
+
162
+ Args:
163
+ params: The parameters.
164
+ execution: The execution object for resolving input paths.
165
+ Returns:
166
+ Command-line arguments.
167
+ """
168
+ cargs = []
169
+ cargs.append(execution.input_file(params.get("response")))
170
+ cargs.append(params.get("odf"))
171
+ return cargs
172
+
173
+
174
+ def ss3t_csd_beta1_response_odf_outputs(
175
+ params: Ss3tCsdBeta1ResponseOdfParameters,
176
+ execution: Execution,
177
+ ) -> Ss3tCsdBeta1ResponseOdfOutputs:
178
+ """
179
+ Build outputs object containing output file paths and possibly stdout/stderr.
180
+
181
+ Args:
182
+ params: The parameters.
183
+ execution: The execution object for resolving input paths.
184
+ Returns:
185
+ Outputs object.
186
+ """
187
+ ret = Ss3tCsdBeta1ResponseOdfOutputs(
188
+ root=execution.output_file("."),
189
+ odf=execution.output_file(params.get("odf")),
190
+ )
191
+ return ret
192
+
193
+
194
+ class Ss3tCsdBeta1Outputs(typing.NamedTuple):
195
+ """
196
+ Output object returned when calling `ss3t_csd_beta1(...)`.
197
+ """
198
+ root: OutputPathType
199
+ """Output root folder. This is the root folder for all outputs."""
200
+ response_odf: list[Ss3tCsdBeta1ResponseOdfOutputs]
201
+ """Outputs from `ss3t_csd_beta1_response_odf_outputs`.This is a list of
202
+ outputs with the same length and order as the inputs."""
203
+
204
+
205
+ def ss3t_csd_beta1_params(
206
+ dwi: InputPathType,
207
+ response_odf: list[Ss3tCsdBeta1ResponseOdfParameters],
208
+ mask: InputPathType | None = None,
209
+ bzero_pct: float | None = None,
210
+ niter: int | None = None,
211
+ info: bool = False,
212
+ quiet: bool = False,
213
+ debug: bool = False,
214
+ force: bool = False,
215
+ nthreads: int | None = None,
216
+ config: list[Ss3tCsdBeta1ConfigParameters] | None = None,
217
+ help_: bool = False,
218
+ version: bool = False,
219
+ ) -> Ss3tCsdBeta1Parameters:
220
+ """
221
+ Build parameters.
222
+
223
+ Args:
224
+ dwi: the input diffusion-weighted image.
225
+ response_odf: pairs of input tissue response and output ODF images.
226
+ mask: only perform computation within the specified binary brain mask\
227
+ image.
228
+ bzero_pct: the threshold below which the amplitude of the FOD is\
229
+ assumed to be zero, expressed as an absolute amplitude (default = 0).
230
+ niter: the maximum number of iterations to perform for each voxel\
231
+ (default = 50). Use '-niter 0' for a linear unconstrained spherical\
232
+ deconvolution.
233
+ info: display information messages.
234
+ quiet: do not display information messages or progress status;\
235
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
236
+ environment variable to a non-empty string.
237
+ debug: display debugging messages.
238
+ force: force overwrite of output files (caution: using the same file as\
239
+ input and output might cause unexpected behaviour).
240
+ nthreads: use this number of threads in multi-threaded applications\
241
+ (set to 0 to disable multi-threading).
242
+ config: temporarily set the value of an MRtrix config file entry.
243
+ help_: display this information page and exit.
244
+ version: display version information and exit.
245
+ Returns:
246
+ Parameter dictionary
247
+ """
248
+ params = {
249
+ "__STYXTYPE__": "ss3t_csd_beta1",
250
+ "info": info,
251
+ "quiet": quiet,
252
+ "debug": debug,
253
+ "force": force,
254
+ "help": help_,
255
+ "version": version,
256
+ "dwi": dwi,
257
+ "response_odf": response_odf,
258
+ }
259
+ if mask is not None:
260
+ params["mask"] = mask
261
+ if bzero_pct is not None:
262
+ params["bzero_pct"] = bzero_pct
263
+ if niter is not None:
264
+ params["niter"] = niter
265
+ if nthreads is not None:
266
+ params["nthreads"] = nthreads
267
+ if config is not None:
268
+ params["config"] = config
269
+ return params
270
+
271
+
272
+ def ss3t_csd_beta1_cargs(
273
+ params: Ss3tCsdBeta1Parameters,
274
+ execution: Execution,
275
+ ) -> list[str]:
276
+ """
277
+ Build command-line arguments from parameters.
278
+
279
+ Args:
280
+ params: The parameters.
281
+ execution: The execution object for resolving input paths.
282
+ Returns:
283
+ Command-line arguments.
284
+ """
285
+ cargs = []
286
+ cargs.append("ss3t_csd_beta1")
287
+ if params.get("mask") is not None:
288
+ cargs.extend([
289
+ "-mask",
290
+ execution.input_file(params.get("mask"))
291
+ ])
292
+ if params.get("bzero_pct") is not None:
293
+ cargs.extend([
294
+ "-bzero_pct",
295
+ str(params.get("bzero_pct"))
296
+ ])
297
+ if params.get("niter") is not None:
298
+ cargs.extend([
299
+ "-niter",
300
+ str(params.get("niter"))
301
+ ])
302
+ if params.get("info"):
303
+ cargs.append("-info")
304
+ if params.get("quiet"):
305
+ cargs.append("-quiet")
306
+ if params.get("debug"):
307
+ cargs.append("-debug")
308
+ if params.get("force"):
309
+ cargs.append("-force")
310
+ if params.get("nthreads") is not None:
311
+ cargs.extend([
312
+ "-nthreads",
313
+ str(params.get("nthreads"))
314
+ ])
315
+ if params.get("config") is not None:
316
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
317
+ if params.get("help"):
318
+ cargs.append("-help")
319
+ if params.get("version"):
320
+ cargs.append("-version")
321
+ cargs.append(execution.input_file(params.get("dwi")))
322
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("response_odf")] for a in c])
323
+ return cargs
324
+
325
+
326
+ def ss3t_csd_beta1_outputs(
327
+ params: Ss3tCsdBeta1Parameters,
328
+ execution: Execution,
329
+ ) -> Ss3tCsdBeta1Outputs:
330
+ """
331
+ Build outputs object containing output file paths and possibly stdout/stderr.
332
+
333
+ Args:
334
+ params: The parameters.
335
+ execution: The execution object for resolving input paths.
336
+ Returns:
337
+ Outputs object.
338
+ """
339
+ ret = Ss3tCsdBeta1Outputs(
340
+ root=execution.output_file("."),
341
+ response_odf=[dyn_outputs(i["__STYXTYPE__"])(i, execution) if dyn_outputs(i["__STYXTYPE__"]) else None for i in params.get("response_odf")],
342
+ )
343
+ return ret
344
+
345
+
346
+ def ss3t_csd_beta1_execute(
347
+ params: Ss3tCsdBeta1Parameters,
348
+ execution: Execution,
349
+ ) -> Ss3tCsdBeta1Outputs:
350
+ """
351
+ SS3T-CSD: beta 1 implementation
352
+
353
+ * Dhollander, T. & Connelly, A. A novel iterative approach to reap the
354
+ benefits of multi-tissue CSD from just single-shell (+b=0) diffusion MRI
355
+ data. Proc Intl Soc Mag Reson Med, 2016, 3010.
356
+
357
+ Author: MRTrix3Tissue Developers
358
+
359
+ URL: https://3tissue.github.io/
360
+
361
+ Args:
362
+ params: The parameters.
363
+ execution: The execution object.
364
+ Returns:
365
+ NamedTuple of outputs (described in `Ss3tCsdBeta1Outputs`).
366
+ """
367
+ params = execution.params(params)
368
+ cargs = ss3t_csd_beta1_cargs(params, execution)
369
+ ret = ss3t_csd_beta1_outputs(params, execution)
370
+ execution.run(cargs)
371
+ return ret
372
+
373
+
374
+ def ss3t_csd_beta1(
375
+ dwi: InputPathType,
376
+ response_odf: list[Ss3tCsdBeta1ResponseOdfParameters],
377
+ mask: InputPathType | None = None,
378
+ bzero_pct: float | None = None,
379
+ niter: int | None = None,
380
+ info: bool = False,
381
+ quiet: bool = False,
382
+ debug: bool = False,
383
+ force: bool = False,
384
+ nthreads: int | None = None,
385
+ config: list[Ss3tCsdBeta1ConfigParameters] | None = None,
386
+ help_: bool = False,
387
+ version: bool = False,
388
+ runner: Runner | None = None,
389
+ ) -> Ss3tCsdBeta1Outputs:
390
+ """
391
+ SS3T-CSD: beta 1 implementation
392
+
393
+ * Dhollander, T. & Connelly, A. A novel iterative approach to reap the
394
+ benefits of multi-tissue CSD from just single-shell (+b=0) diffusion MRI
395
+ data. Proc Intl Soc Mag Reson Med, 2016, 3010.
396
+
397
+ Author: MRTrix3Tissue Developers
398
+
399
+ URL: https://3tissue.github.io/
400
+
401
+ Args:
402
+ dwi: the input diffusion-weighted image.
403
+ response_odf: pairs of input tissue response and output ODF images.
404
+ mask: only perform computation within the specified binary brain mask\
405
+ image.
406
+ bzero_pct: the threshold below which the amplitude of the FOD is\
407
+ assumed to be zero, expressed as an absolute amplitude (default = 0).
408
+ niter: the maximum number of iterations to perform for each voxel\
409
+ (default = 50). Use '-niter 0' for a linear unconstrained spherical\
410
+ deconvolution.
411
+ info: display information messages.
412
+ quiet: do not display information messages or progress status;\
413
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
414
+ environment variable to a non-empty string.
415
+ debug: display debugging messages.
416
+ force: force overwrite of output files (caution: using the same file as\
417
+ input and output might cause unexpected behaviour).
418
+ nthreads: use this number of threads in multi-threaded applications\
419
+ (set to 0 to disable multi-threading).
420
+ config: temporarily set the value of an MRtrix config file entry.
421
+ help_: display this information page and exit.
422
+ version: display version information and exit.
423
+ runner: Command runner.
424
+ Returns:
425
+ NamedTuple of outputs (described in `Ss3tCsdBeta1Outputs`).
426
+ """
427
+ runner = runner or get_global_runner()
428
+ execution = runner.start_execution(SS3T_CSD_BETA1_METADATA)
429
+ params = ss3t_csd_beta1_params(
430
+ mask=mask,
431
+ bzero_pct=bzero_pct,
432
+ niter=niter,
433
+ info=info,
434
+ quiet=quiet,
435
+ debug=debug,
436
+ force=force,
437
+ nthreads=nthreads,
438
+ config=config,
439
+ help_=help_,
440
+ version=version,
441
+ dwi=dwi,
442
+ response_odf=response_odf,
443
+ )
444
+ return ss3t_csd_beta1_execute(params, execution)
445
+
446
+
447
+ __all__ = [
448
+ "SS3T_CSD_BETA1_METADATA",
449
+ "Ss3tCsdBeta1ConfigParameters",
450
+ "Ss3tCsdBeta1Outputs",
451
+ "Ss3tCsdBeta1Parameters",
452
+ "Ss3tCsdBeta1ResponseOdfOutputs",
453
+ "Ss3tCsdBeta1ResponseOdfParameters",
454
+ "ss3t_csd_beta1",
455
+ "ss3t_csd_beta1_config_params",
456
+ "ss3t_csd_beta1_params",
457
+ "ss3t_csd_beta1_response_odf_params",
458
+ ]
@@ -0,0 +1,8 @@
1
+ Metadata-Version: 2.4
2
+ Name: niwrap_mrtrix3tissue
3
+ Version: 0.5.0
4
+ Summary: NiWrap wrappers for MRTrix3Tissue.
5
+ Author-email: CMI DAIR <dair@childmind.org>
6
+ License-Expression: LGPL-2.1
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: styxdefs~=0.5.0
@@ -0,0 +1,5 @@
1
+ niwrap_mrtrix3tissue/mrtrix3tissue/__init__.py,sha256=UHLVCL-z5MhXYHd64DZYlQBX2EC8jL48B36fOJQWWF8,324
2
+ niwrap_mrtrix3tissue/mrtrix3tissue/ss3t_csd_beta1.py,sha256=AjIL6PzSDhKFgPPdQ1irX0DK2bUCGyRymF5eY1g9wzQ,13860
3
+ niwrap_mrtrix3tissue-0.5.0.dist-info/METADATA,sha256=ROhyuj_Rut49D5Iu18K_6ltlY4gKgm8vknYg6oyPYVo,236
4
+ niwrap_mrtrix3tissue-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ niwrap_mrtrix3tissue-0.5.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any