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
+ TCKRESAMPLE_METADATA = Metadata(
9
+ id="985698dc2451e564202878939f3e4388fbe9d151.boutiques",
10
+ name="tckresample",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ TckresampleLineParameters = typing.TypedDict('TckresampleLineParameters', {
17
+ "__STYX_TYPE__": typing.Literal["line"],
18
+ "num": int,
19
+ "start": list[float],
20
+ "end": list[float],
21
+ })
22
+
23
+
24
+ TckresampleArcParameters = typing.TypedDict('TckresampleArcParameters', {
25
+ "__STYX_TYPE__": typing.Literal["arc"],
26
+ "num": int,
27
+ "start": list[float],
28
+ "mid": list[float],
29
+ "end": list[float],
30
+ })
31
+
32
+
33
+ TckresampleConfigParameters = typing.TypedDict('TckresampleConfigParameters', {
34
+ "__STYX_TYPE__": typing.Literal["config"],
35
+ "key": str,
36
+ "value": str,
37
+ })
38
+
39
+
40
+ TckresampleParameters = typing.TypedDict('TckresampleParameters', {
41
+ "__STYX_TYPE__": typing.Literal["tckresample"],
42
+ "upsample": typing.NotRequired[int | None],
43
+ "downsample": typing.NotRequired[int | None],
44
+ "step_size": typing.NotRequired[float | None],
45
+ "num_points": typing.NotRequired[int | None],
46
+ "endpoints": bool,
47
+ "line": typing.NotRequired[TckresampleLineParameters | None],
48
+ "arc": typing.NotRequired[TckresampleArcParameters | None],
49
+ "info": bool,
50
+ "quiet": bool,
51
+ "debug": bool,
52
+ "force": bool,
53
+ "nthreads": typing.NotRequired[int | None],
54
+ "config": typing.NotRequired[list[TckresampleConfigParameters] | None],
55
+ "help": bool,
56
+ "version": bool,
57
+ "in_tracks": InputPathType,
58
+ "out_tracks": str,
59
+ })
60
+
61
+
62
+ def dyn_cargs(
63
+ t: str,
64
+ ) -> typing.Any:
65
+ """
66
+ Get build cargs function by command type.
67
+
68
+ Args:
69
+ t: Command type.
70
+ Returns:
71
+ Build cargs function.
72
+ """
73
+ return {
74
+ "tckresample": tckresample_cargs,
75
+ "line": tckresample_line_cargs,
76
+ "arc": tckresample_arc_cargs,
77
+ "config": tckresample_config_cargs,
78
+ }.get(t)
79
+
80
+
81
+ def dyn_outputs(
82
+ t: str,
83
+ ) -> typing.Any:
84
+ """
85
+ Get build outputs function by command type.
86
+
87
+ Args:
88
+ t: Command type.
89
+ Returns:
90
+ Build outputs function.
91
+ """
92
+ return {
93
+ "tckresample": tckresample_outputs,
94
+ }.get(t)
95
+
96
+
97
+ def tckresample_line_params(
98
+ num: int,
99
+ start: list[float],
100
+ end: list[float],
101
+ ) -> TckresampleLineParameters:
102
+ """
103
+ Build parameters.
104
+
105
+ Args:
106
+ num: resample tracks at 'num' equidistant locations along a line\
107
+ between 'start' and 'end' (specified as comma-separated 3-vectors in\
108
+ scanner coordinates).
109
+ start: resample tracks at 'num' equidistant locations along a line\
110
+ between 'start' and 'end' (specified as comma-separated 3-vectors in\
111
+ scanner coordinates).
112
+ end: resample tracks at 'num' equidistant locations along a line\
113
+ between 'start' and 'end' (specified as comma-separated 3-vectors in\
114
+ scanner coordinates).
115
+ Returns:
116
+ Parameter dictionary
117
+ """
118
+ params = {
119
+ "__STYXTYPE__": "line",
120
+ "num": num,
121
+ "start": start,
122
+ "end": end,
123
+ }
124
+ return params
125
+
126
+
127
+ def tckresample_line_cargs(
128
+ params: TckresampleLineParameters,
129
+ execution: Execution,
130
+ ) -> list[str]:
131
+ """
132
+ Build command-line arguments from parameters.
133
+
134
+ Args:
135
+ params: The parameters.
136
+ execution: The execution object for resolving input paths.
137
+ Returns:
138
+ Command-line arguments.
139
+ """
140
+ cargs = []
141
+ cargs.append("-line")
142
+ cargs.append(str(params.get("num")))
143
+ cargs.append(",".join(map(str, params.get("start"))))
144
+ cargs.append(",".join(map(str, params.get("end"))))
145
+ return cargs
146
+
147
+
148
+ def tckresample_arc_params(
149
+ num: int,
150
+ start: list[float],
151
+ mid: list[float],
152
+ end: list[float],
153
+ ) -> TckresampleArcParameters:
154
+ """
155
+ Build parameters.
156
+
157
+ Args:
158
+ num: resample tracks at 'num' equidistant locations along a circular\
159
+ arc specified by points 'start', 'mid' and 'end' (specified as\
160
+ comma-separated 3-vectors in scanner coordinates).
161
+ start: resample tracks at 'num' equidistant locations along a circular\
162
+ arc specified by points 'start', 'mid' and 'end' (specified as\
163
+ comma-separated 3-vectors in scanner coordinates).
164
+ mid: resample tracks at 'num' equidistant locations along a circular\
165
+ arc specified by points 'start', 'mid' and 'end' (specified as\
166
+ comma-separated 3-vectors in scanner coordinates).
167
+ end: resample tracks at 'num' equidistant locations along a circular\
168
+ arc specified by points 'start', 'mid' and 'end' (specified as\
169
+ comma-separated 3-vectors in scanner coordinates).
170
+ Returns:
171
+ Parameter dictionary
172
+ """
173
+ params = {
174
+ "__STYXTYPE__": "arc",
175
+ "num": num,
176
+ "start": start,
177
+ "mid": mid,
178
+ "end": end,
179
+ }
180
+ return params
181
+
182
+
183
+ def tckresample_arc_cargs(
184
+ params: TckresampleArcParameters,
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("-arc")
198
+ cargs.append(str(params.get("num")))
199
+ cargs.append(",".join(map(str, params.get("start"))))
200
+ cargs.append(",".join(map(str, params.get("mid"))))
201
+ cargs.append(",".join(map(str, params.get("end"))))
202
+ return cargs
203
+
204
+
205
+ def tckresample_config_params(
206
+ key: str,
207
+ value: str,
208
+ ) -> TckresampleConfigParameters:
209
+ """
210
+ Build parameters.
211
+
212
+ Args:
213
+ key: temporarily set the value of an MRtrix config file entry.
214
+ value: temporarily set the value of an MRtrix config file entry.
215
+ Returns:
216
+ Parameter dictionary
217
+ """
218
+ params = {
219
+ "__STYXTYPE__": "config",
220
+ "key": key,
221
+ "value": value,
222
+ }
223
+ return params
224
+
225
+
226
+ def tckresample_config_cargs(
227
+ params: TckresampleConfigParameters,
228
+ execution: Execution,
229
+ ) -> list[str]:
230
+ """
231
+ Build command-line arguments from parameters.
232
+
233
+ Args:
234
+ params: The parameters.
235
+ execution: The execution object for resolving input paths.
236
+ Returns:
237
+ Command-line arguments.
238
+ """
239
+ cargs = []
240
+ cargs.append("-config")
241
+ cargs.append(params.get("key"))
242
+ cargs.append(params.get("value"))
243
+ return cargs
244
+
245
+
246
+ class TckresampleOutputs(typing.NamedTuple):
247
+ """
248
+ Output object returned when calling `tckresample(...)`.
249
+ """
250
+ root: OutputPathType
251
+ """Output root folder. This is the root folder for all outputs."""
252
+ out_tracks: OutputPathType
253
+ """the output resampled tracks"""
254
+
255
+
256
+ def tckresample_params(
257
+ in_tracks: InputPathType,
258
+ out_tracks: str,
259
+ upsample: int | None = None,
260
+ downsample: int | None = None,
261
+ step_size: float | None = None,
262
+ num_points: int | None = None,
263
+ endpoints: bool = False,
264
+ line: TckresampleLineParameters | None = None,
265
+ arc: TckresampleArcParameters | None = None,
266
+ info: bool = False,
267
+ quiet: bool = False,
268
+ debug: bool = False,
269
+ force: bool = False,
270
+ nthreads: int | None = None,
271
+ config: list[TckresampleConfigParameters] | None = None,
272
+ help_: bool = False,
273
+ version: bool = False,
274
+ ) -> TckresampleParameters:
275
+ """
276
+ Build parameters.
277
+
278
+ Args:
279
+ in_tracks: the input track file.
280
+ out_tracks: the output resampled tracks.
281
+ upsample: increase the density of points along the length of each\
282
+ streamline by some factor (may improve mapping streamlines to ROIs,\
283
+ and/or visualisation).
284
+ downsample: increase the density of points along the length of each\
285
+ streamline by some factor (decreases required storage space).
286
+ step_size: re-sample the streamlines to a desired step size (in mm).
287
+ num_points: re-sample each streamline to a fixed number of points.
288
+ endpoints: only output the two endpoints of each streamline.
289
+ line: resample tracks at 'num' equidistant locations along a line\
290
+ between 'start' and 'end' (specified as comma-separated 3-vectors in\
291
+ scanner coordinates).
292
+ arc: resample tracks at 'num' equidistant locations along a circular\
293
+ arc specified by points 'start', 'mid' and 'end' (specified as\
294
+ comma-separated 3-vectors in scanner coordinates).
295
+ info: display information messages.
296
+ quiet: do not display information messages or progress status;\
297
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
298
+ environment variable to a non-empty string.
299
+ debug: display debugging messages.
300
+ force: force overwrite of output files (caution: using the same file as\
301
+ input and output might cause unexpected behaviour).
302
+ nthreads: use this number of threads in multi-threaded applications\
303
+ (set to 0 to disable multi-threading).
304
+ config: temporarily set the value of an MRtrix config file entry.
305
+ help_: display this information page and exit.
306
+ version: display version information and exit.
307
+ Returns:
308
+ Parameter dictionary
309
+ """
310
+ params = {
311
+ "__STYXTYPE__": "tckresample",
312
+ "endpoints": endpoints,
313
+ "info": info,
314
+ "quiet": quiet,
315
+ "debug": debug,
316
+ "force": force,
317
+ "help": help_,
318
+ "version": version,
319
+ "in_tracks": in_tracks,
320
+ "out_tracks": out_tracks,
321
+ }
322
+ if upsample is not None:
323
+ params["upsample"] = upsample
324
+ if downsample is not None:
325
+ params["downsample"] = downsample
326
+ if step_size is not None:
327
+ params["step_size"] = step_size
328
+ if num_points is not None:
329
+ params["num_points"] = num_points
330
+ if line is not None:
331
+ params["line"] = line
332
+ if arc is not None:
333
+ params["arc"] = arc
334
+ if nthreads is not None:
335
+ params["nthreads"] = nthreads
336
+ if config is not None:
337
+ params["config"] = config
338
+ return params
339
+
340
+
341
+ def tckresample_cargs(
342
+ params: TckresampleParameters,
343
+ execution: Execution,
344
+ ) -> list[str]:
345
+ """
346
+ Build command-line arguments from parameters.
347
+
348
+ Args:
349
+ params: The parameters.
350
+ execution: The execution object for resolving input paths.
351
+ Returns:
352
+ Command-line arguments.
353
+ """
354
+ cargs = []
355
+ cargs.append("tckresample")
356
+ if params.get("upsample") is not None:
357
+ cargs.extend([
358
+ "-upsample",
359
+ str(params.get("upsample"))
360
+ ])
361
+ if params.get("downsample") is not None:
362
+ cargs.extend([
363
+ "-downsample",
364
+ str(params.get("downsample"))
365
+ ])
366
+ if params.get("step_size") is not None:
367
+ cargs.extend([
368
+ "-step_size",
369
+ str(params.get("step_size"))
370
+ ])
371
+ if params.get("num_points") is not None:
372
+ cargs.extend([
373
+ "-num_points",
374
+ str(params.get("num_points"))
375
+ ])
376
+ if params.get("endpoints"):
377
+ cargs.append("-endpoints")
378
+ if params.get("line") is not None:
379
+ cargs.extend(dyn_cargs(params.get("line")["__STYXTYPE__"])(params.get("line"), execution))
380
+ if params.get("arc") is not None:
381
+ cargs.extend(dyn_cargs(params.get("arc")["__STYXTYPE__"])(params.get("arc"), execution))
382
+ if params.get("info"):
383
+ cargs.append("-info")
384
+ if params.get("quiet"):
385
+ cargs.append("-quiet")
386
+ if params.get("debug"):
387
+ cargs.append("-debug")
388
+ if params.get("force"):
389
+ cargs.append("-force")
390
+ if params.get("nthreads") is not None:
391
+ cargs.extend([
392
+ "-nthreads",
393
+ str(params.get("nthreads"))
394
+ ])
395
+ if params.get("config") is not None:
396
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
397
+ if params.get("help"):
398
+ cargs.append("-help")
399
+ if params.get("version"):
400
+ cargs.append("-version")
401
+ cargs.append(execution.input_file(params.get("in_tracks")))
402
+ cargs.append(params.get("out_tracks"))
403
+ return cargs
404
+
405
+
406
+ def tckresample_outputs(
407
+ params: TckresampleParameters,
408
+ execution: Execution,
409
+ ) -> TckresampleOutputs:
410
+ """
411
+ Build outputs object containing output file paths and possibly stdout/stderr.
412
+
413
+ Args:
414
+ params: The parameters.
415
+ execution: The execution object for resolving input paths.
416
+ Returns:
417
+ Outputs object.
418
+ """
419
+ ret = TckresampleOutputs(
420
+ root=execution.output_file("."),
421
+ out_tracks=execution.output_file(params.get("out_tracks")),
422
+ )
423
+ return ret
424
+
425
+
426
+ def tckresample_execute(
427
+ params: TckresampleParameters,
428
+ execution: Execution,
429
+ ) -> TckresampleOutputs:
430
+ """
431
+ Resample each streamline in a track file to a new set of vertices.
432
+
433
+ It is necessary to specify precisely ONE of the command-line options for
434
+ controlling how this resampling takes place; this may be either increasing
435
+ or decreasing the number of samples along each streamline, or may involve
436
+ changing the positions of the samples according to some specified
437
+ trajectory.
438
+
439
+ Note that because the length of a streamline is calculated based on the sums
440
+ of distances between adjacent vertices, resampling a streamline to a new set
441
+ of vertices will typically change the quantified length of that streamline;
442
+ the magnitude of the difference will typically depend on the discrepancy in
443
+ the number of vertices, with less vertices leading to a shorter length (due
444
+ to taking chordal lengths of curved trajectories).
445
+
446
+ References:
447
+
448
+ .
449
+
450
+ Author: MRTrix3 Developers
451
+
452
+ URL: https://www.mrtrix.org/
453
+
454
+ Args:
455
+ params: The parameters.
456
+ execution: The execution object.
457
+ Returns:
458
+ NamedTuple of outputs (described in `TckresampleOutputs`).
459
+ """
460
+ params = execution.params(params)
461
+ cargs = tckresample_cargs(params, execution)
462
+ ret = tckresample_outputs(params, execution)
463
+ execution.run(cargs)
464
+ return ret
465
+
466
+
467
+ def tckresample(
468
+ in_tracks: InputPathType,
469
+ out_tracks: str,
470
+ upsample: int | None = None,
471
+ downsample: int | None = None,
472
+ step_size: float | None = None,
473
+ num_points: int | None = None,
474
+ endpoints: bool = False,
475
+ line: TckresampleLineParameters | None = None,
476
+ arc: TckresampleArcParameters | None = None,
477
+ info: bool = False,
478
+ quiet: bool = False,
479
+ debug: bool = False,
480
+ force: bool = False,
481
+ nthreads: int | None = None,
482
+ config: list[TckresampleConfigParameters] | None = None,
483
+ help_: bool = False,
484
+ version: bool = False,
485
+ runner: Runner | None = None,
486
+ ) -> TckresampleOutputs:
487
+ """
488
+ Resample each streamline in a track file to a new set of vertices.
489
+
490
+ It is necessary to specify precisely ONE of the command-line options for
491
+ controlling how this resampling takes place; this may be either increasing
492
+ or decreasing the number of samples along each streamline, or may involve
493
+ changing the positions of the samples according to some specified
494
+ trajectory.
495
+
496
+ Note that because the length of a streamline is calculated based on the sums
497
+ of distances between adjacent vertices, resampling a streamline to a new set
498
+ of vertices will typically change the quantified length of that streamline;
499
+ the magnitude of the difference will typically depend on the discrepancy in
500
+ the number of vertices, with less vertices leading to a shorter length (due
501
+ to taking chordal lengths of curved trajectories).
502
+
503
+ References:
504
+
505
+ .
506
+
507
+ Author: MRTrix3 Developers
508
+
509
+ URL: https://www.mrtrix.org/
510
+
511
+ Args:
512
+ in_tracks: the input track file.
513
+ out_tracks: the output resampled tracks.
514
+ upsample: increase the density of points along the length of each\
515
+ streamline by some factor (may improve mapping streamlines to ROIs,\
516
+ and/or visualisation).
517
+ downsample: increase the density of points along the length of each\
518
+ streamline by some factor (decreases required storage space).
519
+ step_size: re-sample the streamlines to a desired step size (in mm).
520
+ num_points: re-sample each streamline to a fixed number of points.
521
+ endpoints: only output the two endpoints of each streamline.
522
+ line: resample tracks at 'num' equidistant locations along a line\
523
+ between 'start' and 'end' (specified as comma-separated 3-vectors in\
524
+ scanner coordinates).
525
+ arc: resample tracks at 'num' equidistant locations along a circular\
526
+ arc specified by points 'start', 'mid' and 'end' (specified as\
527
+ comma-separated 3-vectors in scanner coordinates).
528
+ info: display information messages.
529
+ quiet: do not display information messages or progress status;\
530
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
531
+ environment variable to a non-empty string.
532
+ debug: display debugging messages.
533
+ force: force overwrite of output files (caution: using the same file as\
534
+ input and output might cause unexpected behaviour).
535
+ nthreads: use this number of threads in multi-threaded applications\
536
+ (set to 0 to disable multi-threading).
537
+ config: temporarily set the value of an MRtrix config file entry.
538
+ help_: display this information page and exit.
539
+ version: display version information and exit.
540
+ runner: Command runner.
541
+ Returns:
542
+ NamedTuple of outputs (described in `TckresampleOutputs`).
543
+ """
544
+ runner = runner or get_global_runner()
545
+ execution = runner.start_execution(TCKRESAMPLE_METADATA)
546
+ params = tckresample_params(
547
+ upsample=upsample,
548
+ downsample=downsample,
549
+ step_size=step_size,
550
+ num_points=num_points,
551
+ endpoints=endpoints,
552
+ line=line,
553
+ arc=arc,
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
+ in_tracks=in_tracks,
563
+ out_tracks=out_tracks,
564
+ )
565
+ return tckresample_execute(params, execution)
566
+
567
+
568
+ __all__ = [
569
+ "TCKRESAMPLE_METADATA",
570
+ "TckresampleArcParameters",
571
+ "TckresampleConfigParameters",
572
+ "TckresampleLineParameters",
573
+ "TckresampleOutputs",
574
+ "TckresampleParameters",
575
+ "tckresample",
576
+ "tckresample_arc_params",
577
+ "tckresample_config_params",
578
+ "tckresample_line_params",
579
+ "tckresample_params",
580
+ ]