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,427 @@
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
+ MRSTATS_METADATA = Metadata(
9
+ id="ac3503467263b1605cd6395c44e756384ef84457.boutiques",
10
+ name="mrstats",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ MrstatsOutputParameters = typing.TypedDict('MrstatsOutputParameters', {
17
+ "__STYX_TYPE__": typing.Literal["output"],
18
+ "field": str,
19
+ })
20
+
21
+
22
+ MrstatsConfigParameters = typing.TypedDict('MrstatsConfigParameters', {
23
+ "__STYX_TYPE__": typing.Literal["config"],
24
+ "key": str,
25
+ "value": str,
26
+ })
27
+
28
+
29
+ MrstatsParameters = typing.TypedDict('MrstatsParameters', {
30
+ "__STYX_TYPE__": typing.Literal["mrstats"],
31
+ "output": typing.NotRequired[list[MrstatsOutputParameters] | None],
32
+ "mask": typing.NotRequired[InputPathType | None],
33
+ "ignorezero": bool,
34
+ "allvolumes": bool,
35
+ "info": bool,
36
+ "quiet": bool,
37
+ "debug": bool,
38
+ "force": bool,
39
+ "nthreads": typing.NotRequired[int | None],
40
+ "config": typing.NotRequired[list[MrstatsConfigParameters] | None],
41
+ "help": bool,
42
+ "version": bool,
43
+ "image": InputPathType,
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
+ "mrstats": mrstats_cargs,
60
+ "output": mrstats_output_cargs,
61
+ "config": mrstats_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
+ }.get(t)
78
+
79
+
80
+ def mrstats_output_params(
81
+ field: str,
82
+ ) -> MrstatsOutputParameters:
83
+ """
84
+ Build parameters.
85
+
86
+ Args:
87
+ field: output only the field specified. Multiple such options can be\
88
+ supplied if required. Choices are: mean, median, std, std_rv, min, max,\
89
+ count. Useful for use in scripts. Both std options refer to the\
90
+ unbiased (sample) standard deviation. For complex data, min, max and\
91
+ std are calculated separately for real and imaginary parts, std_rv is\
92
+ based on the real valued variance (equals sqrt of sum of variances of\
93
+ imaginary and real parts).
94
+ Returns:
95
+ Parameter dictionary
96
+ """
97
+ params = {
98
+ "__STYXTYPE__": "output",
99
+ "field": field,
100
+ }
101
+ return params
102
+
103
+
104
+ def mrstats_output_cargs(
105
+ params: MrstatsOutputParameters,
106
+ execution: Execution,
107
+ ) -> list[str]:
108
+ """
109
+ Build command-line arguments from parameters.
110
+
111
+ Args:
112
+ params: The parameters.
113
+ execution: The execution object for resolving input paths.
114
+ Returns:
115
+ Command-line arguments.
116
+ """
117
+ cargs = []
118
+ cargs.append("-output")
119
+ cargs.append(params.get("field"))
120
+ return cargs
121
+
122
+
123
+ def mrstats_config_params(
124
+ key: str,
125
+ value: str,
126
+ ) -> MrstatsConfigParameters:
127
+ """
128
+ Build parameters.
129
+
130
+ Args:
131
+ key: temporarily set the value of an MRtrix config file entry.
132
+ value: temporarily set the value of an MRtrix config file entry.
133
+ Returns:
134
+ Parameter dictionary
135
+ """
136
+ params = {
137
+ "__STYXTYPE__": "config",
138
+ "key": key,
139
+ "value": value,
140
+ }
141
+ return params
142
+
143
+
144
+ def mrstats_config_cargs(
145
+ params: MrstatsConfigParameters,
146
+ execution: Execution,
147
+ ) -> list[str]:
148
+ """
149
+ Build command-line arguments from parameters.
150
+
151
+ Args:
152
+ params: The parameters.
153
+ execution: The execution object for resolving input paths.
154
+ Returns:
155
+ Command-line arguments.
156
+ """
157
+ cargs = []
158
+ cargs.append("-config")
159
+ cargs.append(params.get("key"))
160
+ cargs.append(params.get("value"))
161
+ return cargs
162
+
163
+
164
+ class MrstatsOutputs(typing.NamedTuple):
165
+ """
166
+ Output object returned when calling `mrstats(...)`.
167
+ """
168
+ root: OutputPathType
169
+ """Output root folder. This is the root folder for all outputs."""
170
+
171
+
172
+ def mrstats_params(
173
+ image: InputPathType,
174
+ output: list[MrstatsOutputParameters] | None = None,
175
+ mask: InputPathType | None = None,
176
+ ignorezero: bool = False,
177
+ allvolumes: bool = False,
178
+ info: bool = False,
179
+ quiet: bool = False,
180
+ debug: bool = False,
181
+ force: bool = False,
182
+ nthreads: int | None = None,
183
+ config: list[MrstatsConfigParameters] | None = None,
184
+ help_: bool = False,
185
+ version: bool = False,
186
+ ) -> MrstatsParameters:
187
+ """
188
+ Build parameters.
189
+
190
+ Args:
191
+ image: the input image from which statistics will be computed.
192
+ output: output only the field specified. Multiple such options can be\
193
+ supplied if required. Choices are: mean, median, std, std_rv, min, max,\
194
+ count. Useful for use in scripts. Both std options refer to the\
195
+ unbiased (sample) standard deviation. For complex data, min, max and\
196
+ std are calculated separately for real and imaginary parts, std_rv is\
197
+ based on the real valued variance (equals sqrt of sum of variances of\
198
+ imaginary and real parts).
199
+ mask: only perform computation within the specified binary mask image.
200
+ ignorezero: ignore zero values during statistics calculation.
201
+ allvolumes: generate statistics across all image volumes, rather than\
202
+ one set of statistics per image volume.
203
+ info: display information messages.
204
+ quiet: do not display information messages or progress status;\
205
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
206
+ environment variable to a non-empty string.
207
+ debug: display debugging messages.
208
+ force: force overwrite of output files (caution: using the same file as\
209
+ input and output might cause unexpected behaviour).
210
+ nthreads: use this number of threads in multi-threaded applications\
211
+ (set to 0 to disable multi-threading).
212
+ config: temporarily set the value of an MRtrix config file entry.
213
+ help_: display this information page and exit.
214
+ version: display version information and exit.
215
+ Returns:
216
+ Parameter dictionary
217
+ """
218
+ params = {
219
+ "__STYXTYPE__": "mrstats",
220
+ "ignorezero": ignorezero,
221
+ "allvolumes": allvolumes,
222
+ "info": info,
223
+ "quiet": quiet,
224
+ "debug": debug,
225
+ "force": force,
226
+ "help": help_,
227
+ "version": version,
228
+ "image": image,
229
+ }
230
+ if output is not None:
231
+ params["output"] = output
232
+ if mask is not None:
233
+ params["mask"] = mask
234
+ if nthreads is not None:
235
+ params["nthreads"] = nthreads
236
+ if config is not None:
237
+ params["config"] = config
238
+ return params
239
+
240
+
241
+ def mrstats_cargs(
242
+ params: MrstatsParameters,
243
+ execution: Execution,
244
+ ) -> list[str]:
245
+ """
246
+ Build command-line arguments from parameters.
247
+
248
+ Args:
249
+ params: The parameters.
250
+ execution: The execution object for resolving input paths.
251
+ Returns:
252
+ Command-line arguments.
253
+ """
254
+ cargs = []
255
+ cargs.append("mrstats")
256
+ if params.get("output") is not None:
257
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("output")] for a in c])
258
+ if params.get("mask") is not None:
259
+ cargs.extend([
260
+ "-mask",
261
+ execution.input_file(params.get("mask"))
262
+ ])
263
+ if params.get("ignorezero"):
264
+ cargs.append("-ignorezero")
265
+ if params.get("allvolumes"):
266
+ cargs.append("-allvolumes")
267
+ if params.get("info"):
268
+ cargs.append("-info")
269
+ if params.get("quiet"):
270
+ cargs.append("-quiet")
271
+ if params.get("debug"):
272
+ cargs.append("-debug")
273
+ if params.get("force"):
274
+ cargs.append("-force")
275
+ if params.get("nthreads") is not None:
276
+ cargs.extend([
277
+ "-nthreads",
278
+ str(params.get("nthreads"))
279
+ ])
280
+ if params.get("config") is not None:
281
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
282
+ if params.get("help"):
283
+ cargs.append("-help")
284
+ if params.get("version"):
285
+ cargs.append("-version")
286
+ cargs.append(execution.input_file(params.get("image")))
287
+ return cargs
288
+
289
+
290
+ def mrstats_outputs(
291
+ params: MrstatsParameters,
292
+ execution: Execution,
293
+ ) -> MrstatsOutputs:
294
+ """
295
+ Build outputs object containing output file paths and possibly stdout/stderr.
296
+
297
+ Args:
298
+ params: The parameters.
299
+ execution: The execution object for resolving input paths.
300
+ Returns:
301
+ Outputs object.
302
+ """
303
+ ret = MrstatsOutputs(
304
+ root=execution.output_file("."),
305
+ )
306
+ return ret
307
+
308
+
309
+ def mrstats_execute(
310
+ params: MrstatsParameters,
311
+ execution: Execution,
312
+ ) -> MrstatsOutputs:
313
+ """
314
+ Compute images statistics.
315
+
316
+
317
+
318
+ References:
319
+
320
+ .
321
+
322
+ Author: MRTrix3 Developers
323
+
324
+ URL: https://www.mrtrix.org/
325
+
326
+ Args:
327
+ params: The parameters.
328
+ execution: The execution object.
329
+ Returns:
330
+ NamedTuple of outputs (described in `MrstatsOutputs`).
331
+ """
332
+ params = execution.params(params)
333
+ cargs = mrstats_cargs(params, execution)
334
+ ret = mrstats_outputs(params, execution)
335
+ execution.run(cargs)
336
+ return ret
337
+
338
+
339
+ def mrstats(
340
+ image: InputPathType,
341
+ output: list[MrstatsOutputParameters] | None = None,
342
+ mask: InputPathType | None = None,
343
+ ignorezero: bool = False,
344
+ allvolumes: bool = False,
345
+ info: bool = False,
346
+ quiet: bool = False,
347
+ debug: bool = False,
348
+ force: bool = False,
349
+ nthreads: int | None = None,
350
+ config: list[MrstatsConfigParameters] | None = None,
351
+ help_: bool = False,
352
+ version: bool = False,
353
+ runner: Runner | None = None,
354
+ ) -> MrstatsOutputs:
355
+ """
356
+ Compute images statistics.
357
+
358
+
359
+
360
+ References:
361
+
362
+ .
363
+
364
+ Author: MRTrix3 Developers
365
+
366
+ URL: https://www.mrtrix.org/
367
+
368
+ Args:
369
+ image: the input image from which statistics will be computed.
370
+ output: output only the field specified. Multiple such options can be\
371
+ supplied if required. Choices are: mean, median, std, std_rv, min, max,\
372
+ count. Useful for use in scripts. Both std options refer to the\
373
+ unbiased (sample) standard deviation. For complex data, min, max and\
374
+ std are calculated separately for real and imaginary parts, std_rv is\
375
+ based on the real valued variance (equals sqrt of sum of variances of\
376
+ imaginary and real parts).
377
+ mask: only perform computation within the specified binary mask image.
378
+ ignorezero: ignore zero values during statistics calculation.
379
+ allvolumes: generate statistics across all image volumes, rather than\
380
+ one set of statistics per image volume.
381
+ info: display information messages.
382
+ quiet: do not display information messages or progress status;\
383
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
384
+ environment variable to a non-empty string.
385
+ debug: display debugging messages.
386
+ force: force overwrite of output files (caution: using the same file as\
387
+ input and output might cause unexpected behaviour).
388
+ nthreads: use this number of threads in multi-threaded applications\
389
+ (set to 0 to disable multi-threading).
390
+ config: temporarily set the value of an MRtrix config file entry.
391
+ help_: display this information page and exit.
392
+ version: display version information and exit.
393
+ runner: Command runner.
394
+ Returns:
395
+ NamedTuple of outputs (described in `MrstatsOutputs`).
396
+ """
397
+ runner = runner or get_global_runner()
398
+ execution = runner.start_execution(MRSTATS_METADATA)
399
+ params = mrstats_params(
400
+ output=output,
401
+ mask=mask,
402
+ ignorezero=ignorezero,
403
+ allvolumes=allvolumes,
404
+ info=info,
405
+ quiet=quiet,
406
+ debug=debug,
407
+ force=force,
408
+ nthreads=nthreads,
409
+ config=config,
410
+ help_=help_,
411
+ version=version,
412
+ image=image,
413
+ )
414
+ return mrstats_execute(params, execution)
415
+
416
+
417
+ __all__ = [
418
+ "MRSTATS_METADATA",
419
+ "MrstatsConfigParameters",
420
+ "MrstatsOutputParameters",
421
+ "MrstatsOutputs",
422
+ "MrstatsParameters",
423
+ "mrstats",
424
+ "mrstats_config_params",
425
+ "mrstats_output_params",
426
+ "mrstats_params",
427
+ ]