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,580 @@
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
+ TCKCONVERT_METADATA = Metadata(
9
+ id="e099f163628c4f4e1f744a964fec71d2c4cd255c.boutiques",
10
+ name="tckconvert",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ TckconvertConfigParameters = typing.TypedDict('TckconvertConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ TckconvertVariousStringParameters = typing.TypedDict('TckconvertVariousStringParameters', {
24
+ "__STYX_TYPE__": typing.Literal["VariousString"],
25
+ "obj": str,
26
+ })
27
+
28
+
29
+ TckconvertVariousFileParameters = typing.TypedDict('TckconvertVariousFileParameters', {
30
+ "__STYX_TYPE__": typing.Literal["VariousFile"],
31
+ "obj": InputPathType,
32
+ })
33
+
34
+
35
+ TckconvertParameters = typing.TypedDict('TckconvertParameters', {
36
+ "__STYX_TYPE__": typing.Literal["tckconvert"],
37
+ "scanner2voxel": typing.NotRequired[InputPathType | None],
38
+ "scanner2image": typing.NotRequired[InputPathType | None],
39
+ "voxel2scanner": typing.NotRequired[InputPathType | None],
40
+ "image2scanner": typing.NotRequired[InputPathType | None],
41
+ "sides": typing.NotRequired[int | None],
42
+ "increment": typing.NotRequired[int | None],
43
+ "dec": bool,
44
+ "radius": typing.NotRequired[float | None],
45
+ "ascii": bool,
46
+ "binary": bool,
47
+ "info": bool,
48
+ "quiet": bool,
49
+ "debug": bool,
50
+ "force": bool,
51
+ "nthreads": typing.NotRequired[int | None],
52
+ "config": typing.NotRequired[list[TckconvertConfigParameters] | None],
53
+ "help": bool,
54
+ "version": bool,
55
+ "input": typing.Union[TckconvertVariousStringParameters, TckconvertVariousFileParameters],
56
+ "output": str,
57
+ })
58
+
59
+
60
+ def dyn_cargs(
61
+ t: str,
62
+ ) -> typing.Any:
63
+ """
64
+ Get build cargs function by command type.
65
+
66
+ Args:
67
+ t: Command type.
68
+ Returns:
69
+ Build cargs function.
70
+ """
71
+ return {
72
+ "tckconvert": tckconvert_cargs,
73
+ "config": tckconvert_config_cargs,
74
+ "VariousString": tckconvert_various_string_cargs,
75
+ "VariousFile": tckconvert_various_file_cargs,
76
+ }.get(t)
77
+
78
+
79
+ def dyn_outputs(
80
+ t: str,
81
+ ) -> typing.Any:
82
+ """
83
+ Get build outputs function by command type.
84
+
85
+ Args:
86
+ t: Command type.
87
+ Returns:
88
+ Build outputs function.
89
+ """
90
+ return {
91
+ "tckconvert": tckconvert_outputs,
92
+ }.get(t)
93
+
94
+
95
+ def tckconvert_config_params(
96
+ key: str,
97
+ value: str,
98
+ ) -> TckconvertConfigParameters:
99
+ """
100
+ Build parameters.
101
+
102
+ Args:
103
+ key: temporarily set the value of an MRtrix config file entry.
104
+ value: temporarily set the value of an MRtrix config file entry.
105
+ Returns:
106
+ Parameter dictionary
107
+ """
108
+ params = {
109
+ "__STYXTYPE__": "config",
110
+ "key": key,
111
+ "value": value,
112
+ }
113
+ return params
114
+
115
+
116
+ def tckconvert_config_cargs(
117
+ params: TckconvertConfigParameters,
118
+ execution: Execution,
119
+ ) -> list[str]:
120
+ """
121
+ Build command-line arguments from parameters.
122
+
123
+ Args:
124
+ params: The parameters.
125
+ execution: The execution object for resolving input paths.
126
+ Returns:
127
+ Command-line arguments.
128
+ """
129
+ cargs = []
130
+ cargs.append("-config")
131
+ cargs.append(params.get("key"))
132
+ cargs.append(params.get("value"))
133
+ return cargs
134
+
135
+
136
+ def tckconvert_various_string_params(
137
+ obj: str,
138
+ ) -> TckconvertVariousStringParameters:
139
+ """
140
+ Build parameters.
141
+
142
+ Args:
143
+ obj: String object.
144
+ Returns:
145
+ Parameter dictionary
146
+ """
147
+ params = {
148
+ "__STYXTYPE__": "VariousString",
149
+ "obj": obj,
150
+ }
151
+ return params
152
+
153
+
154
+ def tckconvert_various_string_cargs(
155
+ params: TckconvertVariousStringParameters,
156
+ execution: Execution,
157
+ ) -> list[str]:
158
+ """
159
+ Build command-line arguments from parameters.
160
+
161
+ Args:
162
+ params: The parameters.
163
+ execution: The execution object for resolving input paths.
164
+ Returns:
165
+ Command-line arguments.
166
+ """
167
+ cargs = []
168
+ cargs.append(params.get("obj"))
169
+ return cargs
170
+
171
+
172
+ def tckconvert_various_file_params(
173
+ obj: InputPathType,
174
+ ) -> TckconvertVariousFileParameters:
175
+ """
176
+ Build parameters.
177
+
178
+ Args:
179
+ obj: File object.
180
+ Returns:
181
+ Parameter dictionary
182
+ """
183
+ params = {
184
+ "__STYXTYPE__": "VariousFile",
185
+ "obj": obj,
186
+ }
187
+ return params
188
+
189
+
190
+ def tckconvert_various_file_cargs(
191
+ params: TckconvertVariousFileParameters,
192
+ execution: Execution,
193
+ ) -> list[str]:
194
+ """
195
+ Build command-line arguments from parameters.
196
+
197
+ Args:
198
+ params: The parameters.
199
+ execution: The execution object for resolving input paths.
200
+ Returns:
201
+ Command-line arguments.
202
+ """
203
+ cargs = []
204
+ cargs.append(execution.input_file(params.get("obj")))
205
+ return cargs
206
+
207
+
208
+ class TckconvertOutputs(typing.NamedTuple):
209
+ """
210
+ Output object returned when calling `tckconvert(...)`.
211
+ """
212
+ root: OutputPathType
213
+ """Output root folder. This is the root folder for all outputs."""
214
+ output: OutputPathType
215
+ """the output track file."""
216
+
217
+
218
+ def tckconvert_params(
219
+ input_: typing.Union[TckconvertVariousStringParameters, TckconvertVariousFileParameters],
220
+ output: str,
221
+ scanner2voxel: InputPathType | None = None,
222
+ scanner2image: InputPathType | None = None,
223
+ voxel2scanner: InputPathType | None = None,
224
+ image2scanner: InputPathType | None = None,
225
+ sides: int | None = None,
226
+ increment: int | None = None,
227
+ dec: bool = False,
228
+ radius: float | None = None,
229
+ ascii_: bool = False,
230
+ binary: bool = False,
231
+ info: bool = False,
232
+ quiet: bool = False,
233
+ debug: bool = False,
234
+ force: bool = False,
235
+ nthreads: int | None = None,
236
+ config: list[TckconvertConfigParameters] | None = None,
237
+ help_: bool = False,
238
+ version: bool = False,
239
+ ) -> TckconvertParameters:
240
+ """
241
+ Build parameters.
242
+
243
+ Args:
244
+ input_: the input track file.
245
+ output: the output track file.
246
+ scanner2voxel: if specified, the properties of this image will be used\
247
+ to convert track point positions from real (scanner) coordinates into\
248
+ voxel coordinates.
249
+ scanner2image: if specified, the properties of this image will be used\
250
+ to convert track point positions from real (scanner) coordinates into\
251
+ image coordinates (in mm).
252
+ voxel2scanner: if specified, the properties of this image will be used\
253
+ to convert track point positions from voxel coordinates into real\
254
+ (scanner) coordinates.
255
+ image2scanner: if specified, the properties of this image will be used\
256
+ to convert track point positions from image coordinates (in mm) into\
257
+ real (scanner) coordinates.
258
+ sides: number of sides for streamlines.
259
+ increment: generate streamline points at every (increment) points.
260
+ dec: add DEC as a primvar.
261
+ radius: radius of the streamlines.
262
+ ascii_: write an ASCII VTK file (this is the default).
263
+ binary: write a binary VTK file.
264
+ info: display information messages.
265
+ quiet: do not display information messages or progress status;\
266
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
267
+ environment variable to a non-empty string.
268
+ debug: display debugging messages.
269
+ force: force overwrite of output files (caution: using the same file as\
270
+ input and output might cause unexpected behaviour).
271
+ nthreads: use this number of threads in multi-threaded applications\
272
+ (set to 0 to disable multi-threading).
273
+ config: temporarily set the value of an MRtrix config file entry.
274
+ help_: display this information page and exit.
275
+ version: display version information and exit.
276
+ Returns:
277
+ Parameter dictionary
278
+ """
279
+ params = {
280
+ "__STYXTYPE__": "tckconvert",
281
+ "dec": dec,
282
+ "ascii": ascii_,
283
+ "binary": binary,
284
+ "info": info,
285
+ "quiet": quiet,
286
+ "debug": debug,
287
+ "force": force,
288
+ "help": help_,
289
+ "version": version,
290
+ "input": input_,
291
+ "output": output,
292
+ }
293
+ if scanner2voxel is not None:
294
+ params["scanner2voxel"] = scanner2voxel
295
+ if scanner2image is not None:
296
+ params["scanner2image"] = scanner2image
297
+ if voxel2scanner is not None:
298
+ params["voxel2scanner"] = voxel2scanner
299
+ if image2scanner is not None:
300
+ params["image2scanner"] = image2scanner
301
+ if sides is not None:
302
+ params["sides"] = sides
303
+ if increment is not None:
304
+ params["increment"] = increment
305
+ if radius is not None:
306
+ params["radius"] = radius
307
+ if nthreads is not None:
308
+ params["nthreads"] = nthreads
309
+ if config is not None:
310
+ params["config"] = config
311
+ return params
312
+
313
+
314
+ def tckconvert_cargs(
315
+ params: TckconvertParameters,
316
+ execution: Execution,
317
+ ) -> list[str]:
318
+ """
319
+ Build command-line arguments from parameters.
320
+
321
+ Args:
322
+ params: The parameters.
323
+ execution: The execution object for resolving input paths.
324
+ Returns:
325
+ Command-line arguments.
326
+ """
327
+ cargs = []
328
+ cargs.append("tckconvert")
329
+ if params.get("scanner2voxel") is not None:
330
+ cargs.extend([
331
+ "-scanner2voxel",
332
+ execution.input_file(params.get("scanner2voxel"))
333
+ ])
334
+ if params.get("scanner2image") is not None:
335
+ cargs.extend([
336
+ "-scanner2image",
337
+ execution.input_file(params.get("scanner2image"))
338
+ ])
339
+ if params.get("voxel2scanner") is not None:
340
+ cargs.extend([
341
+ "-voxel2scanner",
342
+ execution.input_file(params.get("voxel2scanner"))
343
+ ])
344
+ if params.get("image2scanner") is not None:
345
+ cargs.extend([
346
+ "-image2scanner",
347
+ execution.input_file(params.get("image2scanner"))
348
+ ])
349
+ if params.get("sides") is not None:
350
+ cargs.extend([
351
+ "-sides",
352
+ str(params.get("sides"))
353
+ ])
354
+ if params.get("increment") is not None:
355
+ cargs.extend([
356
+ "-increment",
357
+ str(params.get("increment"))
358
+ ])
359
+ if params.get("dec"):
360
+ cargs.append("-dec")
361
+ if params.get("radius") is not None:
362
+ cargs.extend([
363
+ "-radius",
364
+ str(params.get("radius"))
365
+ ])
366
+ if params.get("ascii"):
367
+ cargs.append("-ascii")
368
+ if params.get("binary"):
369
+ cargs.append("-binary")
370
+ if params.get("info"):
371
+ cargs.append("-info")
372
+ if params.get("quiet"):
373
+ cargs.append("-quiet")
374
+ if params.get("debug"):
375
+ cargs.append("-debug")
376
+ if params.get("force"):
377
+ cargs.append("-force")
378
+ if params.get("nthreads") is not None:
379
+ cargs.extend([
380
+ "-nthreads",
381
+ str(params.get("nthreads"))
382
+ ])
383
+ if params.get("config") is not None:
384
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
385
+ if params.get("help"):
386
+ cargs.append("-help")
387
+ if params.get("version"):
388
+ cargs.append("-version")
389
+ cargs.extend(dyn_cargs(params.get("input")["__STYXTYPE__"])(params.get("input"), execution))
390
+ cargs.append(params.get("output"))
391
+ return cargs
392
+
393
+
394
+ def tckconvert_outputs(
395
+ params: TckconvertParameters,
396
+ execution: Execution,
397
+ ) -> TckconvertOutputs:
398
+ """
399
+ Build outputs object containing output file paths and possibly stdout/stderr.
400
+
401
+ Args:
402
+ params: The parameters.
403
+ execution: The execution object for resolving input paths.
404
+ Returns:
405
+ Outputs object.
406
+ """
407
+ ret = TckconvertOutputs(
408
+ root=execution.output_file("."),
409
+ output=execution.output_file(params.get("output")),
410
+ )
411
+ return ret
412
+
413
+
414
+ def tckconvert_execute(
415
+ params: TckconvertParameters,
416
+ execution: Execution,
417
+ ) -> TckconvertOutputs:
418
+ """
419
+ Convert between different track file formats.
420
+
421
+ The program currently supports MRtrix .tck files (input/output), ascii text
422
+ files (input/output), VTK polydata files (input/output), and RenderMan RIB
423
+ (export only).
424
+
425
+ Note that ascii files will be stored with one streamline per numbered file.
426
+ To support this, the command will use the multi-file numbering syntax, where
427
+ square brackets denote the position of the numbering for the files, for
428
+ example:
429
+
430
+ $ tckconvert input.tck output-'[]'.txt
431
+
432
+ will produce files named output-0000.txt, output-0001.txt, output-0002.txt,
433
+ ...
434
+
435
+ References:
436
+
437
+ .
438
+
439
+ Author: MRTrix3 Developers
440
+
441
+ URL: https://www.mrtrix.org/
442
+
443
+ Args:
444
+ params: The parameters.
445
+ execution: The execution object.
446
+ Returns:
447
+ NamedTuple of outputs (described in `TckconvertOutputs`).
448
+ """
449
+ params = execution.params(params)
450
+ cargs = tckconvert_cargs(params, execution)
451
+ ret = tckconvert_outputs(params, execution)
452
+ execution.run(cargs)
453
+ return ret
454
+
455
+
456
+ def tckconvert(
457
+ input_: typing.Union[TckconvertVariousStringParameters, TckconvertVariousFileParameters],
458
+ output: str,
459
+ scanner2voxel: InputPathType | None = None,
460
+ scanner2image: InputPathType | None = None,
461
+ voxel2scanner: InputPathType | None = None,
462
+ image2scanner: InputPathType | None = None,
463
+ sides: int | None = None,
464
+ increment: int | None = None,
465
+ dec: bool = False,
466
+ radius: float | None = None,
467
+ ascii_: bool = False,
468
+ binary: bool = False,
469
+ info: bool = False,
470
+ quiet: bool = False,
471
+ debug: bool = False,
472
+ force: bool = False,
473
+ nthreads: int | None = None,
474
+ config: list[TckconvertConfigParameters] | None = None,
475
+ help_: bool = False,
476
+ version: bool = False,
477
+ runner: Runner | None = None,
478
+ ) -> TckconvertOutputs:
479
+ """
480
+ Convert between different track file formats.
481
+
482
+ The program currently supports MRtrix .tck files (input/output), ascii text
483
+ files (input/output), VTK polydata files (input/output), and RenderMan RIB
484
+ (export only).
485
+
486
+ Note that ascii files will be stored with one streamline per numbered file.
487
+ To support this, the command will use the multi-file numbering syntax, where
488
+ square brackets denote the position of the numbering for the files, for
489
+ example:
490
+
491
+ $ tckconvert input.tck output-'[]'.txt
492
+
493
+ will produce files named output-0000.txt, output-0001.txt, output-0002.txt,
494
+ ...
495
+
496
+ References:
497
+
498
+ .
499
+
500
+ Author: MRTrix3 Developers
501
+
502
+ URL: https://www.mrtrix.org/
503
+
504
+ Args:
505
+ input_: the input track file.
506
+ output: the output track file.
507
+ scanner2voxel: if specified, the properties of this image will be used\
508
+ to convert track point positions from real (scanner) coordinates into\
509
+ voxel coordinates.
510
+ scanner2image: if specified, the properties of this image will be used\
511
+ to convert track point positions from real (scanner) coordinates into\
512
+ image coordinates (in mm).
513
+ voxel2scanner: if specified, the properties of this image will be used\
514
+ to convert track point positions from voxel coordinates into real\
515
+ (scanner) coordinates.
516
+ image2scanner: if specified, the properties of this image will be used\
517
+ to convert track point positions from image coordinates (in mm) into\
518
+ real (scanner) coordinates.
519
+ sides: number of sides for streamlines.
520
+ increment: generate streamline points at every (increment) points.
521
+ dec: add DEC as a primvar.
522
+ radius: radius of the streamlines.
523
+ ascii_: write an ASCII VTK file (this is the default).
524
+ binary: write a binary VTK file.
525
+ info: display information messages.
526
+ quiet: do not display information messages or progress status;\
527
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
528
+ environment variable to a non-empty string.
529
+ debug: display debugging messages.
530
+ force: force overwrite of output files (caution: using the same file as\
531
+ input and output might cause unexpected behaviour).
532
+ nthreads: use this number of threads in multi-threaded applications\
533
+ (set to 0 to disable multi-threading).
534
+ config: temporarily set the value of an MRtrix config file entry.
535
+ help_: display this information page and exit.
536
+ version: display version information and exit.
537
+ runner: Command runner.
538
+ Returns:
539
+ NamedTuple of outputs (described in `TckconvertOutputs`).
540
+ """
541
+ runner = runner or get_global_runner()
542
+ execution = runner.start_execution(TCKCONVERT_METADATA)
543
+ params = tckconvert_params(
544
+ scanner2voxel=scanner2voxel,
545
+ scanner2image=scanner2image,
546
+ voxel2scanner=voxel2scanner,
547
+ image2scanner=image2scanner,
548
+ sides=sides,
549
+ increment=increment,
550
+ dec=dec,
551
+ radius=radius,
552
+ ascii_=ascii_,
553
+ binary=binary,
554
+ info=info,
555
+ quiet=quiet,
556
+ debug=debug,
557
+ force=force,
558
+ nthreads=nthreads,
559
+ config=config,
560
+ help_=help_,
561
+ version=version,
562
+ input_=input_,
563
+ output=output,
564
+ )
565
+ return tckconvert_execute(params, execution)
566
+
567
+
568
+ __all__ = [
569
+ "TCKCONVERT_METADATA",
570
+ "TckconvertConfigParameters",
571
+ "TckconvertOutputs",
572
+ "TckconvertParameters",
573
+ "TckconvertVariousFileParameters",
574
+ "TckconvertVariousStringParameters",
575
+ "tckconvert",
576
+ "tckconvert_config_params",
577
+ "tckconvert_params",
578
+ "tckconvert_various_file_params",
579
+ "tckconvert_various_string_params",
580
+ ]