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,362 @@
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
+ DIRFLIP_METADATA = Metadata(
9
+ id="86336786511bfdfa104481617aa49c18d390fff0.boutiques",
10
+ name="dirflip",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ DirflipConfigParameters = typing.TypedDict('DirflipConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ DirflipParameters = typing.TypedDict('DirflipParameters', {
24
+ "__STYX_TYPE__": typing.Literal["dirflip"],
25
+ "permutations": typing.NotRequired[int | None],
26
+ "cartesian": bool,
27
+ "info": bool,
28
+ "quiet": bool,
29
+ "debug": bool,
30
+ "force": bool,
31
+ "nthreads": typing.NotRequired[int | None],
32
+ "config": typing.NotRequired[list[DirflipConfigParameters] | None],
33
+ "help": bool,
34
+ "version": bool,
35
+ "in": InputPathType,
36
+ "out": str,
37
+ })
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
+ "dirflip": dirflip_cargs,
53
+ "config": dirflip_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
+ "dirflip": dirflip_outputs,
70
+ }.get(t)
71
+
72
+
73
+ def dirflip_config_params(
74
+ key: str,
75
+ value: str,
76
+ ) -> DirflipConfigParameters:
77
+ """
78
+ Build parameters.
79
+
80
+ Args:
81
+ key: temporarily set the value of an MRtrix config file entry.
82
+ value: temporarily set the value of an MRtrix config file entry.
83
+ Returns:
84
+ Parameter dictionary
85
+ """
86
+ params = {
87
+ "__STYXTYPE__": "config",
88
+ "key": key,
89
+ "value": value,
90
+ }
91
+ return params
92
+
93
+
94
+ def dirflip_config_cargs(
95
+ params: DirflipConfigParameters,
96
+ execution: Execution,
97
+ ) -> list[str]:
98
+ """
99
+ Build command-line arguments from parameters.
100
+
101
+ Args:
102
+ params: The parameters.
103
+ execution: The execution object for resolving input paths.
104
+ Returns:
105
+ Command-line arguments.
106
+ """
107
+ cargs = []
108
+ cargs.append("-config")
109
+ cargs.append(params.get("key"))
110
+ cargs.append(params.get("value"))
111
+ return cargs
112
+
113
+
114
+ class DirflipOutputs(typing.NamedTuple):
115
+ """
116
+ Output object returned when calling `dirflip(...)`.
117
+ """
118
+ root: OutputPathType
119
+ """Output root folder. This is the root folder for all outputs."""
120
+ out: OutputPathType
121
+ """the output files for the directions."""
122
+
123
+
124
+ def dirflip_params(
125
+ in_: InputPathType,
126
+ out: str,
127
+ permutations: int | None = None,
128
+ cartesian: bool = False,
129
+ info: bool = False,
130
+ quiet: bool = False,
131
+ debug: bool = False,
132
+ force: bool = False,
133
+ nthreads: int | None = None,
134
+ config: list[DirflipConfigParameters] | None = None,
135
+ help_: bool = False,
136
+ version: bool = False,
137
+ ) -> DirflipParameters:
138
+ """
139
+ Build parameters.
140
+
141
+ Args:
142
+ in_: the input files for the directions.
143
+ out: the output files for the directions.
144
+ permutations: number of permutations to try (default: 100000000).
145
+ cartesian: Output the directions in Cartesian coordinates [x y z]\
146
+ instead of [az el].
147
+ info: display information messages.
148
+ quiet: do not display information messages or progress status;\
149
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
150
+ environment variable to a non-empty string.
151
+ debug: display debugging messages.
152
+ force: force overwrite of output files (caution: using the same file as\
153
+ input and output might cause unexpected behaviour).
154
+ nthreads: use this number of threads in multi-threaded applications\
155
+ (set to 0 to disable multi-threading).
156
+ config: temporarily set the value of an MRtrix config file entry.
157
+ help_: display this information page and exit.
158
+ version: display version information and exit.
159
+ Returns:
160
+ Parameter dictionary
161
+ """
162
+ params = {
163
+ "__STYXTYPE__": "dirflip",
164
+ "cartesian": cartesian,
165
+ "info": info,
166
+ "quiet": quiet,
167
+ "debug": debug,
168
+ "force": force,
169
+ "help": help_,
170
+ "version": version,
171
+ "in": in_,
172
+ "out": out,
173
+ }
174
+ if permutations is not None:
175
+ params["permutations"] = permutations
176
+ if nthreads is not None:
177
+ params["nthreads"] = nthreads
178
+ if config is not None:
179
+ params["config"] = config
180
+ return params
181
+
182
+
183
+ def dirflip_cargs(
184
+ params: DirflipParameters,
185
+ execution: Execution,
186
+ ) -> list[str]:
187
+ """
188
+ Build command-line arguments from parameters.
189
+
190
+ Args:
191
+ params: The parameters.
192
+ execution: The execution object for resolving input paths.
193
+ Returns:
194
+ Command-line arguments.
195
+ """
196
+ cargs = []
197
+ cargs.append("dirflip")
198
+ if params.get("permutations") is not None:
199
+ cargs.extend([
200
+ "-permutations",
201
+ str(params.get("permutations"))
202
+ ])
203
+ if params.get("cartesian"):
204
+ cargs.append("-cartesian")
205
+ if params.get("info"):
206
+ cargs.append("-info")
207
+ if params.get("quiet"):
208
+ cargs.append("-quiet")
209
+ if params.get("debug"):
210
+ cargs.append("-debug")
211
+ if params.get("force"):
212
+ cargs.append("-force")
213
+ if params.get("nthreads") is not None:
214
+ cargs.extend([
215
+ "-nthreads",
216
+ str(params.get("nthreads"))
217
+ ])
218
+ if params.get("config") is not None:
219
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
220
+ if params.get("help"):
221
+ cargs.append("-help")
222
+ if params.get("version"):
223
+ cargs.append("-version")
224
+ cargs.append(execution.input_file(params.get("in")))
225
+ cargs.append(params.get("out"))
226
+ return cargs
227
+
228
+
229
+ def dirflip_outputs(
230
+ params: DirflipParameters,
231
+ execution: Execution,
232
+ ) -> DirflipOutputs:
233
+ """
234
+ Build outputs object containing output file paths and possibly stdout/stderr.
235
+
236
+ Args:
237
+ params: The parameters.
238
+ execution: The execution object for resolving input paths.
239
+ Returns:
240
+ Outputs object.
241
+ """
242
+ ret = DirflipOutputs(
243
+ root=execution.output_file("."),
244
+ out=execution.output_file(params.get("out")),
245
+ )
246
+ return ret
247
+
248
+
249
+ def dirflip_execute(
250
+ params: DirflipParameters,
251
+ execution: Execution,
252
+ ) -> DirflipOutputs:
253
+ """
254
+ Invert the polarity of individual directions so as to optimise a unipolar
255
+ electrostatic repulsion model.
256
+
257
+ The orientations themselves are not affected, only their polarity; this is
258
+ necessary to ensure near-optimal distribution of DW directions for
259
+ eddy-current correction.
260
+
261
+ References:
262
+
263
+ .
264
+
265
+ Author: MRTrix3 Developers
266
+
267
+ URL: https://www.mrtrix.org/
268
+
269
+ Args:
270
+ params: The parameters.
271
+ execution: The execution object.
272
+ Returns:
273
+ NamedTuple of outputs (described in `DirflipOutputs`).
274
+ """
275
+ params = execution.params(params)
276
+ cargs = dirflip_cargs(params, execution)
277
+ ret = dirflip_outputs(params, execution)
278
+ execution.run(cargs)
279
+ return ret
280
+
281
+
282
+ def dirflip(
283
+ in_: InputPathType,
284
+ out: str,
285
+ permutations: int | None = None,
286
+ cartesian: bool = False,
287
+ info: bool = False,
288
+ quiet: bool = False,
289
+ debug: bool = False,
290
+ force: bool = False,
291
+ nthreads: int | None = None,
292
+ config: list[DirflipConfigParameters] | None = None,
293
+ help_: bool = False,
294
+ version: bool = False,
295
+ runner: Runner | None = None,
296
+ ) -> DirflipOutputs:
297
+ """
298
+ Invert the polarity of individual directions so as to optimise a unipolar
299
+ electrostatic repulsion model.
300
+
301
+ The orientations themselves are not affected, only their polarity; this is
302
+ necessary to ensure near-optimal distribution of DW directions for
303
+ eddy-current correction.
304
+
305
+ References:
306
+
307
+ .
308
+
309
+ Author: MRTrix3 Developers
310
+
311
+ URL: https://www.mrtrix.org/
312
+
313
+ Args:
314
+ in_: the input files for the directions.
315
+ out: the output files for the directions.
316
+ permutations: number of permutations to try (default: 100000000).
317
+ cartesian: Output the directions in Cartesian coordinates [x y z]\
318
+ instead of [az el].
319
+ info: display information messages.
320
+ quiet: do not display information messages or progress status;\
321
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
322
+ environment variable to a non-empty string.
323
+ debug: display debugging messages.
324
+ force: force overwrite of output files (caution: using the same file as\
325
+ input and output might cause unexpected behaviour).
326
+ nthreads: use this number of threads in multi-threaded applications\
327
+ (set to 0 to disable multi-threading).
328
+ config: temporarily set the value of an MRtrix config file entry.
329
+ help_: display this information page and exit.
330
+ version: display version information and exit.
331
+ runner: Command runner.
332
+ Returns:
333
+ NamedTuple of outputs (described in `DirflipOutputs`).
334
+ """
335
+ runner = runner or get_global_runner()
336
+ execution = runner.start_execution(DIRFLIP_METADATA)
337
+ params = dirflip_params(
338
+ permutations=permutations,
339
+ cartesian=cartesian,
340
+ info=info,
341
+ quiet=quiet,
342
+ debug=debug,
343
+ force=force,
344
+ nthreads=nthreads,
345
+ config=config,
346
+ help_=help_,
347
+ version=version,
348
+ in_=in_,
349
+ out=out,
350
+ )
351
+ return dirflip_execute(params, execution)
352
+
353
+
354
+ __all__ = [
355
+ "DIRFLIP_METADATA",
356
+ "DirflipConfigParameters",
357
+ "DirflipOutputs",
358
+ "DirflipParameters",
359
+ "dirflip",
360
+ "dirflip_config_params",
361
+ "dirflip_params",
362
+ ]