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,534 @@
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
+ DWIGRADCHECK_METADATA = Metadata(
9
+ id="bb74671ccd6fa59a51829fa34812108f525873cb.boutiques",
10
+ name="dwigradcheck",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ DwigradcheckFslgradParameters = typing.TypedDict('DwigradcheckFslgradParameters', {
17
+ "__STYX_TYPE__": typing.Literal["fslgrad"],
18
+ "bvecs": InputPathType,
19
+ "bvals": InputPathType,
20
+ })
21
+
22
+
23
+ DwigradcheckExportGradFslParameters = typing.TypedDict('DwigradcheckExportGradFslParameters', {
24
+ "__STYX_TYPE__": typing.Literal["export_grad_fsl"],
25
+ "bvecs_path": str,
26
+ "bvals_path": str,
27
+ })
28
+
29
+
30
+ DwigradcheckParameters = typing.TypedDict('DwigradcheckParameters', {
31
+ "__STYX_TYPE__": typing.Literal["dwigradcheck"],
32
+ "input_image": InputPathType,
33
+ "grad": typing.NotRequired[InputPathType | None],
34
+ "fslgrad": typing.NotRequired[DwigradcheckFslgradParameters | None],
35
+ "mask_image": typing.NotRequired[InputPathType | None],
36
+ "number": typing.NotRequired[int | None],
37
+ "export_grad_mrtrix": typing.NotRequired[str | None],
38
+ "export_grad_fsl": typing.NotRequired[DwigradcheckExportGradFslParameters | None],
39
+ "nocleanup": bool,
40
+ "scratch_dir": typing.NotRequired[InputPathType | None],
41
+ "continue_scratch_dir": typing.NotRequired[list[InputPathType] | None],
42
+ "info": bool,
43
+ "quiet": bool,
44
+ "debug": bool,
45
+ "force": bool,
46
+ "nthreads": typing.NotRequired[float | None],
47
+ "config": typing.NotRequired[list[str] | None],
48
+ "help": bool,
49
+ "version": bool,
50
+ })
51
+
52
+
53
+ def dyn_cargs(
54
+ t: str,
55
+ ) -> typing.Any:
56
+ """
57
+ Get build cargs function by command type.
58
+
59
+ Args:
60
+ t: Command type.
61
+ Returns:
62
+ Build cargs function.
63
+ """
64
+ return {
65
+ "dwigradcheck": dwigradcheck_cargs,
66
+ "fslgrad": dwigradcheck_fslgrad_cargs,
67
+ "export_grad_fsl": dwigradcheck_export_grad_fsl_cargs,
68
+ }.get(t)
69
+
70
+
71
+ def dyn_outputs(
72
+ t: str,
73
+ ) -> typing.Any:
74
+ """
75
+ Get build outputs function by command type.
76
+
77
+ Args:
78
+ t: Command type.
79
+ Returns:
80
+ Build outputs function.
81
+ """
82
+ return {
83
+ "dwigradcheck": dwigradcheck_outputs,
84
+ "export_grad_fsl": dwigradcheck_export_grad_fsl_outputs,
85
+ }.get(t)
86
+
87
+
88
+ def dwigradcheck_fslgrad_params(
89
+ bvecs: InputPathType,
90
+ bvals: InputPathType,
91
+ ) -> DwigradcheckFslgradParameters:
92
+ """
93
+ Build parameters.
94
+
95
+ Args:
96
+ bvecs: Provide the diffusion-weighted gradient scheme used in the\
97
+ acquisition in FSL bvecs/bvals format files. If a diffusion gradient\
98
+ scheme is present in the input image header, the data provided with\
99
+ this option will be instead used.
100
+ bvals: Provide the diffusion-weighted gradient scheme used in the\
101
+ acquisition in FSL bvecs/bvals format files. If a diffusion gradient\
102
+ scheme is present in the input image header, the data provided with\
103
+ this option will be instead used.
104
+ Returns:
105
+ Parameter dictionary
106
+ """
107
+ params = {
108
+ "__STYXTYPE__": "fslgrad",
109
+ "bvecs": bvecs,
110
+ "bvals": bvals,
111
+ }
112
+ return params
113
+
114
+
115
+ def dwigradcheck_fslgrad_cargs(
116
+ params: DwigradcheckFslgradParameters,
117
+ execution: Execution,
118
+ ) -> list[str]:
119
+ """
120
+ Build command-line arguments from parameters.
121
+
122
+ Args:
123
+ params: The parameters.
124
+ execution: The execution object for resolving input paths.
125
+ Returns:
126
+ Command-line arguments.
127
+ """
128
+ cargs = []
129
+ cargs.append("-fslgrad")
130
+ cargs.append(execution.input_file(params.get("bvecs")))
131
+ cargs.append(execution.input_file(params.get("bvals")))
132
+ return cargs
133
+
134
+
135
+ class DwigradcheckExportGradFslOutputs(typing.NamedTuple):
136
+ """
137
+ Output object returned when calling `DwigradcheckExportGradFslParameters | None(...)`.
138
+ """
139
+ root: OutputPathType
140
+ """Output root folder. This is the root folder for all outputs."""
141
+ bvecs_path: OutputPathType
142
+ """export the diffusion-weighted gradient table to files in FSL (bvecs /
143
+ bvals) format"""
144
+ bvals_path: OutputPathType
145
+ """export the diffusion-weighted gradient table to files in FSL (bvecs /
146
+ bvals) format"""
147
+
148
+
149
+ def dwigradcheck_export_grad_fsl_params(
150
+ bvecs_path: str,
151
+ bvals_path: str,
152
+ ) -> DwigradcheckExportGradFslParameters:
153
+ """
154
+ Build parameters.
155
+
156
+ Args:
157
+ bvecs_path: export the diffusion-weighted gradient table to files in\
158
+ FSL (bvecs / bvals) format.
159
+ bvals_path: export the diffusion-weighted gradient table to files in\
160
+ FSL (bvecs / bvals) format.
161
+ Returns:
162
+ Parameter dictionary
163
+ """
164
+ params = {
165
+ "__STYXTYPE__": "export_grad_fsl",
166
+ "bvecs_path": bvecs_path,
167
+ "bvals_path": bvals_path,
168
+ }
169
+ return params
170
+
171
+
172
+ def dwigradcheck_export_grad_fsl_cargs(
173
+ params: DwigradcheckExportGradFslParameters,
174
+ execution: Execution,
175
+ ) -> list[str]:
176
+ """
177
+ Build command-line arguments from parameters.
178
+
179
+ Args:
180
+ params: The parameters.
181
+ execution: The execution object for resolving input paths.
182
+ Returns:
183
+ Command-line arguments.
184
+ """
185
+ cargs = []
186
+ cargs.append("-export_grad_fsl")
187
+ cargs.append(params.get("bvecs_path"))
188
+ cargs.append(params.get("bvals_path"))
189
+ return cargs
190
+
191
+
192
+ def dwigradcheck_export_grad_fsl_outputs(
193
+ params: DwigradcheckExportGradFslParameters,
194
+ execution: Execution,
195
+ ) -> DwigradcheckExportGradFslOutputs:
196
+ """
197
+ Build outputs object containing output file paths and possibly stdout/stderr.
198
+
199
+ Args:
200
+ params: The parameters.
201
+ execution: The execution object for resolving input paths.
202
+ Returns:
203
+ Outputs object.
204
+ """
205
+ ret = DwigradcheckExportGradFslOutputs(
206
+ root=execution.output_file("."),
207
+ bvecs_path=execution.output_file(params.get("bvecs_path")),
208
+ bvals_path=execution.output_file(params.get("bvals_path")),
209
+ )
210
+ return ret
211
+
212
+
213
+ class DwigradcheckOutputs(typing.NamedTuple):
214
+ """
215
+ Output object returned when calling `dwigradcheck(...)`.
216
+ """
217
+ root: OutputPathType
218
+ """Output root folder. This is the root folder for all outputs."""
219
+ export_grad_mrtrix: OutputPathType | None
220
+ """export the diffusion-weighted gradient table to file in MRtrix format """
221
+ export_grad_fsl: OutputPathType | None
222
+ """export the diffusion-weighted gradient table to file in FSL format """
223
+ export_grad_fsl_: DwigradcheckExportGradFslOutputs | None
224
+ """Outputs from `dwigradcheck_export_grad_fsl_outputs`."""
225
+
226
+
227
+ def dwigradcheck_params(
228
+ input_image: InputPathType,
229
+ grad: InputPathType | None = None,
230
+ fslgrad: DwigradcheckFslgradParameters | None = None,
231
+ mask_image: InputPathType | None = None,
232
+ number: int | None = None,
233
+ export_grad_mrtrix: str | None = None,
234
+ export_grad_fsl: DwigradcheckExportGradFslParameters | None = None,
235
+ nocleanup: bool = False,
236
+ scratch_dir: InputPathType | None = None,
237
+ continue_scratch_dir: list[InputPathType] | None = None,
238
+ info: bool = False,
239
+ quiet: bool = False,
240
+ debug: bool = False,
241
+ force: bool = False,
242
+ nthreads: float | None = None,
243
+ config: list[str] | None = None,
244
+ help_: bool = False,
245
+ version: bool = False,
246
+ ) -> DwigradcheckParameters:
247
+ """
248
+ Build parameters.
249
+
250
+ Args:
251
+ input_image: The input DWI series to be checked.
252
+ grad: Provide the diffusion gradient table in MRtrix format.
253
+ fslgrad: Provide the diffusion-weighted gradient scheme used in the\
254
+ acquisition in FSL bvecs/bvals format files. If a diffusion gradient\
255
+ scheme is present in the input image header, the data provided with\
256
+ this option will be instead used.
257
+ mask_image: Provide a brain mask image.
258
+ number: Set the number of tracks to generate for each test.
259
+ export_grad_mrtrix: export the diffusion-weighted gradient table to\
260
+ file in MRtrix format.
261
+ export_grad_fsl: export the diffusion-weighted gradient table to files\
262
+ in FSL (bvecs / bvals) format.
263
+ nocleanup: Do not delete intermediate files during script execution,\
264
+ and do not delete scratch directory at script completion.
265
+ scratch_dir: Manually specify the path in which to generate the scratch\
266
+ directory.
267
+ continue_scratch_dir: Continue the script from a previous execution;\
268
+ must provide the scratch directory path.
269
+ info: Display information messages.
270
+ quiet: Do not display information messages or progress status.
271
+ debug: Display debugging messages.
272
+ force: Force overwrite of output files.
273
+ nthreads: Use this number of threads in multi-threaded applications\
274
+ (set to 0 to disable multi-threading).
275
+ config: Temporarily set the value of an MRtrix config file entry.
276
+ help_: Display help information and exit.
277
+ version: Display version information and exit.
278
+ Returns:
279
+ Parameter dictionary
280
+ """
281
+ params = {
282
+ "__STYXTYPE__": "dwigradcheck",
283
+ "input_image": input_image,
284
+ "nocleanup": nocleanup,
285
+ "info": info,
286
+ "quiet": quiet,
287
+ "debug": debug,
288
+ "force": force,
289
+ "help": help_,
290
+ "version": version,
291
+ }
292
+ if grad is not None:
293
+ params["grad"] = grad
294
+ if fslgrad is not None:
295
+ params["fslgrad"] = fslgrad
296
+ if mask_image is not None:
297
+ params["mask_image"] = mask_image
298
+ if number is not None:
299
+ params["number"] = number
300
+ if export_grad_mrtrix is not None:
301
+ params["export_grad_mrtrix"] = export_grad_mrtrix
302
+ if export_grad_fsl is not None:
303
+ params["export_grad_fsl"] = export_grad_fsl
304
+ if scratch_dir is not None:
305
+ params["scratch_dir"] = scratch_dir
306
+ if continue_scratch_dir is not None:
307
+ params["continue_scratch_dir"] = continue_scratch_dir
308
+ if nthreads is not None:
309
+ params["nthreads"] = nthreads
310
+ if config is not None:
311
+ params["config"] = config
312
+ return params
313
+
314
+
315
+ def dwigradcheck_cargs(
316
+ params: DwigradcheckParameters,
317
+ execution: Execution,
318
+ ) -> list[str]:
319
+ """
320
+ Build command-line arguments from parameters.
321
+
322
+ Args:
323
+ params: The parameters.
324
+ execution: The execution object for resolving input paths.
325
+ Returns:
326
+ Command-line arguments.
327
+ """
328
+ cargs = []
329
+ cargs.append("dwigradcheck")
330
+ cargs.append(execution.input_file(params.get("input_image")))
331
+ if params.get("grad") is not None:
332
+ cargs.extend([
333
+ "-grad",
334
+ execution.input_file(params.get("grad"))
335
+ ])
336
+ if params.get("fslgrad") is not None:
337
+ cargs.extend(dyn_cargs(params.get("fslgrad")["__STYXTYPE__"])(params.get("fslgrad"), execution))
338
+ if params.get("mask_image") is not None:
339
+ cargs.extend([
340
+ "-mask",
341
+ execution.input_file(params.get("mask_image"))
342
+ ])
343
+ if params.get("number") is not None:
344
+ cargs.extend([
345
+ "-number",
346
+ str(params.get("number"))
347
+ ])
348
+ if params.get("export_grad_mrtrix") is not None:
349
+ cargs.extend([
350
+ "-export_grad_mrtrix",
351
+ params.get("export_grad_mrtrix")
352
+ ])
353
+ if params.get("export_grad_fsl") is not None:
354
+ cargs.extend(dyn_cargs(params.get("export_grad_fsl")["__STYXTYPE__"])(params.get("export_grad_fsl"), execution))
355
+ if params.get("nocleanup"):
356
+ cargs.append("-nocleanup")
357
+ if params.get("scratch_dir") is not None:
358
+ cargs.extend([
359
+ "-scratch",
360
+ execution.input_file(params.get("scratch_dir"))
361
+ ])
362
+ if params.get("continue_scratch_dir") is not None:
363
+ cargs.extend([
364
+ "-continue",
365
+ *[execution.input_file(f) for f in params.get("continue_scratch_dir")]
366
+ ])
367
+ if params.get("info"):
368
+ cargs.append("-info")
369
+ if params.get("quiet"):
370
+ cargs.append("-quiet")
371
+ if params.get("debug"):
372
+ cargs.append("-debug")
373
+ if params.get("force"):
374
+ cargs.append("-force")
375
+ if params.get("nthreads") is not None:
376
+ cargs.extend([
377
+ "-nthreads",
378
+ str(params.get("nthreads"))
379
+ ])
380
+ if params.get("config") is not None:
381
+ cargs.extend([
382
+ "-config",
383
+ *params.get("config")
384
+ ])
385
+ if params.get("help"):
386
+ cargs.append("-help")
387
+ if params.get("version"):
388
+ cargs.append("-version")
389
+ return cargs
390
+
391
+
392
+ def dwigradcheck_outputs(
393
+ params: DwigradcheckParameters,
394
+ execution: Execution,
395
+ ) -> DwigradcheckOutputs:
396
+ """
397
+ Build outputs object containing output file paths and possibly stdout/stderr.
398
+
399
+ Args:
400
+ params: The parameters.
401
+ execution: The execution object for resolving input paths.
402
+ Returns:
403
+ Outputs object.
404
+ """
405
+ ret = DwigradcheckOutputs(
406
+ root=execution.output_file("."),
407
+ export_grad_mrtrix=execution.output_file(params.get("export_grad_mrtrix")) if (params.get("export_grad_mrtrix") is not None) else None,
408
+ export_grad_fsl=execution.output_file(params.get("export_grad_mrtrix")) if (params.get("export_grad_mrtrix") is not None) else None,
409
+ export_grad_fsl_=dyn_outputs(params.get("export_grad_fsl")["__STYXTYPE__"])(params.get("export_grad_fsl"), execution) if params.get("export_grad_fsl") else None,
410
+ )
411
+ return ret
412
+
413
+
414
+ def dwigradcheck_execute(
415
+ params: DwigradcheckParameters,
416
+ execution: Execution,
417
+ ) -> DwigradcheckOutputs:
418
+ """
419
+ Check the orientation of the diffusion gradient table.
420
+
421
+ Author: MRTrix3 Developers
422
+
423
+ URL: https://www.mrtrix.org/
424
+
425
+ Args:
426
+ params: The parameters.
427
+ execution: The execution object.
428
+ Returns:
429
+ NamedTuple of outputs (described in `DwigradcheckOutputs`).
430
+ """
431
+ params = execution.params(params)
432
+ cargs = dwigradcheck_cargs(params, execution)
433
+ ret = dwigradcheck_outputs(params, execution)
434
+ execution.run(cargs)
435
+ return ret
436
+
437
+
438
+ def dwigradcheck(
439
+ input_image: InputPathType,
440
+ grad: InputPathType | None = None,
441
+ fslgrad: DwigradcheckFslgradParameters | None = None,
442
+ mask_image: InputPathType | None = None,
443
+ number: int | None = None,
444
+ export_grad_mrtrix: str | None = None,
445
+ export_grad_fsl: DwigradcheckExportGradFslParameters | None = None,
446
+ nocleanup: bool = False,
447
+ scratch_dir: InputPathType | None = None,
448
+ continue_scratch_dir: list[InputPathType] | None = None,
449
+ info: bool = False,
450
+ quiet: bool = False,
451
+ debug: bool = False,
452
+ force: bool = False,
453
+ nthreads: float | None = None,
454
+ config: list[str] | None = None,
455
+ help_: bool = False,
456
+ version: bool = False,
457
+ runner: Runner | None = None,
458
+ ) -> DwigradcheckOutputs:
459
+ """
460
+ Check the orientation of the diffusion gradient table.
461
+
462
+ Author: MRTrix3 Developers
463
+
464
+ URL: https://www.mrtrix.org/
465
+
466
+ Args:
467
+ input_image: The input DWI series to be checked.
468
+ grad: Provide the diffusion gradient table in MRtrix format.
469
+ fslgrad: Provide the diffusion-weighted gradient scheme used in the\
470
+ acquisition in FSL bvecs/bvals format files. If a diffusion gradient\
471
+ scheme is present in the input image header, the data provided with\
472
+ this option will be instead used.
473
+ mask_image: Provide a brain mask image.
474
+ number: Set the number of tracks to generate for each test.
475
+ export_grad_mrtrix: export the diffusion-weighted gradient table to\
476
+ file in MRtrix format.
477
+ export_grad_fsl: export the diffusion-weighted gradient table to files\
478
+ in FSL (bvecs / bvals) format.
479
+ nocleanup: Do not delete intermediate files during script execution,\
480
+ and do not delete scratch directory at script completion.
481
+ scratch_dir: Manually specify the path in which to generate the scratch\
482
+ directory.
483
+ continue_scratch_dir: Continue the script from a previous execution;\
484
+ must provide the scratch directory path.
485
+ info: Display information messages.
486
+ quiet: Do not display information messages or progress status.
487
+ debug: Display debugging messages.
488
+ force: Force overwrite of output files.
489
+ nthreads: Use this number of threads in multi-threaded applications\
490
+ (set to 0 to disable multi-threading).
491
+ config: Temporarily set the value of an MRtrix config file entry.
492
+ help_: Display help information and exit.
493
+ version: Display version information and exit.
494
+ runner: Command runner.
495
+ Returns:
496
+ NamedTuple of outputs (described in `DwigradcheckOutputs`).
497
+ """
498
+ runner = runner or get_global_runner()
499
+ execution = runner.start_execution(DWIGRADCHECK_METADATA)
500
+ params = dwigradcheck_params(
501
+ input_image=input_image,
502
+ grad=grad,
503
+ fslgrad=fslgrad,
504
+ mask_image=mask_image,
505
+ number=number,
506
+ export_grad_mrtrix=export_grad_mrtrix,
507
+ export_grad_fsl=export_grad_fsl,
508
+ nocleanup=nocleanup,
509
+ scratch_dir=scratch_dir,
510
+ continue_scratch_dir=continue_scratch_dir,
511
+ info=info,
512
+ quiet=quiet,
513
+ debug=debug,
514
+ force=force,
515
+ nthreads=nthreads,
516
+ config=config,
517
+ help_=help_,
518
+ version=version,
519
+ )
520
+ return dwigradcheck_execute(params, execution)
521
+
522
+
523
+ __all__ = [
524
+ "DWIGRADCHECK_METADATA",
525
+ "DwigradcheckExportGradFslOutputs",
526
+ "DwigradcheckExportGradFslParameters",
527
+ "DwigradcheckFslgradParameters",
528
+ "DwigradcheckOutputs",
529
+ "DwigradcheckParameters",
530
+ "dwigradcheck",
531
+ "dwigradcheck_export_grad_fsl_params",
532
+ "dwigradcheck_fslgrad_params",
533
+ "dwigradcheck_params",
534
+ ]