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,413 @@
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
+ MRMATH_METADATA = Metadata(
9
+ id="51b59bbaad9ca5110175fd6f6f0765499d38c928.boutiques",
10
+ name="mrmath",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ MrmathConfigParameters = typing.TypedDict('MrmathConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ MrmathParameters = typing.TypedDict('MrmathParameters', {
24
+ "__STYX_TYPE__": typing.Literal["mrmath"],
25
+ "axis": typing.NotRequired[int | None],
26
+ "keep_unary_axes": bool,
27
+ "datatype": typing.NotRequired[str | None],
28
+ "info": bool,
29
+ "quiet": bool,
30
+ "debug": bool,
31
+ "force": bool,
32
+ "nthreads": typing.NotRequired[int | None],
33
+ "config": typing.NotRequired[list[MrmathConfigParameters] | None],
34
+ "help": bool,
35
+ "version": bool,
36
+ "input": list[InputPathType],
37
+ "operation": str,
38
+ "output": str,
39
+ })
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
+ "mrmath": mrmath_cargs,
55
+ "config": mrmath_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
+ "mrmath": mrmath_outputs,
72
+ }.get(t)
73
+
74
+
75
+ def mrmath_config_params(
76
+ key: str,
77
+ value: str,
78
+ ) -> MrmathConfigParameters:
79
+ """
80
+ Build parameters.
81
+
82
+ Args:
83
+ key: temporarily set the value of an MRtrix config file entry.
84
+ value: temporarily set the value of an MRtrix config file entry.
85
+ Returns:
86
+ Parameter dictionary
87
+ """
88
+ params = {
89
+ "__STYXTYPE__": "config",
90
+ "key": key,
91
+ "value": value,
92
+ }
93
+ return params
94
+
95
+
96
+ def mrmath_config_cargs(
97
+ params: MrmathConfigParameters,
98
+ execution: Execution,
99
+ ) -> list[str]:
100
+ """
101
+ Build command-line arguments from parameters.
102
+
103
+ Args:
104
+ params: The parameters.
105
+ execution: The execution object for resolving input paths.
106
+ Returns:
107
+ Command-line arguments.
108
+ """
109
+ cargs = []
110
+ cargs.append("-config")
111
+ cargs.append(params.get("key"))
112
+ cargs.append(params.get("value"))
113
+ return cargs
114
+
115
+
116
+ class MrmathOutputs(typing.NamedTuple):
117
+ """
118
+ Output object returned when calling `mrmath(...)`.
119
+ """
120
+ root: OutputPathType
121
+ """Output root folder. This is the root folder for all outputs."""
122
+ output: OutputPathType
123
+ """the output image."""
124
+
125
+
126
+ def mrmath_params(
127
+ input_: list[InputPathType],
128
+ operation: str,
129
+ output: str,
130
+ axis: int | None = None,
131
+ keep_unary_axes: bool = False,
132
+ datatype: str | None = None,
133
+ info: bool = False,
134
+ quiet: bool = False,
135
+ debug: bool = False,
136
+ force: bool = False,
137
+ nthreads: int | None = None,
138
+ config: list[MrmathConfigParameters] | None = None,
139
+ help_: bool = False,
140
+ version: bool = False,
141
+ ) -> MrmathParameters:
142
+ """
143
+ Build parameters.
144
+
145
+ Args:
146
+ input_: the input image(s).
147
+ operation: the operation to apply, one of: mean, median, sum, product,\
148
+ rms, norm, var, std, min, max, absmax, magmax.
149
+ output: the output image.
150
+ axis: perform operation along a specified axis of a single input image.
151
+ keep_unary_axes: Keep unary axes in input images prior to calculating\
152
+ the stats. The default is to wipe axes with single elements.
153
+ datatype: specify output image data type. Valid choices are: float32,\
154
+ float32le, float32be, float64, float64le, float64be, int64, uint64,\
155
+ int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
156
+ int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
157
+ cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
158
+ int8, uint8, bit.
159
+ info: display information messages.
160
+ quiet: do not display information messages or progress status;\
161
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
162
+ environment variable to a non-empty string.
163
+ debug: display debugging messages.
164
+ force: force overwrite of output files (caution: using the same file as\
165
+ input and output might cause unexpected behaviour).
166
+ nthreads: use this number of threads in multi-threaded applications\
167
+ (set to 0 to disable multi-threading).
168
+ config: temporarily set the value of an MRtrix config file entry.
169
+ help_: display this information page and exit.
170
+ version: display version information and exit.
171
+ Returns:
172
+ Parameter dictionary
173
+ """
174
+ params = {
175
+ "__STYXTYPE__": "mrmath",
176
+ "keep_unary_axes": keep_unary_axes,
177
+ "info": info,
178
+ "quiet": quiet,
179
+ "debug": debug,
180
+ "force": force,
181
+ "help": help_,
182
+ "version": version,
183
+ "input": input_,
184
+ "operation": operation,
185
+ "output": output,
186
+ }
187
+ if axis is not None:
188
+ params["axis"] = axis
189
+ if datatype is not None:
190
+ params["datatype"] = datatype
191
+ if nthreads is not None:
192
+ params["nthreads"] = nthreads
193
+ if config is not None:
194
+ params["config"] = config
195
+ return params
196
+
197
+
198
+ def mrmath_cargs(
199
+ params: MrmathParameters,
200
+ execution: Execution,
201
+ ) -> list[str]:
202
+ """
203
+ Build command-line arguments from parameters.
204
+
205
+ Args:
206
+ params: The parameters.
207
+ execution: The execution object for resolving input paths.
208
+ Returns:
209
+ Command-line arguments.
210
+ """
211
+ cargs = []
212
+ cargs.append("mrmath")
213
+ if params.get("axis") is not None:
214
+ cargs.extend([
215
+ "-axis",
216
+ str(params.get("axis"))
217
+ ])
218
+ if params.get("keep_unary_axes"):
219
+ cargs.append("-keep_unary_axes")
220
+ if params.get("datatype") is not None:
221
+ cargs.extend([
222
+ "-datatype",
223
+ params.get("datatype")
224
+ ])
225
+ if params.get("info"):
226
+ cargs.append("-info")
227
+ if params.get("quiet"):
228
+ cargs.append("-quiet")
229
+ if params.get("debug"):
230
+ cargs.append("-debug")
231
+ if params.get("force"):
232
+ cargs.append("-force")
233
+ if params.get("nthreads") is not None:
234
+ cargs.extend([
235
+ "-nthreads",
236
+ str(params.get("nthreads"))
237
+ ])
238
+ if params.get("config") is not None:
239
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
240
+ if params.get("help"):
241
+ cargs.append("-help")
242
+ if params.get("version"):
243
+ cargs.append("-version")
244
+ cargs.extend([execution.input_file(f) for f in params.get("input")])
245
+ cargs.append(params.get("operation"))
246
+ cargs.append(params.get("output"))
247
+ return cargs
248
+
249
+
250
+ def mrmath_outputs(
251
+ params: MrmathParameters,
252
+ execution: Execution,
253
+ ) -> MrmathOutputs:
254
+ """
255
+ Build outputs object containing output file paths and possibly stdout/stderr.
256
+
257
+ Args:
258
+ params: The parameters.
259
+ execution: The execution object for resolving input paths.
260
+ Returns:
261
+ Outputs object.
262
+ """
263
+ ret = MrmathOutputs(
264
+ root=execution.output_file("."),
265
+ output=execution.output_file(params.get("output")),
266
+ )
267
+ return ret
268
+
269
+
270
+ def mrmath_execute(
271
+ params: MrmathParameters,
272
+ execution: Execution,
273
+ ) -> MrmathOutputs:
274
+ """
275
+ Compute summary statistic on image intensities either across images, or along a
276
+ specified axis of a single image.
277
+
278
+ Supported operations are:
279
+
280
+ mean, median, sum, product, rms (root-mean-square value), norm (vector
281
+ 2-norm), var (unbiased variance), std (unbiased standard deviation), min,
282
+ max, absmax (maximum absolute value), magmax (value with maximum absolute
283
+ value, preserving its sign).
284
+
285
+ This command is used to traverse either along an image axis, or across a set
286
+ of input images, calculating some statistic from the values along each
287
+ traversal. If you are seeking to instead perform mathematical calculations
288
+ that are done independently for each voxel, pleaase see the 'mrcalc'
289
+ command.
290
+
291
+ References:
292
+
293
+ .
294
+
295
+ Author: MRTrix3 Developers
296
+
297
+ URL: https://www.mrtrix.org/
298
+
299
+ Args:
300
+ params: The parameters.
301
+ execution: The execution object.
302
+ Returns:
303
+ NamedTuple of outputs (described in `MrmathOutputs`).
304
+ """
305
+ params = execution.params(params)
306
+ cargs = mrmath_cargs(params, execution)
307
+ ret = mrmath_outputs(params, execution)
308
+ execution.run(cargs)
309
+ return ret
310
+
311
+
312
+ def mrmath(
313
+ input_: list[InputPathType],
314
+ operation: str,
315
+ output: str,
316
+ axis: int | None = None,
317
+ keep_unary_axes: bool = False,
318
+ datatype: str | None = None,
319
+ info: bool = False,
320
+ quiet: bool = False,
321
+ debug: bool = False,
322
+ force: bool = False,
323
+ nthreads: int | None = None,
324
+ config: list[MrmathConfigParameters] | None = None,
325
+ help_: bool = False,
326
+ version: bool = False,
327
+ runner: Runner | None = None,
328
+ ) -> MrmathOutputs:
329
+ """
330
+ Compute summary statistic on image intensities either across images, or along a
331
+ specified axis of a single image.
332
+
333
+ Supported operations are:
334
+
335
+ mean, median, sum, product, rms (root-mean-square value), norm (vector
336
+ 2-norm), var (unbiased variance), std (unbiased standard deviation), min,
337
+ max, absmax (maximum absolute value), magmax (value with maximum absolute
338
+ value, preserving its sign).
339
+
340
+ This command is used to traverse either along an image axis, or across a set
341
+ of input images, calculating some statistic from the values along each
342
+ traversal. If you are seeking to instead perform mathematical calculations
343
+ that are done independently for each voxel, pleaase see the 'mrcalc'
344
+ command.
345
+
346
+ References:
347
+
348
+ .
349
+
350
+ Author: MRTrix3 Developers
351
+
352
+ URL: https://www.mrtrix.org/
353
+
354
+ Args:
355
+ input_: the input image(s).
356
+ operation: the operation to apply, one of: mean, median, sum, product,\
357
+ rms, norm, var, std, min, max, absmax, magmax.
358
+ output: the output image.
359
+ axis: perform operation along a specified axis of a single input image.
360
+ keep_unary_axes: Keep unary axes in input images prior to calculating\
361
+ the stats. The default is to wipe axes with single elements.
362
+ datatype: specify output image data type. Valid choices are: float32,\
363
+ float32le, float32be, float64, float64le, float64be, int64, uint64,\
364
+ int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
365
+ int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
366
+ cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
367
+ int8, uint8, bit.
368
+ info: display information messages.
369
+ quiet: do not display information messages or progress status;\
370
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
371
+ environment variable to a non-empty string.
372
+ debug: display debugging messages.
373
+ force: force overwrite of output files (caution: using the same file as\
374
+ input and output might cause unexpected behaviour).
375
+ nthreads: use this number of threads in multi-threaded applications\
376
+ (set to 0 to disable multi-threading).
377
+ config: temporarily set the value of an MRtrix config file entry.
378
+ help_: display this information page and exit.
379
+ version: display version information and exit.
380
+ runner: Command runner.
381
+ Returns:
382
+ NamedTuple of outputs (described in `MrmathOutputs`).
383
+ """
384
+ runner = runner or get_global_runner()
385
+ execution = runner.start_execution(MRMATH_METADATA)
386
+ params = mrmath_params(
387
+ axis=axis,
388
+ keep_unary_axes=keep_unary_axes,
389
+ datatype=datatype,
390
+ info=info,
391
+ quiet=quiet,
392
+ debug=debug,
393
+ force=force,
394
+ nthreads=nthreads,
395
+ config=config,
396
+ help_=help_,
397
+ version=version,
398
+ input_=input_,
399
+ operation=operation,
400
+ output=output,
401
+ )
402
+ return mrmath_execute(params, execution)
403
+
404
+
405
+ __all__ = [
406
+ "MRMATH_METADATA",
407
+ "MrmathConfigParameters",
408
+ "MrmathOutputs",
409
+ "MrmathParameters",
410
+ "mrmath",
411
+ "mrmath_config_params",
412
+ "mrmath_params",
413
+ ]