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.

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.2.dist-info/METADATA +0 -8
  121. niwrap_mrtrix-0.6.2.dist-info/RECORD +0 -119
  122. 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
  TCKDFC_METADATA = Metadata(
9
- id="d063ae0a6f752adeb538e136080ae7c0b19dd04e.boutiques",
9
+ id="c08d7690e556dae567c956d830fbf83e42bf36aa.boutiques",
10
10
  name="tckdfc",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,21 +14,52 @@ TCKDFC_METADATA = Metadata(
14
14
 
15
15
 
16
16
  TckdfcDynamicParameters = typing.TypedDict('TckdfcDynamicParameters', {
17
- "__STYXTYPE__": typing.Literal["dynamic"],
17
+ "@type": typing.NotRequired[typing.Literal["dynamic"]],
18
+ "shape": str,
19
+ "width": int,
20
+ })
21
+ TckdfcDynamicParametersTagged = typing.TypedDict('TckdfcDynamicParametersTagged', {
22
+ "@type": typing.Literal["dynamic"],
18
23
  "shape": str,
19
24
  "width": int,
20
25
  })
21
26
 
22
27
 
23
28
  TckdfcConfigParameters = typing.TypedDict('TckdfcConfigParameters', {
24
- "__STYXTYPE__": typing.Literal["config"],
29
+ "@type": typing.NotRequired[typing.Literal["config"]],
30
+ "key": str,
31
+ "value": str,
32
+ })
33
+ TckdfcConfigParametersTagged = typing.TypedDict('TckdfcConfigParametersTagged', {
34
+ "@type": typing.Literal["config"],
25
35
  "key": str,
26
36
  "value": str,
27
37
  })
28
38
 
29
39
 
30
40
  TckdfcParameters = typing.TypedDict('TckdfcParameters', {
31
- "__STYXTYPE__": typing.Literal["tckdfc"],
41
+ "@type": typing.NotRequired[typing.Literal["mrtrix/tckdfc"]],
42
+ "static": bool,
43
+ "dynamic": typing.NotRequired[TckdfcDynamicParameters | None],
44
+ "template": typing.NotRequired[InputPathType | None],
45
+ "vox": typing.NotRequired[list[float] | None],
46
+ "stat_vox": typing.NotRequired[str | None],
47
+ "backtrack": bool,
48
+ "upsample": typing.NotRequired[int | None],
49
+ "info": bool,
50
+ "quiet": bool,
51
+ "debug": bool,
52
+ "force": bool,
53
+ "nthreads": typing.NotRequired[int | None],
54
+ "config": typing.NotRequired[list[TckdfcConfigParameters] | None],
55
+ "help": bool,
56
+ "version": bool,
57
+ "tracks": InputPathType,
58
+ "fmri": InputPathType,
59
+ "output": str,
60
+ })
61
+ TckdfcParametersTagged = typing.TypedDict('TckdfcParametersTagged', {
62
+ "@type": typing.Literal["mrtrix/tckdfc"],
32
63
  "static": bool,
33
64
  "dynamic": typing.NotRequired[TckdfcDynamicParameters | None],
34
65
  "template": typing.NotRequired[InputPathType | None],
@@ -48,46 +79,12 @@ TckdfcParameters = typing.TypedDict('TckdfcParameters', {
48
79
  "fmri": InputPathType,
49
80
  "output": str,
50
81
  })
51
-
52
-
53
- def dyn_cargs(
54
- t: str,
55
- ) -> typing.Any:
56
- """
57
- Get build cargs function by command type.
58
-
59
- Args:
60
- t: Command type.
61
- Returns:
62
- Build cargs function.
63
- """
64
- return {
65
- "tckdfc": tckdfc_cargs,
66
- "dynamic": tckdfc_dynamic_cargs,
67
- "config": tckdfc_config_cargs,
68
- }.get(t)
69
-
70
-
71
- def dyn_outputs(
72
- t: str,
73
- ) -> typing.Any:
74
- """
75
- Get build outputs function by command type.
76
-
77
- Args:
78
- t: Command type.
79
- Returns:
80
- Build outputs function.
81
- """
82
- return {
83
- "tckdfc": tckdfc_outputs,
84
- }.get(t)
85
82
 
86
83
 
87
84
  def tckdfc_dynamic_params(
88
85
  shape: str,
89
86
  width: int,
90
- ) -> TckdfcDynamicParameters:
87
+ ) -> TckdfcDynamicParametersTagged:
91
88
  """
92
89
  Build parameters.
93
90
 
@@ -100,7 +97,7 @@ def tckdfc_dynamic_params(
100
97
  Parameter dictionary
101
98
  """
102
99
  params = {
103
- "__STYXTYPE__": "dynamic",
100
+ "@type": "dynamic",
104
101
  "shape": shape,
105
102
  "width": width,
106
103
  }
@@ -122,15 +119,15 @@ def tckdfc_dynamic_cargs(
122
119
  """
123
120
  cargs = []
124
121
  cargs.append("-dynamic")
125
- cargs.append(params.get("shape"))
126
- cargs.append(str(params.get("width")))
122
+ cargs.append(params.get("shape", None))
123
+ cargs.append(str(params.get("width", None)))
127
124
  return cargs
128
125
 
129
126
 
130
127
  def tckdfc_config_params(
131
128
  key: str,
132
129
  value: str,
133
- ) -> TckdfcConfigParameters:
130
+ ) -> TckdfcConfigParametersTagged:
134
131
  """
135
132
  Build parameters.
136
133
 
@@ -141,7 +138,7 @@ def tckdfc_config_params(
141
138
  Parameter dictionary
142
139
  """
143
140
  params = {
144
- "__STYXTYPE__": "config",
141
+ "@type": "config",
145
142
  "key": key,
146
143
  "value": value,
147
144
  }
@@ -163,14 +160,14 @@ def tckdfc_config_cargs(
163
160
  """
164
161
  cargs = []
165
162
  cargs.append("-config")
166
- cargs.append(params.get("key"))
167
- cargs.append(params.get("value"))
163
+ cargs.append(params.get("key", None))
164
+ cargs.append(params.get("value", None))
168
165
  return cargs
169
166
 
170
167
 
171
168
  class TckdfcOutputs(typing.NamedTuple):
172
169
  """
173
- Output object returned when calling `tckdfc(...)`.
170
+ Output object returned when calling `TckdfcParameters(...)`.
174
171
  """
175
172
  root: OutputPathType
176
173
  """Output root folder. This is the root folder for all outputs."""
@@ -197,7 +194,7 @@ def tckdfc_params(
197
194
  config: list[TckdfcConfigParameters] | None = None,
198
195
  help_: bool = False,
199
196
  version: bool = False,
200
- ) -> TckdfcParameters:
197
+ ) -> TckdfcParametersTagged:
201
198
  """
202
199
  Build parameters.
203
200
 
@@ -238,7 +235,7 @@ def tckdfc_params(
238
235
  Parameter dictionary
239
236
  """
240
237
  params = {
241
- "__STYXTYPE__": "tckdfc",
238
+ "@type": "mrtrix/tckdfc",
242
239
  "static": static,
243
240
  "backtrack": backtrack,
244
241
  "info": info,
@@ -283,54 +280,54 @@ def tckdfc_cargs(
283
280
  """
284
281
  cargs = []
285
282
  cargs.append("tckdfc")
286
- if params.get("static"):
283
+ if params.get("static", False):
287
284
  cargs.append("-static")
288
- if params.get("dynamic") is not None:
289
- cargs.extend(dyn_cargs(params.get("dynamic")["__STYXTYPE__"])(params.get("dynamic"), execution))
290
- if params.get("template") is not None:
285
+ if params.get("dynamic", None) is not None:
286
+ cargs.extend(tckdfc_dynamic_cargs(params.get("dynamic", None), execution))
287
+ if params.get("template", None) is not None:
291
288
  cargs.extend([
292
289
  "-template",
293
- execution.input_file(params.get("template"))
290
+ execution.input_file(params.get("template", None))
294
291
  ])
295
- if params.get("vox") is not None:
292
+ if params.get("vox", None) is not None:
296
293
  cargs.extend([
297
294
  "-vox",
298
- ",".join(map(str, params.get("vox")))
295
+ ",".join(map(str, params.get("vox", None)))
299
296
  ])
300
- if params.get("stat_vox") is not None:
297
+ if params.get("stat_vox", None) is not None:
301
298
  cargs.extend([
302
299
  "-stat_vox",
303
- params.get("stat_vox")
300
+ params.get("stat_vox", None)
304
301
  ])
305
- if params.get("backtrack"):
302
+ if params.get("backtrack", False):
306
303
  cargs.append("-backtrack")
307
- if params.get("upsample") is not None:
304
+ if params.get("upsample", None) is not None:
308
305
  cargs.extend([
309
306
  "-upsample",
310
- str(params.get("upsample"))
307
+ str(params.get("upsample", None))
311
308
  ])
312
- if params.get("info"):
309
+ if params.get("info", False):
313
310
  cargs.append("-info")
314
- if params.get("quiet"):
311
+ if params.get("quiet", False):
315
312
  cargs.append("-quiet")
316
- if params.get("debug"):
313
+ if params.get("debug", False):
317
314
  cargs.append("-debug")
318
- if params.get("force"):
315
+ if params.get("force", False):
319
316
  cargs.append("-force")
320
- if params.get("nthreads") is not None:
317
+ if params.get("nthreads", None) is not None:
321
318
  cargs.extend([
322
319
  "-nthreads",
323
- str(params.get("nthreads"))
320
+ str(params.get("nthreads", None))
324
321
  ])
325
- if params.get("config") is not None:
326
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
327
- if params.get("help"):
322
+ if params.get("config", None) is not None:
323
+ cargs.extend([a for c in [tckdfc_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
324
+ if params.get("help", False):
328
325
  cargs.append("-help")
329
- if params.get("version"):
326
+ if params.get("version", False):
330
327
  cargs.append("-version")
331
- cargs.append(execution.input_file(params.get("tracks")))
332
- cargs.append(execution.input_file(params.get("fmri")))
333
- cargs.append(params.get("output"))
328
+ cargs.append(execution.input_file(params.get("tracks", None)))
329
+ cargs.append(execution.input_file(params.get("fmri", None)))
330
+ cargs.append(params.get("output", None))
334
331
  return cargs
335
332
 
336
333
 
@@ -349,16 +346,18 @@ def tckdfc_outputs(
349
346
  """
350
347
  ret = TckdfcOutputs(
351
348
  root=execution.output_file("."),
352
- output=execution.output_file(params.get("output")),
349
+ output=execution.output_file(params.get("output", None)),
353
350
  )
354
351
  return ret
355
352
 
356
353
 
357
354
  def tckdfc_execute(
358
355
  params: TckdfcParameters,
359
- execution: Execution,
356
+ runner: Runner | None = None,
360
357
  ) -> TckdfcOutputs:
361
358
  """
359
+ tckdfc
360
+
362
361
  Perform the Track-Weighted Dynamic Functional Connectivity (TW-dFC) method.
363
362
 
364
363
  This command generates a Track-Weighted Image (TWI), where the contribution
@@ -402,10 +401,12 @@ def tckdfc_execute(
402
401
 
403
402
  Args:
404
403
  params: The parameters.
405
- execution: The execution object.
404
+ runner: Command runner.
406
405
  Returns:
407
406
  NamedTuple of outputs (described in `TckdfcOutputs`).
408
407
  """
408
+ runner = runner or get_global_runner()
409
+ execution = runner.start_execution(TCKDFC_METADATA)
409
410
  params = execution.params(params)
410
411
  cargs = tckdfc_cargs(params, execution)
411
412
  ret = tckdfc_outputs(params, execution)
@@ -435,6 +436,8 @@ def tckdfc(
435
436
  runner: Runner | None = None,
436
437
  ) -> TckdfcOutputs:
437
438
  """
439
+ tckdfc
440
+
438
441
  Perform the Track-Weighted Dynamic Functional Connectivity (TW-dFC) method.
439
442
 
440
443
  This command generates a Track-Weighted Image (TWI), where the contribution
@@ -513,8 +516,6 @@ def tckdfc(
513
516
  Returns:
514
517
  NamedTuple of outputs (described in `TckdfcOutputs`).
515
518
  """
516
- runner = runner or get_global_runner()
517
- execution = runner.start_execution(TCKDFC_METADATA)
518
519
  params = tckdfc_params(
519
520
  static=static,
520
521
  dynamic=dynamic,
@@ -535,17 +536,15 @@ def tckdfc(
535
536
  fmri=fmri,
536
537
  output=output,
537
538
  )
538
- return tckdfc_execute(params, execution)
539
+ return tckdfc_execute(params, runner)
539
540
 
540
541
 
541
542
  __all__ = [
542
543
  "TCKDFC_METADATA",
543
- "TckdfcConfigParameters",
544
- "TckdfcDynamicParameters",
545
544
  "TckdfcOutputs",
546
- "TckdfcParameters",
547
545
  "tckdfc",
548
546
  "tckdfc_config_params",
549
547
  "tckdfc_dynamic_params",
548
+ "tckdfc_execute",
550
549
  "tckdfc_params",
551
550
  ]