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.

Files changed (122) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +133 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +59 -68
  3. niwrap_mrtrix/mrtrix/amp2response.py +72 -77
  4. niwrap_mrtrix/mrtrix/amp2sh.py +109 -74
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +77 -79
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +52 -62
  7. niwrap_mrtrix/mrtrix/connectomestats.py +117 -104
  8. niwrap_mrtrix/mrtrix/dcmedit.py +68 -73
  9. niwrap_mrtrix/mrtrix/dcminfo.py +67 -72
  10. niwrap_mrtrix/mrtrix/dirflip.py +56 -66
  11. niwrap_mrtrix/mrtrix/dirgen.py +68 -75
  12. niwrap_mrtrix/mrtrix/dirmerge.py +56 -66
  13. niwrap_mrtrix/mrtrix/dirorder.py +53 -64
  14. niwrap_mrtrix/mrtrix/dirsplit.py +56 -66
  15. niwrap_mrtrix/mrtrix/dirstat.py +70 -75
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +67 -74
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +141 -96
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +70 -76
  19. niwrap_mrtrix/mrtrix/dwi2response.py +238 -157
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +87 -88
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +97 -95
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +67 -74
  23. niwrap_mrtrix/mrtrix/dwiextract.py +143 -99
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +89 -91
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +77 -51
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +54 -65
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +56 -66
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +62 -70
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +145 -93
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +62 -70
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +136 -69
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +61 -69
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +53 -64
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +139 -71
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +53 -64
  36. niwrap_mrtrix/mrtrix/fod2dec.py +70 -75
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +84 -85
  38. niwrap_mrtrix/mrtrix/label2colour.py +58 -67
  39. niwrap_mrtrix/mrtrix/label2mesh.py +53 -64
  40. niwrap_mrtrix/mrtrix/labelconvert.py +58 -67
  41. niwrap_mrtrix/mrtrix/labelstats.py +53 -63
  42. niwrap_mrtrix/mrtrix/maskdump.py +52 -64
  43. niwrap_mrtrix/mrtrix/maskfilter.py +93 -61
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +53 -64
  45. niwrap_mrtrix/mrtrix/meshconvert.py +66 -73
  46. niwrap_mrtrix/mrtrix/meshfilter.py +59 -68
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +62 -70
  48. niwrap_mrtrix/mrtrix/mrcalc.py +522 -397
  49. niwrap_mrtrix/mrtrix/mrcat.py +59 -68
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +53 -63
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +58 -67
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +119 -105
  53. niwrap_mrtrix/mrtrix/mrcolour.py +62 -70
  54. niwrap_mrtrix/mrtrix/mrconvert.py +275 -173
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +66 -73
  56. niwrap_mrtrix/mrtrix/mrdump.py +55 -66
  57. niwrap_mrtrix/mrtrix/mredit.py +97 -94
  58. niwrap_mrtrix/mrtrix/mrfilter.py +124 -81
  59. niwrap_mrtrix/mrtrix/mrgrid.py +131 -88
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +64 -71
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +64 -71
  62. niwrap_mrtrix/mrtrix/mrinfo.py +160 -137
  63. niwrap_mrtrix/mrtrix/mrmath.py +65 -73
  64. niwrap_mrtrix/mrtrix/mrmetric.py +69 -73
  65. niwrap_mrtrix/mrtrix/mrregister.py +263 -212
  66. niwrap_mrtrix/mrtrix/mrstats.py +66 -72
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +80 -81
  68. niwrap_mrtrix/mrtrix/mrtransform.py +162 -109
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +85 -88
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +51 -63
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +54 -65
  72. niwrap_mrtrix/mrtrix/responsemean.py +51 -62
  73. niwrap_mrtrix/mrtrix/sh2amp.py +98 -65
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +81 -83
  75. niwrap_mrtrix/mrtrix/sh2power.py +53 -64
  76. niwrap_mrtrix/mrtrix/sh2response.py +62 -70
  77. niwrap_mrtrix/mrtrix/shbasis.py +51 -62
  78. niwrap_mrtrix/mrtrix/shconv.py +78 -52
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +93 -88
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +57 -65
  81. niwrap_mrtrix/mrtrix/tckconvert.py +99 -65
  82. niwrap_mrtrix/mrtrix/tckdfc.py +82 -83
  83. niwrap_mrtrix/mrtrix/tckedit.py +240 -122
  84. niwrap_mrtrix/mrtrix/tckgen.py +364 -207
  85. niwrap_mrtrix/mrtrix/tckglobal.py +127 -115
  86. niwrap_mrtrix/mrtrix/tckinfo.py +50 -61
  87. niwrap_mrtrix/mrtrix/tckmap.py +121 -79
  88. niwrap_mrtrix/mrtrix/tckresample.py +97 -93
  89. niwrap_mrtrix/mrtrix/tcksample.py +62 -69
  90. niwrap_mrtrix/mrtrix/tcksift.py +102 -97
  91. niwrap_mrtrix/mrtrix/tcksift2.py +119 -107
  92. niwrap_mrtrix/mrtrix/tckstats.py +72 -78
  93. niwrap_mrtrix/mrtrix/tcktransform.py +53 -64
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +93 -94
  95. niwrap_mrtrix/mrtrix/transformcalc.py +53 -64
  96. niwrap_mrtrix/mrtrix/transformcompose.py +74 -48
  97. niwrap_mrtrix/mrtrix/transformconvert.py +53 -64
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +53 -64
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +53 -63
  100. niwrap_mrtrix/mrtrix/tsfmult.py +51 -63
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +54 -65
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +55 -65
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +50 -61
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +54 -65
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +69 -75
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +51 -62
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +73 -79
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +132 -86
  109. niwrap_mrtrix/mrtrix/vectorstats.py +92 -88
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +54 -63
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +56 -66
  112. niwrap_mrtrix/mrtrix/warp2metric.py +71 -77
  113. niwrap_mrtrix/mrtrix/warpconvert.py +61 -69
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +61 -71
  115. niwrap_mrtrix/mrtrix/warpinit.py +51 -63
  116. niwrap_mrtrix/mrtrix/warpinvert.py +56 -66
  117. niwrap_mrtrix-0.7.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.7.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.7.0.dist-info/WHEEL +4 -0
  120. niwrap_mrtrix-0.6.3.dist-info/METADATA +0 -8
  121. niwrap_mrtrix-0.6.3.dist-info/RECORD +0 -119
  122. 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
  TCKSIFT2_METADATA = Metadata(
9
- id="54877e8482d2c3115015f89454822c875afcff2f.boutiques",
9
+ id="14aaf15fab77274145a9c252945d1e6493faa9d5.boutiques",
10
10
  name="tcksift2",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,56 @@ TCKSIFT2_METADATA = Metadata(
14
14
 
15
15
 
16
16
  Tcksift2ConfigParameters = typing.TypedDict('Tcksift2ConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ Tcksift2ConfigParametersTagged = typing.TypedDict('Tcksift2ConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  Tcksift2Parameters = typing.TypedDict('Tcksift2Parameters', {
24
- "__STYXTYPE__": typing.Literal["tcksift2"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/tcksift2"]],
30
+ "proc_mask": typing.NotRequired[InputPathType | None],
31
+ "act": typing.NotRequired[InputPathType | None],
32
+ "fd_scale_gm": bool,
33
+ "no_dilate_lut": bool,
34
+ "make_null_lobes": bool,
35
+ "remove_untracked": bool,
36
+ "fd_thresh": typing.NotRequired[float | None],
37
+ "csv": typing.NotRequired[str | None],
38
+ "out_mu": typing.NotRequired[str | None],
39
+ "output_debug": bool,
40
+ "out_coeffs": typing.NotRequired[str | None],
41
+ "reg_tikhonov": typing.NotRequired[float | None],
42
+ "reg_tv": typing.NotRequired[float | None],
43
+ "min_td_frac": typing.NotRequired[float | None],
44
+ "min_iters": typing.NotRequired[int | None],
45
+ "max_iters": typing.NotRequired[int | None],
46
+ "min_factor": typing.NotRequired[float | None],
47
+ "min_coeff": typing.NotRequired[float | None],
48
+ "max_factor": typing.NotRequired[float | None],
49
+ "max_coeff": typing.NotRequired[float | None],
50
+ "max_coeff_step": typing.NotRequired[float | None],
51
+ "min_cf_decrease": typing.NotRequired[float | None],
52
+ "linear": bool,
53
+ "info": bool,
54
+ "quiet": bool,
55
+ "debug": bool,
56
+ "force": bool,
57
+ "nthreads": typing.NotRequired[int | None],
58
+ "config": typing.NotRequired[list[Tcksift2ConfigParameters] | None],
59
+ "help": bool,
60
+ "version": bool,
61
+ "in_tracks": InputPathType,
62
+ "in_fod": InputPathType,
63
+ "out_weights": str,
64
+ })
65
+ Tcksift2ParametersTagged = typing.TypedDict('Tcksift2ParametersTagged', {
66
+ "@type": typing.Literal["mrtrix/tcksift2"],
25
67
  "proc_mask": typing.NotRequired[InputPathType | None],
26
68
  "act": typing.NotRequired[InputPathType | None],
27
69
  "fd_scale_gm": bool,
@@ -57,45 +99,12 @@ Tcksift2Parameters = typing.TypedDict('Tcksift2Parameters', {
57
99
  "in_fod": InputPathType,
58
100
  "out_weights": str,
59
101
  })
60
-
61
-
62
- def dyn_cargs(
63
- t: str,
64
- ) -> typing.Any:
65
- """
66
- Get build cargs function by command type.
67
-
68
- Args:
69
- t: Command type.
70
- Returns:
71
- Build cargs function.
72
- """
73
- return {
74
- "tcksift2": tcksift2_cargs,
75
- "config": tcksift2_config_cargs,
76
- }.get(t)
77
-
78
-
79
- def dyn_outputs(
80
- t: str,
81
- ) -> typing.Any:
82
- """
83
- Get build outputs function by command type.
84
-
85
- Args:
86
- t: Command type.
87
- Returns:
88
- Build outputs function.
89
- """
90
- return {
91
- "tcksift2": tcksift2_outputs,
92
- }.get(t)
93
102
 
94
103
 
95
104
  def tcksift2_config_params(
96
105
  key: str,
97
106
  value: str,
98
- ) -> Tcksift2ConfigParameters:
107
+ ) -> Tcksift2ConfigParametersTagged:
99
108
  """
100
109
  Build parameters.
101
110
 
@@ -106,7 +115,7 @@ def tcksift2_config_params(
106
115
  Parameter dictionary
107
116
  """
108
117
  params = {
109
- "__STYXTYPE__": "config",
118
+ "@type": "config",
110
119
  "key": key,
111
120
  "value": value,
112
121
  }
@@ -128,14 +137,14 @@ def tcksift2_config_cargs(
128
137
  """
129
138
  cargs = []
130
139
  cargs.append("-config")
131
- cargs.append(params.get("key"))
132
- cargs.append(params.get("value"))
140
+ cargs.append(params.get("key", None))
141
+ cargs.append(params.get("value", None))
133
142
  return cargs
134
143
 
135
144
 
136
145
  class Tcksift2Outputs(typing.NamedTuple):
137
146
  """
138
- Output object returned when calling `tcksift2(...)`.
147
+ Output object returned when calling `Tcksift2Parameters(...)`.
139
148
  """
140
149
  root: OutputPathType
141
150
  """Output root folder. This is the root folder for all outputs."""
@@ -186,7 +195,7 @@ def tcksift2_params(
186
195
  config: list[Tcksift2ConfigParameters] | None = None,
187
196
  help_: bool = False,
188
197
  version: bool = False,
189
- ) -> Tcksift2Parameters:
198
+ ) -> Tcksift2ParametersTagged:
190
199
  """
191
200
  Build parameters.
192
201
 
@@ -277,7 +286,7 @@ def tcksift2_params(
277
286
  Parameter dictionary
278
287
  """
279
288
  params = {
280
- "__STYXTYPE__": "tcksift2",
289
+ "@type": "mrtrix/tcksift2",
281
290
  "fd_scale_gm": fd_scale_gm,
282
291
  "no_dilate_lut": no_dilate_lut,
283
292
  "make_null_lobes": make_null_lobes,
@@ -350,125 +359,125 @@ def tcksift2_cargs(
350
359
  """
351
360
  cargs = []
352
361
  cargs.append("tcksift2")
353
- if params.get("proc_mask") is not None:
362
+ if params.get("proc_mask", None) is not None:
354
363
  cargs.extend([
355
364
  "-proc_mask",
356
- execution.input_file(params.get("proc_mask"))
365
+ execution.input_file(params.get("proc_mask", None))
357
366
  ])
358
- if params.get("act") is not None:
367
+ if params.get("act", None) is not None:
359
368
  cargs.extend([
360
369
  "-act",
361
- execution.input_file(params.get("act"))
370
+ execution.input_file(params.get("act", None))
362
371
  ])
363
- if params.get("fd_scale_gm"):
372
+ if params.get("fd_scale_gm", False):
364
373
  cargs.append("-fd_scale_gm")
365
- if params.get("no_dilate_lut"):
374
+ if params.get("no_dilate_lut", False):
366
375
  cargs.append("-no_dilate_lut")
367
- if params.get("make_null_lobes"):
376
+ if params.get("make_null_lobes", False):
368
377
  cargs.append("-make_null_lobes")
369
- if params.get("remove_untracked"):
378
+ if params.get("remove_untracked", False):
370
379
  cargs.append("-remove_untracked")
371
- if params.get("fd_thresh") is not None:
380
+ if params.get("fd_thresh", None) is not None:
372
381
  cargs.extend([
373
382
  "-fd_thresh",
374
- str(params.get("fd_thresh"))
383
+ str(params.get("fd_thresh", None))
375
384
  ])
376
- if params.get("csv") is not None:
385
+ if params.get("csv", None) is not None:
377
386
  cargs.extend([
378
387
  "-csv",
379
- params.get("csv")
388
+ params.get("csv", None)
380
389
  ])
381
- if params.get("out_mu") is not None:
390
+ if params.get("out_mu", None) is not None:
382
391
  cargs.extend([
383
392
  "-out_mu",
384
- params.get("out_mu")
393
+ params.get("out_mu", None)
385
394
  ])
386
- if params.get("output_debug"):
395
+ if params.get("output_debug", False):
387
396
  cargs.append("-output_debug")
388
- if params.get("out_coeffs") is not None:
397
+ if params.get("out_coeffs", None) is not None:
389
398
  cargs.extend([
390
399
  "-out_coeffs",
391
- params.get("out_coeffs")
400
+ params.get("out_coeffs", None)
392
401
  ])
393
- if params.get("reg_tikhonov") is not None:
402
+ if params.get("reg_tikhonov", None) is not None:
394
403
  cargs.extend([
395
404
  "-reg_tikhonov",
396
- str(params.get("reg_tikhonov"))
405
+ str(params.get("reg_tikhonov", None))
397
406
  ])
398
- if params.get("reg_tv") is not None:
407
+ if params.get("reg_tv", None) is not None:
399
408
  cargs.extend([
400
409
  "-reg_tv",
401
- str(params.get("reg_tv"))
410
+ str(params.get("reg_tv", None))
402
411
  ])
403
- if params.get("min_td_frac") is not None:
412
+ if params.get("min_td_frac", None) is not None:
404
413
  cargs.extend([
405
414
  "-min_td_frac",
406
- str(params.get("min_td_frac"))
415
+ str(params.get("min_td_frac", None))
407
416
  ])
408
- if params.get("min_iters") is not None:
417
+ if params.get("min_iters", None) is not None:
409
418
  cargs.extend([
410
419
  "-min_iters",
411
- str(params.get("min_iters"))
420
+ str(params.get("min_iters", None))
412
421
  ])
413
- if params.get("max_iters") is not None:
422
+ if params.get("max_iters", None) is not None:
414
423
  cargs.extend([
415
424
  "-max_iters",
416
- str(params.get("max_iters"))
425
+ str(params.get("max_iters", None))
417
426
  ])
418
- if params.get("min_factor") is not None:
427
+ if params.get("min_factor", None) is not None:
419
428
  cargs.extend([
420
429
  "-min_factor",
421
- str(params.get("min_factor"))
430
+ str(params.get("min_factor", None))
422
431
  ])
423
- if params.get("min_coeff") is not None:
432
+ if params.get("min_coeff", None) is not None:
424
433
  cargs.extend([
425
434
  "-min_coeff",
426
- str(params.get("min_coeff"))
435
+ str(params.get("min_coeff", None))
427
436
  ])
428
- if params.get("max_factor") is not None:
437
+ if params.get("max_factor", None) is not None:
429
438
  cargs.extend([
430
439
  "-max_factor",
431
- str(params.get("max_factor"))
440
+ str(params.get("max_factor", None))
432
441
  ])
433
- if params.get("max_coeff") is not None:
442
+ if params.get("max_coeff", None) is not None:
434
443
  cargs.extend([
435
444
  "-max_coeff",
436
- str(params.get("max_coeff"))
445
+ str(params.get("max_coeff", None))
437
446
  ])
438
- if params.get("max_coeff_step") is not None:
447
+ if params.get("max_coeff_step", None) is not None:
439
448
  cargs.extend([
440
449
  "-max_coeff_step",
441
- str(params.get("max_coeff_step"))
450
+ str(params.get("max_coeff_step", None))
442
451
  ])
443
- if params.get("min_cf_decrease") is not None:
452
+ if params.get("min_cf_decrease", None) is not None:
444
453
  cargs.extend([
445
454
  "-min_cf_decrease",
446
- str(params.get("min_cf_decrease"))
455
+ str(params.get("min_cf_decrease", None))
447
456
  ])
448
- if params.get("linear"):
457
+ if params.get("linear", False):
449
458
  cargs.append("-linear")
450
- if params.get("info"):
459
+ if params.get("info", False):
451
460
  cargs.append("-info")
452
- if params.get("quiet"):
461
+ if params.get("quiet", False):
453
462
  cargs.append("-quiet")
454
- if params.get("debug"):
463
+ if params.get("debug", False):
455
464
  cargs.append("-debug")
456
- if params.get("force"):
465
+ if params.get("force", False):
457
466
  cargs.append("-force")
458
- if params.get("nthreads") is not None:
467
+ if params.get("nthreads", None) is not None:
459
468
  cargs.extend([
460
469
  "-nthreads",
461
- str(params.get("nthreads"))
470
+ str(params.get("nthreads", None))
462
471
  ])
463
- if params.get("config") is not None:
464
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
465
- if params.get("help"):
472
+ if params.get("config", None) is not None:
473
+ cargs.extend([a for c in [tcksift2_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
474
+ if params.get("help", False):
466
475
  cargs.append("-help")
467
- if params.get("version"):
476
+ if params.get("version", False):
468
477
  cargs.append("-version")
469
- cargs.append(execution.input_file(params.get("in_tracks")))
470
- cargs.append(execution.input_file(params.get("in_fod")))
471
- cargs.append(params.get("out_weights"))
478
+ cargs.append(execution.input_file(params.get("in_tracks", None)))
479
+ cargs.append(execution.input_file(params.get("in_fod", None)))
480
+ cargs.append(params.get("out_weights", None))
472
481
  return cargs
473
482
 
474
483
 
@@ -487,19 +496,21 @@ def tcksift2_outputs(
487
496
  """
488
497
  ret = Tcksift2Outputs(
489
498
  root=execution.output_file("."),
490
- out_weights=execution.output_file(params.get("out_weights")),
491
- csv_=execution.output_file(params.get("csv")) if (params.get("csv") is not None) else None,
492
- out_mu=execution.output_file(params.get("out_mu")) if (params.get("out_mu") is not None) else None,
493
- out_coeffs=execution.output_file(params.get("out_coeffs")) if (params.get("out_coeffs") is not None) else None,
499
+ out_weights=execution.output_file(params.get("out_weights", None)),
500
+ csv_=execution.output_file(params.get("csv", None)) if (params.get("csv") is not None) else None,
501
+ out_mu=execution.output_file(params.get("out_mu", None)) if (params.get("out_mu") is not None) else None,
502
+ out_coeffs=execution.output_file(params.get("out_coeffs", None)) if (params.get("out_coeffs") is not None) else None,
494
503
  )
495
504
  return ret
496
505
 
497
506
 
498
507
  def tcksift2_execute(
499
508
  params: Tcksift2Parameters,
500
- execution: Execution,
509
+ runner: Runner | None = None,
501
510
  ) -> Tcksift2Outputs:
502
511
  """
512
+ tcksift2
513
+
503
514
  Optimise per-streamline cross-section multipliers to match a whole-brain
504
515
  tractogram to fixel-wise fibre densities.
505
516
 
@@ -522,10 +533,12 @@ def tcksift2_execute(
522
533
 
523
534
  Args:
524
535
  params: The parameters.
525
- execution: The execution object.
536
+ runner: Command runner.
526
537
  Returns:
527
538
  NamedTuple of outputs (described in `Tcksift2Outputs`).
528
539
  """
540
+ runner = runner or get_global_runner()
541
+ execution = runner.start_execution(TCKSIFT2_METADATA)
529
542
  params = execution.params(params)
530
543
  cargs = tcksift2_cargs(params, execution)
531
544
  ret = tcksift2_outputs(params, execution)
@@ -571,6 +584,8 @@ def tcksift2(
571
584
  runner: Runner | None = None,
572
585
  ) -> Tcksift2Outputs:
573
586
  """
587
+ tcksift2
588
+
574
589
  Optimise per-streamline cross-section multipliers to match a whole-brain
575
590
  tractogram to fixel-wise fibre densities.
576
591
 
@@ -678,8 +693,6 @@ def tcksift2(
678
693
  Returns:
679
694
  NamedTuple of outputs (described in `Tcksift2Outputs`).
680
695
  """
681
- runner = runner or get_global_runner()
682
- execution = runner.start_execution(TCKSIFT2_METADATA)
683
696
  params = tcksift2_params(
684
697
  proc_mask=proc_mask,
685
698
  act=act,
@@ -716,15 +729,14 @@ def tcksift2(
716
729
  in_fod=in_fod,
717
730
  out_weights=out_weights,
718
731
  )
719
- return tcksift2_execute(params, execution)
732
+ return tcksift2_execute(params, runner)
720
733
 
721
734
 
722
735
  __all__ = [
723
736
  "TCKSIFT2_METADATA",
724
- "Tcksift2ConfigParameters",
725
737
  "Tcksift2Outputs",
726
- "Tcksift2Parameters",
727
738
  "tcksift2",
728
739
  "tcksift2_config_params",
740
+ "tcksift2_execute",
729
741
  "tcksift2_params",
730
742
  ]