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
  AMP2RESPONSE_METADATA = Metadata(
9
- id="595ba79cb332171ea1c684f3892ef9837a82d7ce.boutiques",
9
+ id="f0088602c41a6ff20ec7c430ad21aee73ff1f3e4.boutiques",
10
10
  name="amp2response",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,39 @@ AMP2RESPONSE_METADATA = Metadata(
14
14
 
15
15
 
16
16
  Amp2responseConfigParameters = typing.TypedDict('Amp2responseConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ Amp2responseConfigParametersTagged = typing.TypedDict('Amp2responseConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  Amp2responseParameters = typing.TypedDict('Amp2responseParameters', {
24
- "__STYXTYPE__": typing.Literal["amp2response"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/amp2response"]],
30
+ "isotropic": bool,
31
+ "noconstraint": bool,
32
+ "directions": typing.NotRequired[InputPathType | None],
33
+ "shells": typing.NotRequired[list[float] | None],
34
+ "lmax": typing.NotRequired[list[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[Amp2responseConfigParameters] | None],
41
+ "help": bool,
42
+ "version": bool,
43
+ "amps": InputPathType,
44
+ "mask": InputPathType,
45
+ "directions_1": InputPathType,
46
+ "response": str,
47
+ })
48
+ Amp2responseParametersTagged = typing.TypedDict('Amp2responseParametersTagged', {
49
+ "@type": typing.Literal["mrtrix/amp2response"],
25
50
  "isotropic": bool,
26
51
  "noconstraint": bool,
27
52
  "directions": typing.NotRequired[InputPathType | None],
@@ -40,45 +65,12 @@ Amp2responseParameters = typing.TypedDict('Amp2responseParameters', {
40
65
  "directions_1": InputPathType,
41
66
  "response": str,
42
67
  })
43
-
44
-
45
- def dyn_cargs(
46
- t: str,
47
- ) -> typing.Any:
48
- """
49
- Get build cargs function by command type.
50
-
51
- Args:
52
- t: Command type.
53
- Returns:
54
- Build cargs function.
55
- """
56
- return {
57
- "amp2response": amp2response_cargs,
58
- "config": amp2response_config_cargs,
59
- }.get(t)
60
-
61
-
62
- def dyn_outputs(
63
- t: str,
64
- ) -> typing.Any:
65
- """
66
- Get build outputs function by command type.
67
-
68
- Args:
69
- t: Command type.
70
- Returns:
71
- Build outputs function.
72
- """
73
- return {
74
- "amp2response": amp2response_outputs,
75
- }.get(t)
76
68
 
77
69
 
78
70
  def amp2response_config_params(
79
71
  key: str,
80
72
  value: str,
81
- ) -> Amp2responseConfigParameters:
73
+ ) -> Amp2responseConfigParametersTagged:
82
74
  """
83
75
  Build parameters.
84
76
 
@@ -89,7 +81,7 @@ def amp2response_config_params(
89
81
  Parameter dictionary
90
82
  """
91
83
  params = {
92
- "__STYXTYPE__": "config",
84
+ "@type": "config",
93
85
  "key": key,
94
86
  "value": value,
95
87
  }
@@ -111,14 +103,14 @@ def amp2response_config_cargs(
111
103
  """
112
104
  cargs = []
113
105
  cargs.append("-config")
114
- cargs.append(params.get("key"))
115
- cargs.append(params.get("value"))
106
+ cargs.append(params.get("key", None))
107
+ cargs.append(params.get("value", None))
116
108
  return cargs
117
109
 
118
110
 
119
111
  class Amp2responseOutputs(typing.NamedTuple):
120
112
  """
121
- Output object returned when calling `amp2response(...)`.
113
+ Output object returned when calling `Amp2responseParameters(...)`.
122
114
  """
123
115
  root: OutputPathType
124
116
  """Output root folder. This is the root folder for all outputs."""
@@ -144,7 +136,7 @@ def amp2response_params(
144
136
  config: list[Amp2responseConfigParameters] | None = None,
145
137
  help_: bool = False,
146
138
  version: bool = False,
147
- ) -> Amp2responseParameters:
139
+ ) -> Amp2responseParametersTagged:
148
140
  """
149
141
  Build parameters.
150
142
 
@@ -187,7 +179,7 @@ def amp2response_params(
187
179
  Parameter dictionary
188
180
  """
189
181
  params = {
190
- "__STYXTYPE__": "amp2response",
182
+ "@type": "mrtrix/amp2response",
191
183
  "isotropic": isotropic,
192
184
  "noconstraint": noconstraint,
193
185
  "info": info,
@@ -229,48 +221,48 @@ def amp2response_cargs(
229
221
  """
230
222
  cargs = []
231
223
  cargs.append("amp2response")
232
- if params.get("isotropic"):
224
+ if params.get("isotropic", False):
233
225
  cargs.append("-isotropic")
234
- if params.get("noconstraint"):
226
+ if params.get("noconstraint", False):
235
227
  cargs.append("-noconstraint")
236
- if params.get("directions") is not None:
228
+ if params.get("directions", None) is not None:
237
229
  cargs.extend([
238
230
  "-directions",
239
- execution.input_file(params.get("directions"))
231
+ execution.input_file(params.get("directions", None))
240
232
  ])
241
- if params.get("shells") is not None:
233
+ if params.get("shells", None) is not None:
242
234
  cargs.extend([
243
235
  "-shells",
244
- ",".join(map(str, params.get("shells")))
236
+ ",".join(map(str, params.get("shells", None)))
245
237
  ])
246
- if params.get("lmax") is not None:
238
+ if params.get("lmax", None) is not None:
247
239
  cargs.extend([
248
240
  "-lmax",
249
- ",".join(map(str, params.get("lmax")))
241
+ ",".join(map(str, params.get("lmax", None)))
250
242
  ])
251
- if params.get("info"):
243
+ if params.get("info", False):
252
244
  cargs.append("-info")
253
- if params.get("quiet"):
245
+ if params.get("quiet", False):
254
246
  cargs.append("-quiet")
255
- if params.get("debug"):
247
+ if params.get("debug", False):
256
248
  cargs.append("-debug")
257
- if params.get("force"):
249
+ if params.get("force", False):
258
250
  cargs.append("-force")
259
- if params.get("nthreads") is not None:
251
+ if params.get("nthreads", None) is not None:
260
252
  cargs.extend([
261
253
  "-nthreads",
262
- str(params.get("nthreads"))
254
+ str(params.get("nthreads", None))
263
255
  ])
264
- if params.get("config") is not None:
265
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
266
- if params.get("help"):
256
+ if params.get("config", None) is not None:
257
+ cargs.extend([a for c in [amp2response_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
258
+ if params.get("help", False):
267
259
  cargs.append("-help")
268
- if params.get("version"):
260
+ if params.get("version", False):
269
261
  cargs.append("-version")
270
- cargs.append(execution.input_file(params.get("amps")))
271
- cargs.append(execution.input_file(params.get("mask")))
272
- cargs.append(execution.input_file(params.get("directions_1")))
273
- cargs.append(params.get("response"))
262
+ cargs.append(execution.input_file(params.get("amps", None)))
263
+ cargs.append(execution.input_file(params.get("mask", None)))
264
+ cargs.append(execution.input_file(params.get("directions_1", None)))
265
+ cargs.append(params.get("response", None))
274
266
  return cargs
275
267
 
276
268
 
@@ -289,18 +281,20 @@ def amp2response_outputs(
289
281
  """
290
282
  ret = Amp2responseOutputs(
291
283
  root=execution.output_file("."),
292
- response=execution.output_file(params.get("response")),
284
+ response=execution.output_file(params.get("response", None)),
293
285
  )
294
286
  return ret
295
287
 
296
288
 
297
289
  def amp2response_execute(
298
290
  params: Amp2responseParameters,
299
- execution: Execution,
291
+ runner: Runner | None = None,
300
292
  ) -> Amp2responseOutputs:
301
293
  """
302
- Estimate response function coefficients based on the DWI signal in single-fibre
303
- voxels.
294
+ amp2response
295
+
296
+ Estimate response function coefficients based on the DWI signal in
297
+ single-fibre voxels.
304
298
 
305
299
  This command uses the image data from all selected single-fibre voxels
306
300
  concurrently, rather than simply averaging their individual spherical
@@ -324,10 +318,12 @@ def amp2response_execute(
324
318
 
325
319
  Args:
326
320
  params: The parameters.
327
- execution: The execution object.
321
+ runner: Command runner.
328
322
  Returns:
329
323
  NamedTuple of outputs (described in `Amp2responseOutputs`).
330
324
  """
325
+ runner = runner or get_global_runner()
326
+ execution = runner.start_execution(AMP2RESPONSE_METADATA)
331
327
  params = execution.params(params)
332
328
  cargs = amp2response_cargs(params, execution)
333
329
  ret = amp2response_outputs(params, execution)
@@ -356,8 +352,10 @@ def amp2response(
356
352
  runner: Runner | None = None,
357
353
  ) -> Amp2responseOutputs:
358
354
  """
359
- Estimate response function coefficients based on the DWI signal in single-fibre
360
- voxels.
355
+ amp2response
356
+
357
+ Estimate response function coefficients based on the DWI signal in
358
+ single-fibre voxels.
361
359
 
362
360
  This command uses the image data from all selected single-fibre voxels
363
361
  concurrently, rather than simply averaging their individual spherical
@@ -418,8 +416,6 @@ def amp2response(
418
416
  Returns:
419
417
  NamedTuple of outputs (described in `Amp2responseOutputs`).
420
418
  """
421
- runner = runner or get_global_runner()
422
- execution = runner.start_execution(AMP2RESPONSE_METADATA)
423
419
  params = amp2response_params(
424
420
  isotropic=isotropic,
425
421
  noconstraint=noconstraint,
@@ -439,15 +435,14 @@ def amp2response(
439
435
  directions_1=directions_1,
440
436
  response=response,
441
437
  )
442
- return amp2response_execute(params, execution)
438
+ return amp2response_execute(params, runner)
443
439
 
444
440
 
445
441
  __all__ = [
446
442
  "AMP2RESPONSE_METADATA",
447
- "Amp2responseConfigParameters",
448
443
  "Amp2responseOutputs",
449
- "Amp2responseParameters",
450
444
  "amp2response",
451
445
  "amp2response_config_params",
446
+ "amp2response_execute",
452
447
  "amp2response_params",
453
448
  ]