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
  WARPCONVERT_METADATA = Metadata(
9
- id="32e6c5d3c78c56a0fcca0c5a864eb34e71feeb43.boutiques",
9
+ id="7468f4768b6e008e092ad5508a8d2b4875bab30a.boutiques",
10
10
  name="warpconvert",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,36 @@ WARPCONVERT_METADATA = Metadata(
14
14
 
15
15
 
16
16
  WarpconvertConfigParameters = typing.TypedDict('WarpconvertConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ WarpconvertConfigParametersTagged = typing.TypedDict('WarpconvertConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  WarpconvertParameters = typing.TypedDict('WarpconvertParameters', {
24
- "__STYXTYPE__": typing.Literal["warpconvert"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/warpconvert"]],
30
+ "template": typing.NotRequired[InputPathType | None],
31
+ "midway_space": bool,
32
+ "from": typing.NotRequired[int | None],
33
+ "info": bool,
34
+ "quiet": bool,
35
+ "debug": bool,
36
+ "force": bool,
37
+ "nthreads": typing.NotRequired[int | None],
38
+ "config": typing.NotRequired[list[WarpconvertConfigParameters] | None],
39
+ "help": bool,
40
+ "version": bool,
41
+ "in": InputPathType,
42
+ "type": str,
43
+ "out": str,
44
+ })
45
+ WarpconvertParametersTagged = typing.TypedDict('WarpconvertParametersTagged', {
46
+ "@type": typing.Literal["mrtrix/warpconvert"],
25
47
  "template": typing.NotRequired[InputPathType | None],
26
48
  "midway_space": bool,
27
49
  "from": typing.NotRequired[int | None],
@@ -37,45 +59,12 @@ WarpconvertParameters = typing.TypedDict('WarpconvertParameters', {
37
59
  "type": str,
38
60
  "out": str,
39
61
  })
40
-
41
-
42
- def dyn_cargs(
43
- t: str,
44
- ) -> typing.Any:
45
- """
46
- Get build cargs function by command type.
47
-
48
- Args:
49
- t: Command type.
50
- Returns:
51
- Build cargs function.
52
- """
53
- return {
54
- "warpconvert": warpconvert_cargs,
55
- "config": warpconvert_config_cargs,
56
- }.get(t)
57
-
58
-
59
- def dyn_outputs(
60
- t: str,
61
- ) -> typing.Any:
62
- """
63
- Get build outputs function by command type.
64
-
65
- Args:
66
- t: Command type.
67
- Returns:
68
- Build outputs function.
69
- """
70
- return {
71
- "warpconvert": warpconvert_outputs,
72
- }.get(t)
73
62
 
74
63
 
75
64
  def warpconvert_config_params(
76
65
  key: str,
77
66
  value: str,
78
- ) -> WarpconvertConfigParameters:
67
+ ) -> WarpconvertConfigParametersTagged:
79
68
  """
80
69
  Build parameters.
81
70
 
@@ -86,7 +75,7 @@ def warpconvert_config_params(
86
75
  Parameter dictionary
87
76
  """
88
77
  params = {
89
- "__STYXTYPE__": "config",
78
+ "@type": "config",
90
79
  "key": key,
91
80
  "value": value,
92
81
  }
@@ -108,14 +97,14 @@ def warpconvert_config_cargs(
108
97
  """
109
98
  cargs = []
110
99
  cargs.append("-config")
111
- cargs.append(params.get("key"))
112
- cargs.append(params.get("value"))
100
+ cargs.append(params.get("key", None))
101
+ cargs.append(params.get("value", None))
113
102
  return cargs
114
103
 
115
104
 
116
105
  class WarpconvertOutputs(typing.NamedTuple):
117
106
  """
118
- Output object returned when calling `warpconvert(...)`.
107
+ Output object returned when calling `WarpconvertParameters(...)`.
119
108
  """
120
109
  root: OutputPathType
121
110
  """Output root folder. This is the root folder for all outputs."""
@@ -138,7 +127,7 @@ def warpconvert_params(
138
127
  config: list[WarpconvertConfigParameters] | None = None,
139
128
  help_: bool = False,
140
129
  version: bool = False,
141
- ) -> WarpconvertParameters:
130
+ ) -> WarpconvertParametersTagged:
142
131
  """
143
132
  Build parameters.
144
133
 
@@ -178,7 +167,7 @@ def warpconvert_params(
178
167
  Parameter dictionary
179
168
  """
180
169
  params = {
181
- "__STYXTYPE__": "warpconvert",
170
+ "@type": "mrtrix/warpconvert",
182
171
  "midway_space": midway_space,
183
172
  "info": info,
184
173
  "quiet": quiet,
@@ -216,40 +205,40 @@ def warpconvert_cargs(
216
205
  """
217
206
  cargs = []
218
207
  cargs.append("warpconvert")
219
- if params.get("template") is not None:
208
+ if params.get("template", None) is not None:
220
209
  cargs.extend([
221
210
  "-template",
222
- execution.input_file(params.get("template"))
211
+ execution.input_file(params.get("template", None))
223
212
  ])
224
- if params.get("midway_space"):
213
+ if params.get("midway_space", False):
225
214
  cargs.append("-midway_space")
226
- if params.get("from") is not None:
215
+ if params.get("from", None) is not None:
227
216
  cargs.extend([
228
217
  "-from",
229
- str(params.get("from"))
218
+ str(params.get("from", None))
230
219
  ])
231
- if params.get("info"):
220
+ if params.get("info", False):
232
221
  cargs.append("-info")
233
- if params.get("quiet"):
222
+ if params.get("quiet", False):
234
223
  cargs.append("-quiet")
235
- if params.get("debug"):
224
+ if params.get("debug", False):
236
225
  cargs.append("-debug")
237
- if params.get("force"):
226
+ if params.get("force", False):
238
227
  cargs.append("-force")
239
- if params.get("nthreads") is not None:
228
+ if params.get("nthreads", None) is not None:
240
229
  cargs.extend([
241
230
  "-nthreads",
242
- str(params.get("nthreads"))
231
+ str(params.get("nthreads", None))
243
232
  ])
244
- if params.get("config") is not None:
245
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
246
- if params.get("help"):
233
+ if params.get("config", None) is not None:
234
+ cargs.extend([a for c in [warpconvert_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
235
+ if params.get("help", False):
247
236
  cargs.append("-help")
248
- if params.get("version"):
237
+ if params.get("version", False):
249
238
  cargs.append("-version")
250
- cargs.append(execution.input_file(params.get("in")))
251
- cargs.append(params.get("type"))
252
- cargs.append(params.get("out"))
239
+ cargs.append(execution.input_file(params.get("in", None)))
240
+ cargs.append(params.get("type", None))
241
+ cargs.append(params.get("out", None))
253
242
  return cargs
254
243
 
255
244
 
@@ -268,16 +257,18 @@ def warpconvert_outputs(
268
257
  """
269
258
  ret = WarpconvertOutputs(
270
259
  root=execution.output_file("."),
271
- out=execution.output_file(params.get("out")),
260
+ out=execution.output_file(params.get("out", None)),
272
261
  )
273
262
  return ret
274
263
 
275
264
 
276
265
  def warpconvert_execute(
277
266
  params: WarpconvertParameters,
278
- execution: Execution,
267
+ runner: Runner | None = None,
279
268
  ) -> WarpconvertOutputs:
280
269
  """
270
+ warpconvert
271
+
281
272
  Convert between different representations of a non-linear warp.
282
273
 
283
274
  A deformation field is defined as an image where each voxel defines the
@@ -297,10 +288,12 @@ def warpconvert_execute(
297
288
 
298
289
  Args:
299
290
  params: The parameters.
300
- execution: The execution object.
291
+ runner: Command runner.
301
292
  Returns:
302
293
  NamedTuple of outputs (described in `WarpconvertOutputs`).
303
294
  """
295
+ runner = runner or get_global_runner()
296
+ execution = runner.start_execution(WARPCONVERT_METADATA)
304
297
  params = execution.params(params)
305
298
  cargs = warpconvert_cargs(params, execution)
306
299
  ret = warpconvert_outputs(params, execution)
@@ -326,6 +319,8 @@ def warpconvert(
326
319
  runner: Runner | None = None,
327
320
  ) -> WarpconvertOutputs:
328
321
  """
322
+ warpconvert
323
+
329
324
  Convert between different representations of a non-linear warp.
330
325
 
331
326
  A deformation field is defined as an image where each voxel defines the
@@ -379,8 +374,6 @@ def warpconvert(
379
374
  Returns:
380
375
  NamedTuple of outputs (described in `WarpconvertOutputs`).
381
376
  """
382
- runner = runner or get_global_runner()
383
- execution = runner.start_execution(WARPCONVERT_METADATA)
384
377
  params = warpconvert_params(
385
378
  template=template,
386
379
  midway_space=midway_space,
@@ -397,15 +390,14 @@ def warpconvert(
397
390
  type_=type_,
398
391
  out=out,
399
392
  )
400
- return warpconvert_execute(params, execution)
393
+ return warpconvert_execute(params, runner)
401
394
 
402
395
 
403
396
  __all__ = [
404
397
  "WARPCONVERT_METADATA",
405
- "WarpconvertConfigParameters",
406
398
  "WarpconvertOutputs",
407
- "WarpconvertParameters",
408
399
  "warpconvert",
409
400
  "warpconvert_config_params",
401
+ "warpconvert_execute",
410
402
  "warpconvert_params",
411
403
  ]
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  WARPCORRECT_METADATA = Metadata(
9
- id="0f830221bdd17e83588ad92fc905ee407c4292f6.boutiques",
9
+ id="d93e432b2c126575958a3ff19d36f91ad4461c2e.boutiques",
10
10
  name="warpcorrect",
11
11
  package="mrtrix",
12
12
  container_image_tag="mrtrix3/mrtrix3:3.0.4",
@@ -14,14 +14,34 @@ WARPCORRECT_METADATA = Metadata(
14
14
 
15
15
 
16
16
  WarpcorrectConfigParameters = typing.TypedDict('WarpcorrectConfigParameters', {
17
- "__STYXTYPE__": typing.Literal["config"],
17
+ "@type": typing.NotRequired[typing.Literal["config"]],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+ WarpcorrectConfigParametersTagged = typing.TypedDict('WarpcorrectConfigParametersTagged', {
22
+ "@type": typing.Literal["config"],
18
23
  "key": str,
19
24
  "value": str,
20
25
  })
21
26
 
22
27
 
23
28
  WarpcorrectParameters = typing.TypedDict('WarpcorrectParameters', {
24
- "__STYXTYPE__": typing.Literal["warpcorrect"],
29
+ "@type": typing.NotRequired[typing.Literal["mrtrix/warpcorrect"]],
30
+ "marker": typing.NotRequired[list[float] | None],
31
+ "tolerance": typing.NotRequired[float | None],
32
+ "info": bool,
33
+ "quiet": bool,
34
+ "debug": bool,
35
+ "force": bool,
36
+ "nthreads": typing.NotRequired[int | None],
37
+ "config": typing.NotRequired[list[WarpcorrectConfigParameters] | None],
38
+ "help": bool,
39
+ "version": bool,
40
+ "in": InputPathType,
41
+ "out": str,
42
+ })
43
+ WarpcorrectParametersTagged = typing.TypedDict('WarpcorrectParametersTagged', {
44
+ "@type": typing.Literal["mrtrix/warpcorrect"],
25
45
  "marker": typing.NotRequired[list[float] | None],
26
46
  "tolerance": typing.NotRequired[float | None],
27
47
  "info": bool,
@@ -35,45 +55,12 @@ WarpcorrectParameters = typing.TypedDict('WarpcorrectParameters', {
35
55
  "in": InputPathType,
36
56
  "out": str,
37
57
  })
38
-
39
-
40
- def dyn_cargs(
41
- t: str,
42
- ) -> typing.Any:
43
- """
44
- Get build cargs function by command type.
45
-
46
- Args:
47
- t: Command type.
48
- Returns:
49
- Build cargs function.
50
- """
51
- return {
52
- "warpcorrect": warpcorrect_cargs,
53
- "config": warpcorrect_config_cargs,
54
- }.get(t)
55
-
56
-
57
- def dyn_outputs(
58
- t: str,
59
- ) -> typing.Any:
60
- """
61
- Get build outputs function by command type.
62
-
63
- Args:
64
- t: Command type.
65
- Returns:
66
- Build outputs function.
67
- """
68
- return {
69
- "warpcorrect": warpcorrect_outputs,
70
- }.get(t)
71
58
 
72
59
 
73
60
  def warpcorrect_config_params(
74
61
  key: str,
75
62
  value: str,
76
- ) -> WarpcorrectConfigParameters:
63
+ ) -> WarpcorrectConfigParametersTagged:
77
64
  """
78
65
  Build parameters.
79
66
 
@@ -84,7 +71,7 @@ def warpcorrect_config_params(
84
71
  Parameter dictionary
85
72
  """
86
73
  params = {
87
- "__STYXTYPE__": "config",
74
+ "@type": "config",
88
75
  "key": key,
89
76
  "value": value,
90
77
  }
@@ -106,14 +93,14 @@ def warpcorrect_config_cargs(
106
93
  """
107
94
  cargs = []
108
95
  cargs.append("-config")
109
- cargs.append(params.get("key"))
110
- cargs.append(params.get("value"))
96
+ cargs.append(params.get("key", None))
97
+ cargs.append(params.get("value", None))
111
98
  return cargs
112
99
 
113
100
 
114
101
  class WarpcorrectOutputs(typing.NamedTuple):
115
102
  """
116
- Output object returned when calling `warpcorrect(...)`.
103
+ Output object returned when calling `WarpcorrectParameters(...)`.
117
104
  """
118
105
  root: OutputPathType
119
106
  """Output root folder. This is the root folder for all outputs."""
@@ -134,7 +121,7 @@ def warpcorrect_params(
134
121
  config: list[WarpcorrectConfigParameters] | None = None,
135
122
  help_: bool = False,
136
123
  version: bool = False,
137
- ) -> WarpcorrectParameters:
124
+ ) -> WarpcorrectParametersTagged:
138
125
  """
139
126
  Build parameters.
140
127
 
@@ -161,7 +148,7 @@ def warpcorrect_params(
161
148
  Parameter dictionary
162
149
  """
163
150
  params = {
164
- "__STYXTYPE__": "warpcorrect",
151
+ "@type": "mrtrix/warpcorrect",
165
152
  "info": info,
166
153
  "quiet": quiet,
167
154
  "debug": debug,
@@ -197,37 +184,37 @@ def warpcorrect_cargs(
197
184
  """
198
185
  cargs = []
199
186
  cargs.append("warpcorrect")
200
- if params.get("marker") is not None:
187
+ if params.get("marker", None) is not None:
201
188
  cargs.extend([
202
189
  "-marker",
203
- *map(str, params.get("marker"))
190
+ *map(str, params.get("marker", None))
204
191
  ])
205
- if params.get("tolerance") is not None:
192
+ if params.get("tolerance", None) is not None:
206
193
  cargs.extend([
207
194
  "-tolerance",
208
- str(params.get("tolerance"))
195
+ str(params.get("tolerance", None))
209
196
  ])
210
- if params.get("info"):
197
+ if params.get("info", False):
211
198
  cargs.append("-info")
212
- if params.get("quiet"):
199
+ if params.get("quiet", False):
213
200
  cargs.append("-quiet")
214
- if params.get("debug"):
201
+ if params.get("debug", False):
215
202
  cargs.append("-debug")
216
- if params.get("force"):
203
+ if params.get("force", False):
217
204
  cargs.append("-force")
218
- if params.get("nthreads") is not None:
205
+ if params.get("nthreads", None) is not None:
219
206
  cargs.extend([
220
207
  "-nthreads",
221
- str(params.get("nthreads"))
208
+ str(params.get("nthreads", None))
222
209
  ])
223
- if params.get("config") is not None:
224
- cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
225
- if params.get("help"):
210
+ if params.get("config", None) is not None:
211
+ cargs.extend([a for c in [warpcorrect_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
212
+ if params.get("help", False):
226
213
  cargs.append("-help")
227
- if params.get("version"):
214
+ if params.get("version", False):
228
215
  cargs.append("-version")
229
- cargs.append(execution.input_file(params.get("in")))
230
- cargs.append(params.get("out"))
216
+ cargs.append(execution.input_file(params.get("in", None)))
217
+ cargs.append(params.get("out", None))
231
218
  return cargs
232
219
 
233
220
 
@@ -246,18 +233,20 @@ def warpcorrect_outputs(
246
233
  """
247
234
  ret = WarpcorrectOutputs(
248
235
  root=execution.output_file("."),
249
- out=execution.output_file(params.get("out")),
236
+ out=execution.output_file(params.get("out", None)),
250
237
  )
251
238
  return ret
252
239
 
253
240
 
254
241
  def warpcorrect_execute(
255
242
  params: WarpcorrectParameters,
256
- execution: Execution,
243
+ runner: Runner | None = None,
257
244
  ) -> WarpcorrectOutputs:
258
245
  """
259
- Replaces voxels in a deformation field that point to a specific out of bounds
260
- location with nan,nan,nan.
246
+ warpcorrect
247
+
248
+ Replaces voxels in a deformation field that point to a specific out of
249
+ bounds location with nan,nan,nan.
261
250
 
262
251
  This can be used in conjunction with the warpinit command to compute a
263
252
  MRtrix compatible deformation field from non-linear transformations
@@ -273,10 +262,12 @@ def warpcorrect_execute(
273
262
 
274
263
  Args:
275
264
  params: The parameters.
276
- execution: The execution object.
265
+ runner: Command runner.
277
266
  Returns:
278
267
  NamedTuple of outputs (described in `WarpcorrectOutputs`).
279
268
  """
269
+ runner = runner or get_global_runner()
270
+ execution = runner.start_execution(WARPCORRECT_METADATA)
280
271
  params = execution.params(params)
281
272
  cargs = warpcorrect_cargs(params, execution)
282
273
  ret = warpcorrect_outputs(params, execution)
@@ -300,8 +291,10 @@ def warpcorrect(
300
291
  runner: Runner | None = None,
301
292
  ) -> WarpcorrectOutputs:
302
293
  """
303
- Replaces voxels in a deformation field that point to a specific out of bounds
304
- location with nan,nan,nan.
294
+ warpcorrect
295
+
296
+ Replaces voxels in a deformation field that point to a specific out of
297
+ bounds location with nan,nan,nan.
305
298
 
306
299
  This can be used in conjunction with the warpinit command to compute a
307
300
  MRtrix compatible deformation field from non-linear transformations
@@ -338,8 +331,6 @@ def warpcorrect(
338
331
  Returns:
339
332
  NamedTuple of outputs (described in `WarpcorrectOutputs`).
340
333
  """
341
- runner = runner or get_global_runner()
342
- execution = runner.start_execution(WARPCORRECT_METADATA)
343
334
  params = warpcorrect_params(
344
335
  marker=marker,
345
336
  tolerance=tolerance,
@@ -354,15 +345,14 @@ def warpcorrect(
354
345
  in_=in_,
355
346
  out=out,
356
347
  )
357
- return warpcorrect_execute(params, execution)
348
+ return warpcorrect_execute(params, runner)
358
349
 
359
350
 
360
351
  __all__ = [
361
352
  "WARPCORRECT_METADATA",
362
- "WarpcorrectConfigParameters",
363
353
  "WarpcorrectOutputs",
364
- "WarpcorrectParameters",
365
354
  "warpcorrect",
366
355
  "warpcorrect_config_params",
356
+ "warpcorrect_execute",
367
357
  "warpcorrect_params",
368
358
  ]