niwrap-mrtrix 0.5.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 (119) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +130 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
  3. niwrap_mrtrix/mrtrix/amp2response.py +453 -0
  4. niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
  7. niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
  8. niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
  9. niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
  10. niwrap_mrtrix/mrtrix/dirflip.py +362 -0
  11. niwrap_mrtrix/mrtrix/dirgen.py +423 -0
  12. niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
  13. niwrap_mrtrix/mrtrix/dirorder.py +347 -0
  14. niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
  15. niwrap_mrtrix/mrtrix/dirstat.py +530 -0
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
  19. niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
  23. niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
  36. niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
  38. niwrap_mrtrix/mrtrix/label2colour.py +351 -0
  39. niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
  40. niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
  41. niwrap_mrtrix/mrtrix/labelstats.py +344 -0
  42. niwrap_mrtrix/mrtrix/maskdump.py +336 -0
  43. niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
  45. niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
  46. niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
  48. niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
  49. niwrap_mrtrix/mrtrix/mrcat.py +382 -0
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
  53. niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
  54. niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
  56. niwrap_mrtrix/mrtrix/mrdump.py +351 -0
  57. niwrap_mrtrix/mrtrix/mredit.py +546 -0
  58. niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
  59. niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
  62. niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
  63. niwrap_mrtrix/mrtrix/mrmath.py +413 -0
  64. niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
  65. niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
  66. niwrap_mrtrix/mrtrix/mrstats.py +427 -0
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
  68. niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
  72. niwrap_mrtrix/mrtrix/responsemean.py +316 -0
  73. niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
  75. niwrap_mrtrix/mrtrix/sh2power.py +353 -0
  76. niwrap_mrtrix/mrtrix/sh2response.py +394 -0
  77. niwrap_mrtrix/mrtrix/shbasis.py +373 -0
  78. niwrap_mrtrix/mrtrix/shconv.py +498 -0
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
  81. niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
  82. niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
  83. niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
  84. niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
  85. niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
  86. niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
  87. niwrap_mrtrix/mrtrix/tckmap.py +772 -0
  88. niwrap_mrtrix/mrtrix/tckresample.py +580 -0
  89. niwrap_mrtrix/mrtrix/tcksample.py +404 -0
  90. niwrap_mrtrix/mrtrix/tcksift.py +592 -0
  91. niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
  92. niwrap_mrtrix/mrtrix/tckstats.py +441 -0
  93. niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
  95. niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
  96. niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
  97. niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
  100. niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
  109. niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
  112. niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
  113. niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
  115. niwrap_mrtrix/mrtrix/warpinit.py +356 -0
  116. niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
  117. niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,410 @@
1
+ # This file was auto generated by Styx.
2
+ # Do not edit this file directly.
3
+
4
+ import typing
5
+ import pathlib
6
+ from styxdefs import *
7
+
8
+ MESHCONVERT_METADATA = Metadata(
9
+ id="762c9b5d3b33c0ecdebcfabfcf5bf55092f9fed9.boutiques",
10
+ name="meshconvert",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ MeshconvertTransformParameters = typing.TypedDict('MeshconvertTransformParameters', {
17
+ "__STYX_TYPE__": typing.Literal["transform"],
18
+ "mode": str,
19
+ "image": InputPathType,
20
+ })
21
+
22
+
23
+ MeshconvertConfigParameters = typing.TypedDict('MeshconvertConfigParameters', {
24
+ "__STYX_TYPE__": typing.Literal["config"],
25
+ "key": str,
26
+ "value": str,
27
+ })
28
+
29
+
30
+ MeshconvertParameters = typing.TypedDict('MeshconvertParameters', {
31
+ "__STYX_TYPE__": typing.Literal["meshconvert"],
32
+ "binary": bool,
33
+ "transform": typing.NotRequired[MeshconvertTransformParameters | None],
34
+ "info": bool,
35
+ "quiet": bool,
36
+ "debug": bool,
37
+ "force": bool,
38
+ "nthreads": typing.NotRequired[int | None],
39
+ "config": typing.NotRequired[list[MeshconvertConfigParameters] | None],
40
+ "help": bool,
41
+ "version": bool,
42
+ "input": InputPathType,
43
+ "output": str,
44
+ })
45
+
46
+
47
+ def dyn_cargs(
48
+ t: str,
49
+ ) -> typing.Any:
50
+ """
51
+ Get build cargs function by command type.
52
+
53
+ Args:
54
+ t: Command type.
55
+ Returns:
56
+ Build cargs function.
57
+ """
58
+ return {
59
+ "meshconvert": meshconvert_cargs,
60
+ "transform": meshconvert_transform_cargs,
61
+ "config": meshconvert_config_cargs,
62
+ }.get(t)
63
+
64
+
65
+ def dyn_outputs(
66
+ t: str,
67
+ ) -> typing.Any:
68
+ """
69
+ Get build outputs function by command type.
70
+
71
+ Args:
72
+ t: Command type.
73
+ Returns:
74
+ Build outputs function.
75
+ """
76
+ return {
77
+ "meshconvert": meshconvert_outputs,
78
+ }.get(t)
79
+
80
+
81
+ def meshconvert_transform_params(
82
+ mode: str,
83
+ image: InputPathType,
84
+ ) -> MeshconvertTransformParameters:
85
+ """
86
+ Build parameters.
87
+
88
+ Args:
89
+ mode: transform vertices from one coordinate space to another, based on\
90
+ a template image; options are: first2real, real2first, voxel2real,\
91
+ real2voxel, fs2real.
92
+ image: transform vertices from one coordinate space to another, based\
93
+ on a template image; options are: first2real, real2first, voxel2real,\
94
+ real2voxel, fs2real.
95
+ Returns:
96
+ Parameter dictionary
97
+ """
98
+ params = {
99
+ "__STYXTYPE__": "transform",
100
+ "mode": mode,
101
+ "image": image,
102
+ }
103
+ return params
104
+
105
+
106
+ def meshconvert_transform_cargs(
107
+ params: MeshconvertTransformParameters,
108
+ execution: Execution,
109
+ ) -> list[str]:
110
+ """
111
+ Build command-line arguments from parameters.
112
+
113
+ Args:
114
+ params: The parameters.
115
+ execution: The execution object for resolving input paths.
116
+ Returns:
117
+ Command-line arguments.
118
+ """
119
+ cargs = []
120
+ cargs.append("-transform")
121
+ cargs.append(params.get("mode"))
122
+ cargs.append(execution.input_file(params.get("image")))
123
+ return cargs
124
+
125
+
126
+ def meshconvert_config_params(
127
+ key: str,
128
+ value: str,
129
+ ) -> MeshconvertConfigParameters:
130
+ """
131
+ Build parameters.
132
+
133
+ Args:
134
+ key: temporarily set the value of an MRtrix config file entry.
135
+ value: temporarily set the value of an MRtrix config file entry.
136
+ Returns:
137
+ Parameter dictionary
138
+ """
139
+ params = {
140
+ "__STYXTYPE__": "config",
141
+ "key": key,
142
+ "value": value,
143
+ }
144
+ return params
145
+
146
+
147
+ def meshconvert_config_cargs(
148
+ params: MeshconvertConfigParameters,
149
+ execution: Execution,
150
+ ) -> list[str]:
151
+ """
152
+ Build command-line arguments from parameters.
153
+
154
+ Args:
155
+ params: The parameters.
156
+ execution: The execution object for resolving input paths.
157
+ Returns:
158
+ Command-line arguments.
159
+ """
160
+ cargs = []
161
+ cargs.append("-config")
162
+ cargs.append(params.get("key"))
163
+ cargs.append(params.get("value"))
164
+ return cargs
165
+
166
+
167
+ class MeshconvertOutputs(typing.NamedTuple):
168
+ """
169
+ Output object returned when calling `meshconvert(...)`.
170
+ """
171
+ root: OutputPathType
172
+ """Output root folder. This is the root folder for all outputs."""
173
+ output: OutputPathType
174
+ """the output mesh file"""
175
+
176
+
177
+ def meshconvert_params(
178
+ input_: InputPathType,
179
+ output: str,
180
+ binary: bool = False,
181
+ transform: MeshconvertTransformParameters | None = None,
182
+ info: bool = False,
183
+ quiet: bool = False,
184
+ debug: bool = False,
185
+ force: bool = False,
186
+ nthreads: int | None = None,
187
+ config: list[MeshconvertConfigParameters] | None = None,
188
+ help_: bool = False,
189
+ version: bool = False,
190
+ ) -> MeshconvertParameters:
191
+ """
192
+ Build parameters.
193
+
194
+ Args:
195
+ input_: the input mesh file.
196
+ output: the output mesh file.
197
+ binary: write the output mesh file in binary format (if supported).
198
+ transform: transform vertices from one coordinate space to another,\
199
+ based on a template image; options are: first2real, real2first,\
200
+ voxel2real, real2voxel, fs2real.
201
+ info: display information messages.
202
+ quiet: do not display information messages or progress status;\
203
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
204
+ environment variable to a non-empty string.
205
+ debug: display debugging messages.
206
+ force: force overwrite of output files (caution: using the same file as\
207
+ input and output might cause unexpected behaviour).
208
+ nthreads: use this number of threads in multi-threaded applications\
209
+ (set to 0 to disable multi-threading).
210
+ config: temporarily set the value of an MRtrix config file entry.
211
+ help_: display this information page and exit.
212
+ version: display version information and exit.
213
+ Returns:
214
+ Parameter dictionary
215
+ """
216
+ params = {
217
+ "__STYXTYPE__": "meshconvert",
218
+ "binary": binary,
219
+ "info": info,
220
+ "quiet": quiet,
221
+ "debug": debug,
222
+ "force": force,
223
+ "help": help_,
224
+ "version": version,
225
+ "input": input_,
226
+ "output": output,
227
+ }
228
+ if transform is not None:
229
+ params["transform"] = transform
230
+ if nthreads is not None:
231
+ params["nthreads"] = nthreads
232
+ if config is not None:
233
+ params["config"] = config
234
+ return params
235
+
236
+
237
+ def meshconvert_cargs(
238
+ params: MeshconvertParameters,
239
+ execution: Execution,
240
+ ) -> list[str]:
241
+ """
242
+ Build command-line arguments from parameters.
243
+
244
+ Args:
245
+ params: The parameters.
246
+ execution: The execution object for resolving input paths.
247
+ Returns:
248
+ Command-line arguments.
249
+ """
250
+ cargs = []
251
+ cargs.append("meshconvert")
252
+ if params.get("binary"):
253
+ cargs.append("-binary")
254
+ if params.get("transform") is not None:
255
+ cargs.extend(dyn_cargs(params.get("transform")["__STYXTYPE__"])(params.get("transform"), execution))
256
+ if params.get("info"):
257
+ cargs.append("-info")
258
+ if params.get("quiet"):
259
+ cargs.append("-quiet")
260
+ if params.get("debug"):
261
+ cargs.append("-debug")
262
+ if params.get("force"):
263
+ cargs.append("-force")
264
+ if params.get("nthreads") is not None:
265
+ cargs.extend([
266
+ "-nthreads",
267
+ str(params.get("nthreads"))
268
+ ])
269
+ if params.get("config") is not None:
270
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
271
+ if params.get("help"):
272
+ cargs.append("-help")
273
+ if params.get("version"):
274
+ cargs.append("-version")
275
+ cargs.append(execution.input_file(params.get("input")))
276
+ cargs.append(params.get("output"))
277
+ return cargs
278
+
279
+
280
+ def meshconvert_outputs(
281
+ params: MeshconvertParameters,
282
+ execution: Execution,
283
+ ) -> MeshconvertOutputs:
284
+ """
285
+ Build outputs object containing output file paths and possibly stdout/stderr.
286
+
287
+ Args:
288
+ params: The parameters.
289
+ execution: The execution object for resolving input paths.
290
+ Returns:
291
+ Outputs object.
292
+ """
293
+ ret = MeshconvertOutputs(
294
+ root=execution.output_file("."),
295
+ output=execution.output_file(params.get("output")),
296
+ )
297
+ return ret
298
+
299
+
300
+ def meshconvert_execute(
301
+ params: MeshconvertParameters,
302
+ execution: Execution,
303
+ ) -> MeshconvertOutputs:
304
+ """
305
+ Convert meshes between different formats, and apply transformations.
306
+
307
+
308
+
309
+ References:
310
+
311
+ .
312
+
313
+ Author: MRTrix3 Developers
314
+
315
+ URL: https://www.mrtrix.org/
316
+
317
+ Args:
318
+ params: The parameters.
319
+ execution: The execution object.
320
+ Returns:
321
+ NamedTuple of outputs (described in `MeshconvertOutputs`).
322
+ """
323
+ params = execution.params(params)
324
+ cargs = meshconvert_cargs(params, execution)
325
+ ret = meshconvert_outputs(params, execution)
326
+ execution.run(cargs)
327
+ return ret
328
+
329
+
330
+ def meshconvert(
331
+ input_: InputPathType,
332
+ output: str,
333
+ binary: bool = False,
334
+ transform: MeshconvertTransformParameters | None = None,
335
+ info: bool = False,
336
+ quiet: bool = False,
337
+ debug: bool = False,
338
+ force: bool = False,
339
+ nthreads: int | None = None,
340
+ config: list[MeshconvertConfigParameters] | None = None,
341
+ help_: bool = False,
342
+ version: bool = False,
343
+ runner: Runner | None = None,
344
+ ) -> MeshconvertOutputs:
345
+ """
346
+ Convert meshes between different formats, and apply transformations.
347
+
348
+
349
+
350
+ References:
351
+
352
+ .
353
+
354
+ Author: MRTrix3 Developers
355
+
356
+ URL: https://www.mrtrix.org/
357
+
358
+ Args:
359
+ input_: the input mesh file.
360
+ output: the output mesh file.
361
+ binary: write the output mesh file in binary format (if supported).
362
+ transform: transform vertices from one coordinate space to another,\
363
+ based on a template image; options are: first2real, real2first,\
364
+ voxel2real, real2voxel, fs2real.
365
+ info: display information messages.
366
+ quiet: do not display information messages or progress status;\
367
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
368
+ environment variable to a non-empty string.
369
+ debug: display debugging messages.
370
+ force: force overwrite of output files (caution: using the same file as\
371
+ input and output might cause unexpected behaviour).
372
+ nthreads: use this number of threads in multi-threaded applications\
373
+ (set to 0 to disable multi-threading).
374
+ config: temporarily set the value of an MRtrix config file entry.
375
+ help_: display this information page and exit.
376
+ version: display version information and exit.
377
+ runner: Command runner.
378
+ Returns:
379
+ NamedTuple of outputs (described in `MeshconvertOutputs`).
380
+ """
381
+ runner = runner or get_global_runner()
382
+ execution = runner.start_execution(MESHCONVERT_METADATA)
383
+ params = meshconvert_params(
384
+ binary=binary,
385
+ transform=transform,
386
+ info=info,
387
+ quiet=quiet,
388
+ debug=debug,
389
+ force=force,
390
+ nthreads=nthreads,
391
+ config=config,
392
+ help_=help_,
393
+ version=version,
394
+ input_=input_,
395
+ output=output,
396
+ )
397
+ return meshconvert_execute(params, execution)
398
+
399
+
400
+ __all__ = [
401
+ "MESHCONVERT_METADATA",
402
+ "MeshconvertConfigParameters",
403
+ "MeshconvertOutputs",
404
+ "MeshconvertParameters",
405
+ "MeshconvertTransformParameters",
406
+ "meshconvert",
407
+ "meshconvert_config_params",
408
+ "meshconvert_params",
409
+ "meshconvert_transform_params",
410
+ ]