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.
- niwrap_mrtrix/mrtrix/__init__.py +130 -0
- niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
- niwrap_mrtrix/mrtrix/amp2response.py +453 -0
- niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
- niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
- niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
- niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
- niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
- niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
- niwrap_mrtrix/mrtrix/dirflip.py +362 -0
- niwrap_mrtrix/mrtrix/dirgen.py +423 -0
- niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
- niwrap_mrtrix/mrtrix/dirorder.py +347 -0
- niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
- niwrap_mrtrix/mrtrix/dirstat.py +530 -0
- niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
- niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
- niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
- niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
- niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
- niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
- niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
- niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
- niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
- niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
- niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
- niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
- niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
- niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
- niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
- niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
- niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
- niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
- niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
- niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
- niwrap_mrtrix/mrtrix/label2colour.py +351 -0
- niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
- niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
- niwrap_mrtrix/mrtrix/labelstats.py +344 -0
- niwrap_mrtrix/mrtrix/maskdump.py +336 -0
- niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
- niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
- niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
- niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
- niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
- niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
- niwrap_mrtrix/mrtrix/mrcat.py +382 -0
- niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
- niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
- niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
- niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
- niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
- niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
- niwrap_mrtrix/mrtrix/mrdump.py +351 -0
- niwrap_mrtrix/mrtrix/mredit.py +546 -0
- niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
- niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
- niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
- niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
- niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
- niwrap_mrtrix/mrtrix/mrmath.py +413 -0
- niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
- niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
- niwrap_mrtrix/mrtrix/mrstats.py +427 -0
- niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
- niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
- niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
- niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
- niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
- niwrap_mrtrix/mrtrix/responsemean.py +316 -0
- niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
- niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
- niwrap_mrtrix/mrtrix/sh2power.py +353 -0
- niwrap_mrtrix/mrtrix/sh2response.py +394 -0
- niwrap_mrtrix/mrtrix/shbasis.py +373 -0
- niwrap_mrtrix/mrtrix/shconv.py +498 -0
- niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
- niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
- niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
- niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
- niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
- niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
- niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
- niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
- niwrap_mrtrix/mrtrix/tckmap.py +772 -0
- niwrap_mrtrix/mrtrix/tckresample.py +580 -0
- niwrap_mrtrix/mrtrix/tcksample.py +404 -0
- niwrap_mrtrix/mrtrix/tcksift.py +592 -0
- niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
- niwrap_mrtrix/mrtrix/tckstats.py +441 -0
- niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
- niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
- niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
- niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
- niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
- niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
- niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
- niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
- niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
- niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
- niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
- niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
- niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
- niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
- niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
- niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
- niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
- niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
- niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
- niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
- niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
- niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
- niwrap_mrtrix/mrtrix/warpinit.py +356 -0
- niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
- niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
- niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
- niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,404 @@
|
|
|
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
|
+
TCKSAMPLE_METADATA = Metadata(
|
|
9
|
+
id="0fd3b8818e87fff260e091a14a0639a496a49125.boutiques",
|
|
10
|
+
name="tcksample",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
TcksampleConfigParameters = typing.TypedDict('TcksampleConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
TcksampleParameters = typing.TypedDict('TcksampleParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["tcksample"],
|
|
25
|
+
"stat_tck": typing.NotRequired[str | None],
|
|
26
|
+
"nointerp": bool,
|
|
27
|
+
"precise": bool,
|
|
28
|
+
"use_tdi_fraction": bool,
|
|
29
|
+
"info": bool,
|
|
30
|
+
"quiet": bool,
|
|
31
|
+
"debug": bool,
|
|
32
|
+
"force": bool,
|
|
33
|
+
"nthreads": typing.NotRequired[int | None],
|
|
34
|
+
"config": typing.NotRequired[list[TcksampleConfigParameters] | None],
|
|
35
|
+
"help": bool,
|
|
36
|
+
"version": bool,
|
|
37
|
+
"tracks": InputPathType,
|
|
38
|
+
"image": InputPathType,
|
|
39
|
+
"values": str,
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def dyn_cargs(
|
|
44
|
+
t: str,
|
|
45
|
+
) -> typing.Any:
|
|
46
|
+
"""
|
|
47
|
+
Get build cargs function by command type.
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
t: Command type.
|
|
51
|
+
Returns:
|
|
52
|
+
Build cargs function.
|
|
53
|
+
"""
|
|
54
|
+
return {
|
|
55
|
+
"tcksample": tcksample_cargs,
|
|
56
|
+
"config": tcksample_config_cargs,
|
|
57
|
+
}.get(t)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def dyn_outputs(
|
|
61
|
+
t: str,
|
|
62
|
+
) -> typing.Any:
|
|
63
|
+
"""
|
|
64
|
+
Get build outputs function by command type.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
t: Command type.
|
|
68
|
+
Returns:
|
|
69
|
+
Build outputs function.
|
|
70
|
+
"""
|
|
71
|
+
return {
|
|
72
|
+
"tcksample": tcksample_outputs,
|
|
73
|
+
}.get(t)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def tcksample_config_params(
|
|
77
|
+
key: str,
|
|
78
|
+
value: str,
|
|
79
|
+
) -> TcksampleConfigParameters:
|
|
80
|
+
"""
|
|
81
|
+
Build parameters.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
85
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
86
|
+
Returns:
|
|
87
|
+
Parameter dictionary
|
|
88
|
+
"""
|
|
89
|
+
params = {
|
|
90
|
+
"__STYXTYPE__": "config",
|
|
91
|
+
"key": key,
|
|
92
|
+
"value": value,
|
|
93
|
+
}
|
|
94
|
+
return params
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def tcksample_config_cargs(
|
|
98
|
+
params: TcksampleConfigParameters,
|
|
99
|
+
execution: Execution,
|
|
100
|
+
) -> list[str]:
|
|
101
|
+
"""
|
|
102
|
+
Build command-line arguments from parameters.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
params: The parameters.
|
|
106
|
+
execution: The execution object for resolving input paths.
|
|
107
|
+
Returns:
|
|
108
|
+
Command-line arguments.
|
|
109
|
+
"""
|
|
110
|
+
cargs = []
|
|
111
|
+
cargs.append("-config")
|
|
112
|
+
cargs.append(params.get("key"))
|
|
113
|
+
cargs.append(params.get("value"))
|
|
114
|
+
return cargs
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class TcksampleOutputs(typing.NamedTuple):
|
|
118
|
+
"""
|
|
119
|
+
Output object returned when calling `tcksample(...)`.
|
|
120
|
+
"""
|
|
121
|
+
root: OutputPathType
|
|
122
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
123
|
+
values_: OutputPathType
|
|
124
|
+
"""the output sampled values"""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def tcksample_params(
|
|
128
|
+
tracks: InputPathType,
|
|
129
|
+
image: InputPathType,
|
|
130
|
+
values_: str,
|
|
131
|
+
stat_tck: str | None = None,
|
|
132
|
+
nointerp: bool = False,
|
|
133
|
+
precise: bool = False,
|
|
134
|
+
use_tdi_fraction: bool = False,
|
|
135
|
+
info: bool = False,
|
|
136
|
+
quiet: bool = False,
|
|
137
|
+
debug: bool = False,
|
|
138
|
+
force: bool = False,
|
|
139
|
+
nthreads: int | None = None,
|
|
140
|
+
config: list[TcksampleConfigParameters] | None = None,
|
|
141
|
+
help_: bool = False,
|
|
142
|
+
version: bool = False,
|
|
143
|
+
) -> TcksampleParameters:
|
|
144
|
+
"""
|
|
145
|
+
Build parameters.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
tracks: the input track file.
|
|
149
|
+
image: the image to be sampled.
|
|
150
|
+
values_: the output sampled values.
|
|
151
|
+
stat_tck: compute some statistic from the values along each streamline\
|
|
152
|
+
(options are: mean,median,min,max).
|
|
153
|
+
nointerp: do not use trilinear interpolation when sampling image values.
|
|
154
|
+
precise: use the precise mechanism for mapping streamlines to voxels\
|
|
155
|
+
(obviates the need for trilinear interpolation) (only applicable if\
|
|
156
|
+
some per-streamline statistic is requested).
|
|
157
|
+
use_tdi_fraction: each streamline is assigned a fraction of the image\
|
|
158
|
+
intensity in each voxel based on the fraction of the track density\
|
|
159
|
+
contributed by that streamline (this is only appropriate for processing\
|
|
160
|
+
a whole-brain tractogram, and images for which the quantiative\
|
|
161
|
+
parameter is additive).
|
|
162
|
+
info: display information messages.
|
|
163
|
+
quiet: do not display information messages or progress status;\
|
|
164
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
165
|
+
environment variable to a non-empty string.
|
|
166
|
+
debug: display debugging messages.
|
|
167
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
168
|
+
input and output might cause unexpected behaviour).
|
|
169
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
170
|
+
(set to 0 to disable multi-threading).
|
|
171
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
172
|
+
help_: display this information page and exit.
|
|
173
|
+
version: display version information and exit.
|
|
174
|
+
Returns:
|
|
175
|
+
Parameter dictionary
|
|
176
|
+
"""
|
|
177
|
+
params = {
|
|
178
|
+
"__STYXTYPE__": "tcksample",
|
|
179
|
+
"nointerp": nointerp,
|
|
180
|
+
"precise": precise,
|
|
181
|
+
"use_tdi_fraction": use_tdi_fraction,
|
|
182
|
+
"info": info,
|
|
183
|
+
"quiet": quiet,
|
|
184
|
+
"debug": debug,
|
|
185
|
+
"force": force,
|
|
186
|
+
"help": help_,
|
|
187
|
+
"version": version,
|
|
188
|
+
"tracks": tracks,
|
|
189
|
+
"image": image,
|
|
190
|
+
"values": values_,
|
|
191
|
+
}
|
|
192
|
+
if stat_tck is not None:
|
|
193
|
+
params["stat_tck"] = stat_tck
|
|
194
|
+
if nthreads is not None:
|
|
195
|
+
params["nthreads"] = nthreads
|
|
196
|
+
if config is not None:
|
|
197
|
+
params["config"] = config
|
|
198
|
+
return params
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def tcksample_cargs(
|
|
202
|
+
params: TcksampleParameters,
|
|
203
|
+
execution: Execution,
|
|
204
|
+
) -> list[str]:
|
|
205
|
+
"""
|
|
206
|
+
Build command-line arguments from parameters.
|
|
207
|
+
|
|
208
|
+
Args:
|
|
209
|
+
params: The parameters.
|
|
210
|
+
execution: The execution object for resolving input paths.
|
|
211
|
+
Returns:
|
|
212
|
+
Command-line arguments.
|
|
213
|
+
"""
|
|
214
|
+
cargs = []
|
|
215
|
+
cargs.append("tcksample")
|
|
216
|
+
if params.get("stat_tck") is not None:
|
|
217
|
+
cargs.extend([
|
|
218
|
+
"-stat_tck",
|
|
219
|
+
params.get("stat_tck")
|
|
220
|
+
])
|
|
221
|
+
if params.get("nointerp"):
|
|
222
|
+
cargs.append("-nointerp")
|
|
223
|
+
if params.get("precise"):
|
|
224
|
+
cargs.append("-precise")
|
|
225
|
+
if params.get("use_tdi_fraction"):
|
|
226
|
+
cargs.append("-use_tdi_fraction")
|
|
227
|
+
if params.get("info"):
|
|
228
|
+
cargs.append("-info")
|
|
229
|
+
if params.get("quiet"):
|
|
230
|
+
cargs.append("-quiet")
|
|
231
|
+
if params.get("debug"):
|
|
232
|
+
cargs.append("-debug")
|
|
233
|
+
if params.get("force"):
|
|
234
|
+
cargs.append("-force")
|
|
235
|
+
if params.get("nthreads") is not None:
|
|
236
|
+
cargs.extend([
|
|
237
|
+
"-nthreads",
|
|
238
|
+
str(params.get("nthreads"))
|
|
239
|
+
])
|
|
240
|
+
if params.get("config") is not None:
|
|
241
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
242
|
+
if params.get("help"):
|
|
243
|
+
cargs.append("-help")
|
|
244
|
+
if params.get("version"):
|
|
245
|
+
cargs.append("-version")
|
|
246
|
+
cargs.append(execution.input_file(params.get("tracks")))
|
|
247
|
+
cargs.append(execution.input_file(params.get("image")))
|
|
248
|
+
cargs.append(params.get("values"))
|
|
249
|
+
return cargs
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def tcksample_outputs(
|
|
253
|
+
params: TcksampleParameters,
|
|
254
|
+
execution: Execution,
|
|
255
|
+
) -> TcksampleOutputs:
|
|
256
|
+
"""
|
|
257
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
258
|
+
|
|
259
|
+
Args:
|
|
260
|
+
params: The parameters.
|
|
261
|
+
execution: The execution object for resolving input paths.
|
|
262
|
+
Returns:
|
|
263
|
+
Outputs object.
|
|
264
|
+
"""
|
|
265
|
+
ret = TcksampleOutputs(
|
|
266
|
+
root=execution.output_file("."),
|
|
267
|
+
values_=execution.output_file(params.get("values")),
|
|
268
|
+
)
|
|
269
|
+
return ret
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def tcksample_execute(
|
|
273
|
+
params: TcksampleParameters,
|
|
274
|
+
execution: Execution,
|
|
275
|
+
) -> TcksampleOutputs:
|
|
276
|
+
"""
|
|
277
|
+
Sample values of an associated image along tracks.
|
|
278
|
+
|
|
279
|
+
By default, the value of the underlying image at each point along the track
|
|
280
|
+
is written to either an ASCII file (with all values for each track on the
|
|
281
|
+
same line), or a track scalar file (.tsf). Alternatively, some statistic can
|
|
282
|
+
be taken from the values along each streamline and written to a vector file.
|
|
283
|
+
|
|
284
|
+
References:
|
|
285
|
+
|
|
286
|
+
* If using -precise option: Smith, R. E.; Tournier, J.-D.; Calamante, F. &
|
|
287
|
+
Connelly, A. SIFT: Spherical-deconvolution informed filtering of
|
|
288
|
+
tractograms. NeuroImage, 2013, 67, 298-312.
|
|
289
|
+
|
|
290
|
+
Author: MRTrix3 Developers
|
|
291
|
+
|
|
292
|
+
URL: https://www.mrtrix.org/
|
|
293
|
+
|
|
294
|
+
Args:
|
|
295
|
+
params: The parameters.
|
|
296
|
+
execution: The execution object.
|
|
297
|
+
Returns:
|
|
298
|
+
NamedTuple of outputs (described in `TcksampleOutputs`).
|
|
299
|
+
"""
|
|
300
|
+
params = execution.params(params)
|
|
301
|
+
cargs = tcksample_cargs(params, execution)
|
|
302
|
+
ret = tcksample_outputs(params, execution)
|
|
303
|
+
execution.run(cargs)
|
|
304
|
+
return ret
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
def tcksample(
|
|
308
|
+
tracks: InputPathType,
|
|
309
|
+
image: InputPathType,
|
|
310
|
+
values_: str,
|
|
311
|
+
stat_tck: str | None = None,
|
|
312
|
+
nointerp: bool = False,
|
|
313
|
+
precise: bool = False,
|
|
314
|
+
use_tdi_fraction: bool = False,
|
|
315
|
+
info: bool = False,
|
|
316
|
+
quiet: bool = False,
|
|
317
|
+
debug: bool = False,
|
|
318
|
+
force: bool = False,
|
|
319
|
+
nthreads: int | None = None,
|
|
320
|
+
config: list[TcksampleConfigParameters] | None = None,
|
|
321
|
+
help_: bool = False,
|
|
322
|
+
version: bool = False,
|
|
323
|
+
runner: Runner | None = None,
|
|
324
|
+
) -> TcksampleOutputs:
|
|
325
|
+
"""
|
|
326
|
+
Sample values of an associated image along tracks.
|
|
327
|
+
|
|
328
|
+
By default, the value of the underlying image at each point along the track
|
|
329
|
+
is written to either an ASCII file (with all values for each track on the
|
|
330
|
+
same line), or a track scalar file (.tsf). Alternatively, some statistic can
|
|
331
|
+
be taken from the values along each streamline and written to a vector file.
|
|
332
|
+
|
|
333
|
+
References:
|
|
334
|
+
|
|
335
|
+
* If using -precise option: Smith, R. E.; Tournier, J.-D.; Calamante, F. &
|
|
336
|
+
Connelly, A. SIFT: Spherical-deconvolution informed filtering of
|
|
337
|
+
tractograms. NeuroImage, 2013, 67, 298-312.
|
|
338
|
+
|
|
339
|
+
Author: MRTrix3 Developers
|
|
340
|
+
|
|
341
|
+
URL: https://www.mrtrix.org/
|
|
342
|
+
|
|
343
|
+
Args:
|
|
344
|
+
tracks: the input track file.
|
|
345
|
+
image: the image to be sampled.
|
|
346
|
+
values_: the output sampled values.
|
|
347
|
+
stat_tck: compute some statistic from the values along each streamline\
|
|
348
|
+
(options are: mean,median,min,max).
|
|
349
|
+
nointerp: do not use trilinear interpolation when sampling image values.
|
|
350
|
+
precise: use the precise mechanism for mapping streamlines to voxels\
|
|
351
|
+
(obviates the need for trilinear interpolation) (only applicable if\
|
|
352
|
+
some per-streamline statistic is requested).
|
|
353
|
+
use_tdi_fraction: each streamline is assigned a fraction of the image\
|
|
354
|
+
intensity in each voxel based on the fraction of the track density\
|
|
355
|
+
contributed by that streamline (this is only appropriate for processing\
|
|
356
|
+
a whole-brain tractogram, and images for which the quantiative\
|
|
357
|
+
parameter is additive).
|
|
358
|
+
info: display information messages.
|
|
359
|
+
quiet: do not display information messages or progress status;\
|
|
360
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
361
|
+
environment variable to a non-empty string.
|
|
362
|
+
debug: display debugging messages.
|
|
363
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
364
|
+
input and output might cause unexpected behaviour).
|
|
365
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
366
|
+
(set to 0 to disable multi-threading).
|
|
367
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
368
|
+
help_: display this information page and exit.
|
|
369
|
+
version: display version information and exit.
|
|
370
|
+
runner: Command runner.
|
|
371
|
+
Returns:
|
|
372
|
+
NamedTuple of outputs (described in `TcksampleOutputs`).
|
|
373
|
+
"""
|
|
374
|
+
runner = runner or get_global_runner()
|
|
375
|
+
execution = runner.start_execution(TCKSAMPLE_METADATA)
|
|
376
|
+
params = tcksample_params(
|
|
377
|
+
stat_tck=stat_tck,
|
|
378
|
+
nointerp=nointerp,
|
|
379
|
+
precise=precise,
|
|
380
|
+
use_tdi_fraction=use_tdi_fraction,
|
|
381
|
+
info=info,
|
|
382
|
+
quiet=quiet,
|
|
383
|
+
debug=debug,
|
|
384
|
+
force=force,
|
|
385
|
+
nthreads=nthreads,
|
|
386
|
+
config=config,
|
|
387
|
+
help_=help_,
|
|
388
|
+
version=version,
|
|
389
|
+
tracks=tracks,
|
|
390
|
+
image=image,
|
|
391
|
+
values_=values_,
|
|
392
|
+
)
|
|
393
|
+
return tcksample_execute(params, execution)
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
__all__ = [
|
|
397
|
+
"TCKSAMPLE_METADATA",
|
|
398
|
+
"TcksampleConfigParameters",
|
|
399
|
+
"TcksampleOutputs",
|
|
400
|
+
"TcksampleParameters",
|
|
401
|
+
"tcksample",
|
|
402
|
+
"tcksample_config_params",
|
|
403
|
+
"tcksample_params",
|
|
404
|
+
]
|