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
  DWI2MASK_METADATA = Metadata(
9
- id="9d585c1eb8931fbf6a7b9b4efcfcbe79a0ec151f.boutiques",
9
+ id="5345247ad41518ec6a872de4d754e7c58b01dff1.boutiques",
10
10
  name="dwi2mask",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,21 +14,47 @@ DWI2MASK_METADATA = Metadata(
14
14
 
15
15
 
16
16
  Dwi2maskFslgradParameters = typing.TypedDict('Dwi2maskFslgradParameters', {
17
- "__STYXTYPE__": typing.Literal["fslgrad"],
17
+ "@type": typing.NotRequired[typing.Literal["fslgrad"]],
18
+ "bvecs": InputPathType,
19
+ "bvals": InputPathType,
20
+ })
21
+ Dwi2maskFslgradParametersTagged = typing.TypedDict('Dwi2maskFslgradParametersTagged', {
22
+ "@type": typing.Literal["fslgrad"],
18
23
  "bvecs": InputPathType,
19
24
  "bvals": InputPathType,
20
25
  })
21
26
 
22
27
 
23
28
  Dwi2maskConfigParameters = typing.TypedDict('Dwi2maskConfigParameters', {
24
- "__STYXTYPE__": typing.Literal["config"],
29
+ "@type": typing.NotRequired[typing.Literal["config"]],
30
+ "key": str,
31
+ "value": str,
32
+ })
33
+ Dwi2maskConfigParametersTagged = typing.TypedDict('Dwi2maskConfigParametersTagged', {
34
+ "@type": typing.Literal["config"],
25
35
  "key": str,
26
36
  "value": str,
27
37
  })
28
38
 
29
39
 
30
40
  Dwi2maskParameters = typing.TypedDict('Dwi2maskParameters', {
31
- "__STYXTYPE__": typing.Literal["dwi2mask"],
41
+ "@type": typing.NotRequired[typing.Literal["mrtrix/dwi2mask"]],
42
+ "clean_scale": typing.NotRequired[int | None],
43
+ "grad": typing.NotRequired[InputPathType | None],
44
+ "fslgrad": typing.NotRequired[Dwi2maskFslgradParameters | None],
45
+ "info": bool,
46
+ "quiet": bool,
47
+ "debug": bool,
48
+ "force": bool,
49
+ "nthreads": typing.NotRequired[int | None],
50
+ "config": typing.NotRequired[list[Dwi2maskConfigParameters] | None],
51
+ "help": bool,
52
+ "version": bool,
53
+ "input": InputPathType,
54
+ "output": str,
55
+ })
56
+ Dwi2maskParametersTagged = typing.TypedDict('Dwi2maskParametersTagged', {
57
+ "@type": typing.Literal["mrtrix/dwi2mask"],
32
58
  "clean_scale": typing.NotRequired[int | None],
33
59
  "grad": typing.NotRequired[InputPathType | None],
34
60
  "fslgrad": typing.NotRequired[Dwi2maskFslgradParameters | None],
@@ -43,46 +69,12 @@ Dwi2maskParameters = typing.TypedDict('Dwi2maskParameters', {
43
69
  "input": InputPathType,
44
70
  "output": str,
45
71
  })
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
- "dwi2mask": dwi2mask_cargs,
61
- "fslgrad": dwi2mask_fslgrad_cargs,
62
- "config": dwi2mask_config_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
- "dwi2mask": dwi2mask_outputs,
79
- }.get(t)
80
72
 
81
73
 
82
74
  def dwi2mask_fslgrad_params(
83
75
  bvecs: InputPathType,
84
76
  bvals: InputPathType,
85
- ) -> Dwi2maskFslgradParameters:
77
+ ) -> Dwi2maskFslgradParametersTagged:
86
78
  """
87
79
  Build parameters.
88
80
 
@@ -99,7 +91,7 @@ def dwi2mask_fslgrad_params(
99
91
  Parameter dictionary
100
92
  """
101
93
  params = {
102
- "__STYXTYPE__": "fslgrad",
94
+ "@type": "fslgrad",
103
95
  "bvecs": bvecs,
104
96
  "bvals": bvals,
105
97
  }
@@ -121,15 +113,15 @@ def dwi2mask_fslgrad_cargs(
121
113
  """
122
114
  cargs = []
123
115
  cargs.append("-fslgrad")
124
- cargs.append(execution.input_file(params.get("bvecs")))
125
- cargs.append(execution.input_file(params.get("bvals")))
116
+ cargs.append(execution.input_file(params.get("bvecs", None)))
117
+ cargs.append(execution.input_file(params.get("bvals", None)))
126
118
  return cargs
127
119
 
128
120
 
129
121
  def dwi2mask_config_params(
130
122
  key: str,
131
123
  value: str,
132
- ) -> Dwi2maskConfigParameters:
124
+ ) -> Dwi2maskConfigParametersTagged:
133
125
  """
134
126
  Build parameters.
135
127
 
@@ -140,7 +132,7 @@ def dwi2mask_config_params(
140
132
  Parameter dictionary
141
133
  """
142
134
  params = {
143
- "__STYXTYPE__": "config",
135
+ "@type": "config",
144
136
  "key": key,
145
137
  "value": value,
146
138
  }
@@ -162,14 +154,14 @@ def dwi2mask_config_cargs(
162
154
  """
163
155
  cargs = []
164
156
  cargs.append("-config")
165
- cargs.append(params.get("key"))
166
- cargs.append(params.get("value"))
157
+ cargs.append(params.get("key", None))
158
+ cargs.append(params.get("value", None))
167
159
  return cargs
168
160
 
169
161
 
170
162
  class Dwi2maskOutputs(typing.NamedTuple):
171
163
  """
172
- Output object returned when calling `dwi2mask(...)`.
164
+ Output object returned when calling `Dwi2maskParameters(...)`.
173
165
  """
174
166
  root: OutputPathType
175
167
  """Output root folder. This is the root folder for all outputs."""
@@ -191,7 +183,7 @@ def dwi2mask_params(
191
183
  config: list[Dwi2maskConfigParameters] | None = None,
192
184
  help_: bool = False,
193
185
  version: bool = False,
194
- ) -> Dwi2maskParameters:
186
+ ) -> Dwi2maskParametersTagged:
195
187
  """
196
188
  Build parameters.
197
189
 
@@ -228,7 +220,7 @@ def dwi2mask_params(
228
220
  Parameter dictionary
229
221
  """
230
222
  params = {
231
- "__STYXTYPE__": "dwi2mask",
223
+ "@type": "mrtrix/dwi2mask",
232
224
  "info": info,
233
225
  "quiet": quiet,
234
226
  "debug": debug,
@@ -266,39 +258,39 @@ def dwi2mask_cargs(
266
258
  """
267
259
  cargs = []
268
260
  cargs.append("dwi2mask")
269
- if params.get("clean_scale") is not None:
261
+ if params.get("clean_scale", None) is not None:
270
262
  cargs.extend([
271
263
  "-clean_scale",
272
- str(params.get("clean_scale"))
264
+ str(params.get("clean_scale", None))
273
265
  ])
274
- if params.get("grad") is not None:
266
+ if params.get("grad", None) is not None:
275
267
  cargs.extend([
276
268
  "-grad",
277
- execution.input_file(params.get("grad"))
269
+ execution.input_file(params.get("grad", None))
278
270
  ])
279
- if params.get("fslgrad") is not None:
280
- cargs.extend(dyn_cargs(params.get("fslgrad")["__STYXTYPE__"])(params.get("fslgrad"), execution))
281
- if params.get("info"):
271
+ if params.get("fslgrad", None) is not None:
272
+ cargs.extend(dwi2mask_fslgrad_cargs(params.get("fslgrad", None), execution))
273
+ if params.get("info", False):
282
274
  cargs.append("-info")
283
- if params.get("quiet"):
275
+ if params.get("quiet", False):
284
276
  cargs.append("-quiet")
285
- if params.get("debug"):
277
+ if params.get("debug", False):
286
278
  cargs.append("-debug")
287
- if params.get("force"):
279
+ if params.get("force", False):
288
280
  cargs.append("-force")
289
- if params.get("nthreads") is not None:
281
+ if params.get("nthreads", None) is not None:
290
282
  cargs.extend([
291
283
  "-nthreads",
292
- str(params.get("nthreads"))
284
+ str(params.get("nthreads", None))
293
285
  ])
294
- if params.get("config") is not None:
295
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
296
- if params.get("help"):
286
+ if params.get("config", None) is not None:
287
+ cargs.extend([a for c in [dwi2mask_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
288
+ if params.get("help", False):
297
289
  cargs.append("-help")
298
- if params.get("version"):
290
+ if params.get("version", False):
299
291
  cargs.append("-version")
300
- cargs.append(execution.input_file(params.get("input")))
301
- cargs.append(params.get("output"))
292
+ cargs.append(execution.input_file(params.get("input", None)))
293
+ cargs.append(params.get("output", None))
302
294
  return cargs
303
295
 
304
296
 
@@ -317,16 +309,18 @@ def dwi2mask_outputs(
317
309
  """
318
310
  ret = Dwi2maskOutputs(
319
311
  root=execution.output_file("."),
320
- output=execution.output_file(params.get("output")),
312
+ output=execution.output_file(params.get("output", None)),
321
313
  )
322
314
  return ret
323
315
 
324
316
 
325
317
  def dwi2mask_execute(
326
318
  params: Dwi2maskParameters,
327
- execution: Execution,
319
+ runner: Runner | None = None,
328
320
  ) -> Dwi2maskOutputs:
329
321
  """
322
+ dwi2mask
323
+
330
324
  Generates a whole brain mask from a DWI image.
331
325
 
332
326
  All diffusion weighted and b=0 volumes are used to obtain a mask that
@@ -349,10 +343,12 @@ def dwi2mask_execute(
349
343
 
350
344
  Args:
351
345
  params: The parameters.
352
- execution: The execution object.
346
+ runner: Command runner.
353
347
  Returns:
354
348
  NamedTuple of outputs (described in `Dwi2maskOutputs`).
355
349
  """
350
+ runner = runner or get_global_runner()
351
+ execution = runner.start_execution(DWI2MASK_METADATA)
356
352
  params = execution.params(params)
357
353
  cargs = dwi2mask_cargs(params, execution)
358
354
  ret = dwi2mask_outputs(params, execution)
@@ -377,6 +373,8 @@ def dwi2mask(
377
373
  runner: Runner | None = None,
378
374
  ) -> Dwi2maskOutputs:
379
375
  """
376
+ dwi2mask
377
+
380
378
  Generates a whole brain mask from a DWI image.
381
379
 
382
380
  All diffusion weighted and b=0 volumes are used to obtain a mask that
@@ -430,8 +428,6 @@ def dwi2mask(
430
428
  Returns:
431
429
  NamedTuple of outputs (described in `Dwi2maskOutputs`).
432
430
  """
433
- runner = runner or get_global_runner()
434
- execution = runner.start_execution(DWI2MASK_METADATA)
435
431
  params = dwi2mask_params(
436
432
  clean_scale=clean_scale,
437
433
  grad=grad,
@@ -447,17 +443,15 @@ def dwi2mask(
447
443
  input_=input_,
448
444
  output=output,
449
445
  )
450
- return dwi2mask_execute(params, execution)
446
+ return dwi2mask_execute(params, runner)
451
447
 
452
448
 
453
449
  __all__ = [
454
450
  "DWI2MASK_METADATA",
455
- "Dwi2maskConfigParameters",
456
- "Dwi2maskFslgradParameters",
457
451
  "Dwi2maskOutputs",
458
- "Dwi2maskParameters",
459
452
  "dwi2mask",
460
453
  "dwi2mask_config_params",
454
+ "dwi2mask_execute",
461
455
  "dwi2mask_fslgrad_params",
462
456
  "dwi2mask_params",
463
457
  ]