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,370 @@
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
+ MESHFILTER_METADATA = Metadata(
9
+ id="60786a8c6290d7bdf51b9e5b7367257fed09c188.boutiques",
10
+ name="meshfilter",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ MeshfilterConfigParameters = typing.TypedDict('MeshfilterConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ MeshfilterParameters = typing.TypedDict('MeshfilterParameters', {
24
+ "__STYX_TYPE__": typing.Literal["meshfilter"],
25
+ "smooth_spatial": typing.NotRequired[float | None],
26
+ "smooth_influence": typing.NotRequired[float | None],
27
+ "info": bool,
28
+ "quiet": bool,
29
+ "debug": bool,
30
+ "force": bool,
31
+ "nthreads": typing.NotRequired[int | None],
32
+ "config": typing.NotRequired[list[MeshfilterConfigParameters] | None],
33
+ "help": bool,
34
+ "version": bool,
35
+ "input": InputPathType,
36
+ "filter": str,
37
+ "output": str,
38
+ })
39
+
40
+
41
+ def dyn_cargs(
42
+ t: str,
43
+ ) -> typing.Any:
44
+ """
45
+ Get build cargs function by command type.
46
+
47
+ Args:
48
+ t: Command type.
49
+ Returns:
50
+ Build cargs function.
51
+ """
52
+ return {
53
+ "meshfilter": meshfilter_cargs,
54
+ "config": meshfilter_config_cargs,
55
+ }.get(t)
56
+
57
+
58
+ def dyn_outputs(
59
+ t: str,
60
+ ) -> typing.Any:
61
+ """
62
+ Get build outputs function by command type.
63
+
64
+ Args:
65
+ t: Command type.
66
+ Returns:
67
+ Build outputs function.
68
+ """
69
+ return {
70
+ "meshfilter": meshfilter_outputs,
71
+ }.get(t)
72
+
73
+
74
+ def meshfilter_config_params(
75
+ key: str,
76
+ value: str,
77
+ ) -> MeshfilterConfigParameters:
78
+ """
79
+ Build parameters.
80
+
81
+ Args:
82
+ key: temporarily set the value of an MRtrix config file entry.
83
+ value: temporarily set the value of an MRtrix config file entry.
84
+ Returns:
85
+ Parameter dictionary
86
+ """
87
+ params = {
88
+ "__STYXTYPE__": "config",
89
+ "key": key,
90
+ "value": value,
91
+ }
92
+ return params
93
+
94
+
95
+ def meshfilter_config_cargs(
96
+ params: MeshfilterConfigParameters,
97
+ execution: Execution,
98
+ ) -> list[str]:
99
+ """
100
+ Build command-line arguments from parameters.
101
+
102
+ Args:
103
+ params: The parameters.
104
+ execution: The execution object for resolving input paths.
105
+ Returns:
106
+ Command-line arguments.
107
+ """
108
+ cargs = []
109
+ cargs.append("-config")
110
+ cargs.append(params.get("key"))
111
+ cargs.append(params.get("value"))
112
+ return cargs
113
+
114
+
115
+ class MeshfilterOutputs(typing.NamedTuple):
116
+ """
117
+ Output object returned when calling `meshfilter(...)`.
118
+ """
119
+ root: OutputPathType
120
+ """Output root folder. This is the root folder for all outputs."""
121
+ output: OutputPathType
122
+ """the output mesh file"""
123
+
124
+
125
+ def meshfilter_params(
126
+ input_: InputPathType,
127
+ filter_: str,
128
+ output: str,
129
+ smooth_spatial: float | None = None,
130
+ smooth_influence: float | None = None,
131
+ info: bool = False,
132
+ quiet: bool = False,
133
+ debug: bool = False,
134
+ force: bool = False,
135
+ nthreads: int | None = None,
136
+ config: list[MeshfilterConfigParameters] | None = None,
137
+ help_: bool = False,
138
+ version: bool = False,
139
+ ) -> MeshfilterParameters:
140
+ """
141
+ Build parameters.
142
+
143
+ Args:
144
+ input_: the input mesh file.
145
+ filter_: the filter to apply.Options are: smooth.
146
+ output: the output mesh file.
147
+ smooth_spatial: spatial extent of smoothing (default: 10mm).
148
+ smooth_influence: influence factor for smoothing (default: 10).
149
+ info: display information messages.
150
+ quiet: do not display information messages or progress status;\
151
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
152
+ environment variable to a non-empty string.
153
+ debug: display debugging messages.
154
+ force: force overwrite of output files (caution: using the same file as\
155
+ input and output might cause unexpected behaviour).
156
+ nthreads: use this number of threads in multi-threaded applications\
157
+ (set to 0 to disable multi-threading).
158
+ config: temporarily set the value of an MRtrix config file entry.
159
+ help_: display this information page and exit.
160
+ version: display version information and exit.
161
+ Returns:
162
+ Parameter dictionary
163
+ """
164
+ params = {
165
+ "__STYXTYPE__": "meshfilter",
166
+ "info": info,
167
+ "quiet": quiet,
168
+ "debug": debug,
169
+ "force": force,
170
+ "help": help_,
171
+ "version": version,
172
+ "input": input_,
173
+ "filter": filter_,
174
+ "output": output,
175
+ }
176
+ if smooth_spatial is not None:
177
+ params["smooth_spatial"] = smooth_spatial
178
+ if smooth_influence is not None:
179
+ params["smooth_influence"] = smooth_influence
180
+ if nthreads is not None:
181
+ params["nthreads"] = nthreads
182
+ if config is not None:
183
+ params["config"] = config
184
+ return params
185
+
186
+
187
+ def meshfilter_cargs(
188
+ params: MeshfilterParameters,
189
+ execution: Execution,
190
+ ) -> list[str]:
191
+ """
192
+ Build command-line arguments from parameters.
193
+
194
+ Args:
195
+ params: The parameters.
196
+ execution: The execution object for resolving input paths.
197
+ Returns:
198
+ Command-line arguments.
199
+ """
200
+ cargs = []
201
+ cargs.append("meshfilter")
202
+ if params.get("smooth_spatial") is not None:
203
+ cargs.extend([
204
+ "-smooth_spatial",
205
+ str(params.get("smooth_spatial"))
206
+ ])
207
+ if params.get("smooth_influence") is not None:
208
+ cargs.extend([
209
+ "-smooth_influence",
210
+ str(params.get("smooth_influence"))
211
+ ])
212
+ if params.get("info"):
213
+ cargs.append("-info")
214
+ if params.get("quiet"):
215
+ cargs.append("-quiet")
216
+ if params.get("debug"):
217
+ cargs.append("-debug")
218
+ if params.get("force"):
219
+ cargs.append("-force")
220
+ if params.get("nthreads") is not None:
221
+ cargs.extend([
222
+ "-nthreads",
223
+ str(params.get("nthreads"))
224
+ ])
225
+ if params.get("config") is not None:
226
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
227
+ if params.get("help"):
228
+ cargs.append("-help")
229
+ if params.get("version"):
230
+ cargs.append("-version")
231
+ cargs.append(execution.input_file(params.get("input")))
232
+ cargs.append(params.get("filter"))
233
+ cargs.append(params.get("output"))
234
+ return cargs
235
+
236
+
237
+ def meshfilter_outputs(
238
+ params: MeshfilterParameters,
239
+ execution: Execution,
240
+ ) -> MeshfilterOutputs:
241
+ """
242
+ Build outputs object containing output file paths and possibly stdout/stderr.
243
+
244
+ Args:
245
+ params: The parameters.
246
+ execution: The execution object for resolving input paths.
247
+ Returns:
248
+ Outputs object.
249
+ """
250
+ ret = MeshfilterOutputs(
251
+ root=execution.output_file("."),
252
+ output=execution.output_file(params.get("output")),
253
+ )
254
+ return ret
255
+
256
+
257
+ def meshfilter_execute(
258
+ params: MeshfilterParameters,
259
+ execution: Execution,
260
+ ) -> MeshfilterOutputs:
261
+ """
262
+ Apply filter operations to meshes.
263
+
264
+ While this command has only one filter operation currently available, it
265
+ nevertheless presents with a comparable interface to the MRtrix3 commands
266
+ maskfilter and mrfilter commands.
267
+
268
+ References:
269
+
270
+ .
271
+
272
+ Author: MRTrix3 Developers
273
+
274
+ URL: https://www.mrtrix.org/
275
+
276
+ Args:
277
+ params: The parameters.
278
+ execution: The execution object.
279
+ Returns:
280
+ NamedTuple of outputs (described in `MeshfilterOutputs`).
281
+ """
282
+ params = execution.params(params)
283
+ cargs = meshfilter_cargs(params, execution)
284
+ ret = meshfilter_outputs(params, execution)
285
+ execution.run(cargs)
286
+ return ret
287
+
288
+
289
+ def meshfilter(
290
+ input_: InputPathType,
291
+ filter_: str,
292
+ output: str,
293
+ smooth_spatial: float | None = None,
294
+ smooth_influence: float | None = None,
295
+ info: bool = False,
296
+ quiet: bool = False,
297
+ debug: bool = False,
298
+ force: bool = False,
299
+ nthreads: int | None = None,
300
+ config: list[MeshfilterConfigParameters] | None = None,
301
+ help_: bool = False,
302
+ version: bool = False,
303
+ runner: Runner | None = None,
304
+ ) -> MeshfilterOutputs:
305
+ """
306
+ Apply filter operations to meshes.
307
+
308
+ While this command has only one filter operation currently available, it
309
+ nevertheless presents with a comparable interface to the MRtrix3 commands
310
+ maskfilter and mrfilter commands.
311
+
312
+ References:
313
+
314
+ .
315
+
316
+ Author: MRTrix3 Developers
317
+
318
+ URL: https://www.mrtrix.org/
319
+
320
+ Args:
321
+ input_: the input mesh file.
322
+ filter_: the filter to apply.Options are: smooth.
323
+ output: the output mesh file.
324
+ smooth_spatial: spatial extent of smoothing (default: 10mm).
325
+ smooth_influence: influence factor for smoothing (default: 10).
326
+ info: display information messages.
327
+ quiet: do not display information messages or progress status;\
328
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
329
+ environment variable to a non-empty string.
330
+ debug: display debugging messages.
331
+ force: force overwrite of output files (caution: using the same file as\
332
+ input and output might cause unexpected behaviour).
333
+ nthreads: use this number of threads in multi-threaded applications\
334
+ (set to 0 to disable multi-threading).
335
+ config: temporarily set the value of an MRtrix config file entry.
336
+ help_: display this information page and exit.
337
+ version: display version information and exit.
338
+ runner: Command runner.
339
+ Returns:
340
+ NamedTuple of outputs (described in `MeshfilterOutputs`).
341
+ """
342
+ runner = runner or get_global_runner()
343
+ execution = runner.start_execution(MESHFILTER_METADATA)
344
+ params = meshfilter_params(
345
+ smooth_spatial=smooth_spatial,
346
+ smooth_influence=smooth_influence,
347
+ info=info,
348
+ quiet=quiet,
349
+ debug=debug,
350
+ force=force,
351
+ nthreads=nthreads,
352
+ config=config,
353
+ help_=help_,
354
+ version=version,
355
+ input_=input_,
356
+ filter_=filter_,
357
+ output=output,
358
+ )
359
+ return meshfilter_execute(params, execution)
360
+
361
+
362
+ __all__ = [
363
+ "MESHFILTER_METADATA",
364
+ "MeshfilterConfigParameters",
365
+ "MeshfilterOutputs",
366
+ "MeshfilterParameters",
367
+ "meshfilter",
368
+ "meshfilter_config_params",
369
+ "meshfilter_params",
370
+ ]