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,465 @@
|
|
|
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
|
+
TRANSFORMCOMPOSE_METADATA = Metadata(
|
|
9
|
+
id="8e378625408e1058e736b1bc94ac29bb3d2555e8.boutiques",
|
|
10
|
+
name="transformcompose",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
TransformcomposeConfigParameters = typing.TypedDict('TransformcomposeConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
TransformcomposeVariousStringParameters = typing.TypedDict('TransformcomposeVariousStringParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["VariousString"],
|
|
25
|
+
"obj": str,
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
TransformcomposeVariousFileParameters = typing.TypedDict('TransformcomposeVariousFileParameters', {
|
|
30
|
+
"__STYX_TYPE__": typing.Literal["VariousFile"],
|
|
31
|
+
"obj": InputPathType,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
TransformcomposeParameters = typing.TypedDict('TransformcomposeParameters', {
|
|
36
|
+
"__STYX_TYPE__": typing.Literal["transformcompose"],
|
|
37
|
+
"template": typing.NotRequired[InputPathType | None],
|
|
38
|
+
"info": bool,
|
|
39
|
+
"quiet": bool,
|
|
40
|
+
"debug": bool,
|
|
41
|
+
"force": bool,
|
|
42
|
+
"nthreads": typing.NotRequired[int | None],
|
|
43
|
+
"config": typing.NotRequired[list[TransformcomposeConfigParameters] | None],
|
|
44
|
+
"help": bool,
|
|
45
|
+
"version": bool,
|
|
46
|
+
"input": list[InputPathType],
|
|
47
|
+
"output": typing.Union[TransformcomposeVariousStringParameters, TransformcomposeVariousFileParameters],
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def dyn_cargs(
|
|
52
|
+
t: str,
|
|
53
|
+
) -> typing.Any:
|
|
54
|
+
"""
|
|
55
|
+
Get build cargs function by command type.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
t: Command type.
|
|
59
|
+
Returns:
|
|
60
|
+
Build cargs function.
|
|
61
|
+
"""
|
|
62
|
+
return {
|
|
63
|
+
"transformcompose": transformcompose_cargs,
|
|
64
|
+
"config": transformcompose_config_cargs,
|
|
65
|
+
"VariousString": transformcompose_various_string_cargs,
|
|
66
|
+
"VariousFile": transformcompose_various_file_cargs,
|
|
67
|
+
}.get(t)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def dyn_outputs(
|
|
71
|
+
t: str,
|
|
72
|
+
) -> typing.Any:
|
|
73
|
+
"""
|
|
74
|
+
Get build outputs function by command type.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
t: Command type.
|
|
78
|
+
Returns:
|
|
79
|
+
Build outputs function.
|
|
80
|
+
"""
|
|
81
|
+
return {
|
|
82
|
+
}.get(t)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def transformcompose_config_params(
|
|
86
|
+
key: str,
|
|
87
|
+
value: str,
|
|
88
|
+
) -> TransformcomposeConfigParameters:
|
|
89
|
+
"""
|
|
90
|
+
Build parameters.
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
94
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
95
|
+
Returns:
|
|
96
|
+
Parameter dictionary
|
|
97
|
+
"""
|
|
98
|
+
params = {
|
|
99
|
+
"__STYXTYPE__": "config",
|
|
100
|
+
"key": key,
|
|
101
|
+
"value": value,
|
|
102
|
+
}
|
|
103
|
+
return params
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def transformcompose_config_cargs(
|
|
107
|
+
params: TransformcomposeConfigParameters,
|
|
108
|
+
execution: Execution,
|
|
109
|
+
) -> list[str]:
|
|
110
|
+
"""
|
|
111
|
+
Build command-line arguments from parameters.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
params: The parameters.
|
|
115
|
+
execution: The execution object for resolving input paths.
|
|
116
|
+
Returns:
|
|
117
|
+
Command-line arguments.
|
|
118
|
+
"""
|
|
119
|
+
cargs = []
|
|
120
|
+
cargs.append("-config")
|
|
121
|
+
cargs.append(params.get("key"))
|
|
122
|
+
cargs.append(params.get("value"))
|
|
123
|
+
return cargs
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def transformcompose_various_string_params(
|
|
127
|
+
obj: str,
|
|
128
|
+
) -> TransformcomposeVariousStringParameters:
|
|
129
|
+
"""
|
|
130
|
+
Build parameters.
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
obj: String object.
|
|
134
|
+
Returns:
|
|
135
|
+
Parameter dictionary
|
|
136
|
+
"""
|
|
137
|
+
params = {
|
|
138
|
+
"__STYXTYPE__": "VariousString",
|
|
139
|
+
"obj": obj,
|
|
140
|
+
}
|
|
141
|
+
return params
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def transformcompose_various_string_cargs(
|
|
145
|
+
params: TransformcomposeVariousStringParameters,
|
|
146
|
+
execution: Execution,
|
|
147
|
+
) -> list[str]:
|
|
148
|
+
"""
|
|
149
|
+
Build command-line arguments from parameters.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
params: The parameters.
|
|
153
|
+
execution: The execution object for resolving input paths.
|
|
154
|
+
Returns:
|
|
155
|
+
Command-line arguments.
|
|
156
|
+
"""
|
|
157
|
+
cargs = []
|
|
158
|
+
cargs.append(params.get("obj"))
|
|
159
|
+
return cargs
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def transformcompose_various_file_params(
|
|
163
|
+
obj: InputPathType,
|
|
164
|
+
) -> TransformcomposeVariousFileParameters:
|
|
165
|
+
"""
|
|
166
|
+
Build parameters.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
obj: File object.
|
|
170
|
+
Returns:
|
|
171
|
+
Parameter dictionary
|
|
172
|
+
"""
|
|
173
|
+
params = {
|
|
174
|
+
"__STYXTYPE__": "VariousFile",
|
|
175
|
+
"obj": obj,
|
|
176
|
+
}
|
|
177
|
+
return params
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def transformcompose_various_file_cargs(
|
|
181
|
+
params: TransformcomposeVariousFileParameters,
|
|
182
|
+
execution: Execution,
|
|
183
|
+
) -> list[str]:
|
|
184
|
+
"""
|
|
185
|
+
Build command-line arguments from parameters.
|
|
186
|
+
|
|
187
|
+
Args:
|
|
188
|
+
params: The parameters.
|
|
189
|
+
execution: The execution object for resolving input paths.
|
|
190
|
+
Returns:
|
|
191
|
+
Command-line arguments.
|
|
192
|
+
"""
|
|
193
|
+
cargs = []
|
|
194
|
+
cargs.append(execution.input_file(params.get("obj")))
|
|
195
|
+
return cargs
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class TransformcomposeOutputs(typing.NamedTuple):
|
|
199
|
+
"""
|
|
200
|
+
Output object returned when calling `transformcompose(...)`.
|
|
201
|
+
"""
|
|
202
|
+
root: OutputPathType
|
|
203
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def transformcompose_params(
|
|
207
|
+
input_: list[InputPathType],
|
|
208
|
+
output: typing.Union[TransformcomposeVariousStringParameters, TransformcomposeVariousFileParameters],
|
|
209
|
+
template: InputPathType | None = None,
|
|
210
|
+
info: bool = False,
|
|
211
|
+
quiet: bool = False,
|
|
212
|
+
debug: bool = False,
|
|
213
|
+
force: bool = False,
|
|
214
|
+
nthreads: int | None = None,
|
|
215
|
+
config: list[TransformcomposeConfigParameters] | None = None,
|
|
216
|
+
help_: bool = False,
|
|
217
|
+
version: bool = False,
|
|
218
|
+
) -> TransformcomposeParameters:
|
|
219
|
+
"""
|
|
220
|
+
Build parameters.
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
input_: the input transforms (either linear or non-linear warps).
|
|
224
|
+
output: the output file (may be a linear transformation text file, or a\
|
|
225
|
+
deformation warp field image, depending on usage).
|
|
226
|
+
template: define the output grid defined by a template image.
|
|
227
|
+
info: display information messages.
|
|
228
|
+
quiet: do not display information messages or progress status;\
|
|
229
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
230
|
+
environment variable to a non-empty string.
|
|
231
|
+
debug: display debugging messages.
|
|
232
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
233
|
+
input and output might cause unexpected behaviour).
|
|
234
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
235
|
+
(set to 0 to disable multi-threading).
|
|
236
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
237
|
+
help_: display this information page and exit.
|
|
238
|
+
version: display version information and exit.
|
|
239
|
+
Returns:
|
|
240
|
+
Parameter dictionary
|
|
241
|
+
"""
|
|
242
|
+
params = {
|
|
243
|
+
"__STYXTYPE__": "transformcompose",
|
|
244
|
+
"info": info,
|
|
245
|
+
"quiet": quiet,
|
|
246
|
+
"debug": debug,
|
|
247
|
+
"force": force,
|
|
248
|
+
"help": help_,
|
|
249
|
+
"version": version,
|
|
250
|
+
"input": input_,
|
|
251
|
+
"output": output,
|
|
252
|
+
}
|
|
253
|
+
if template is not None:
|
|
254
|
+
params["template"] = template
|
|
255
|
+
if nthreads is not None:
|
|
256
|
+
params["nthreads"] = nthreads
|
|
257
|
+
if config is not None:
|
|
258
|
+
params["config"] = config
|
|
259
|
+
return params
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def transformcompose_cargs(
|
|
263
|
+
params: TransformcomposeParameters,
|
|
264
|
+
execution: Execution,
|
|
265
|
+
) -> list[str]:
|
|
266
|
+
"""
|
|
267
|
+
Build command-line arguments from parameters.
|
|
268
|
+
|
|
269
|
+
Args:
|
|
270
|
+
params: The parameters.
|
|
271
|
+
execution: The execution object for resolving input paths.
|
|
272
|
+
Returns:
|
|
273
|
+
Command-line arguments.
|
|
274
|
+
"""
|
|
275
|
+
cargs = []
|
|
276
|
+
cargs.append("transformcompose")
|
|
277
|
+
if params.get("template") is not None:
|
|
278
|
+
cargs.extend([
|
|
279
|
+
"-template",
|
|
280
|
+
execution.input_file(params.get("template"))
|
|
281
|
+
])
|
|
282
|
+
if params.get("info"):
|
|
283
|
+
cargs.append("-info")
|
|
284
|
+
if params.get("quiet"):
|
|
285
|
+
cargs.append("-quiet")
|
|
286
|
+
if params.get("debug"):
|
|
287
|
+
cargs.append("-debug")
|
|
288
|
+
if params.get("force"):
|
|
289
|
+
cargs.append("-force")
|
|
290
|
+
if params.get("nthreads") is not None:
|
|
291
|
+
cargs.extend([
|
|
292
|
+
"-nthreads",
|
|
293
|
+
str(params.get("nthreads"))
|
|
294
|
+
])
|
|
295
|
+
if params.get("config") is not None:
|
|
296
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
297
|
+
if params.get("help"):
|
|
298
|
+
cargs.append("-help")
|
|
299
|
+
if params.get("version"):
|
|
300
|
+
cargs.append("-version")
|
|
301
|
+
cargs.extend([execution.input_file(f) for f in params.get("input")])
|
|
302
|
+
cargs.extend(dyn_cargs(params.get("output")["__STYXTYPE__"])(params.get("output"), execution))
|
|
303
|
+
return cargs
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
def transformcompose_outputs(
|
|
307
|
+
params: TransformcomposeParameters,
|
|
308
|
+
execution: Execution,
|
|
309
|
+
) -> TransformcomposeOutputs:
|
|
310
|
+
"""
|
|
311
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
312
|
+
|
|
313
|
+
Args:
|
|
314
|
+
params: The parameters.
|
|
315
|
+
execution: The execution object for resolving input paths.
|
|
316
|
+
Returns:
|
|
317
|
+
Outputs object.
|
|
318
|
+
"""
|
|
319
|
+
ret = TransformcomposeOutputs(
|
|
320
|
+
root=execution.output_file("."),
|
|
321
|
+
)
|
|
322
|
+
return ret
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
def transformcompose_execute(
|
|
326
|
+
params: TransformcomposeParameters,
|
|
327
|
+
execution: Execution,
|
|
328
|
+
) -> TransformcomposeOutputs:
|
|
329
|
+
"""
|
|
330
|
+
Compose any number of linear transformations and/or warps into a single
|
|
331
|
+
transformation.
|
|
332
|
+
|
|
333
|
+
Any linear transforms must be supplied as a 4x4 matrix in a text file (e.g.
|
|
334
|
+
as per the output of mrregister). Any warp fields must be supplied as a 4D
|
|
335
|
+
image representing a deformation field (e.g. as output from mrrregister
|
|
336
|
+
-nl_warp).
|
|
337
|
+
|
|
338
|
+
Input transformations should be provided to the command in the order in
|
|
339
|
+
which they would be applied to an image if they were to be applied
|
|
340
|
+
individually.
|
|
341
|
+
|
|
342
|
+
If all input transformations are linear, and the -template option is not
|
|
343
|
+
provided, then the file output by the command will also be a linear
|
|
344
|
+
transformation saved as a 4x4 matrix in a text file. If a template image is
|
|
345
|
+
supplied, then the output will always be a deformation field. If at least
|
|
346
|
+
one of the inputs is a warp field, then the output will be a deformation
|
|
347
|
+
field, which will be defined on the grid of the last input warp image
|
|
348
|
+
supplied if the -template option is not used.
|
|
349
|
+
|
|
350
|
+
References:
|
|
351
|
+
|
|
352
|
+
.
|
|
353
|
+
|
|
354
|
+
Author: MRTrix3 Developers
|
|
355
|
+
|
|
356
|
+
URL: https://www.mrtrix.org/
|
|
357
|
+
|
|
358
|
+
Args:
|
|
359
|
+
params: The parameters.
|
|
360
|
+
execution: The execution object.
|
|
361
|
+
Returns:
|
|
362
|
+
NamedTuple of outputs (described in `TransformcomposeOutputs`).
|
|
363
|
+
"""
|
|
364
|
+
params = execution.params(params)
|
|
365
|
+
cargs = transformcompose_cargs(params, execution)
|
|
366
|
+
ret = transformcompose_outputs(params, execution)
|
|
367
|
+
execution.run(cargs)
|
|
368
|
+
return ret
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
def transformcompose(
|
|
372
|
+
input_: list[InputPathType],
|
|
373
|
+
output: typing.Union[TransformcomposeVariousStringParameters, TransformcomposeVariousFileParameters],
|
|
374
|
+
template: InputPathType | None = None,
|
|
375
|
+
info: bool = False,
|
|
376
|
+
quiet: bool = False,
|
|
377
|
+
debug: bool = False,
|
|
378
|
+
force: bool = False,
|
|
379
|
+
nthreads: int | None = None,
|
|
380
|
+
config: list[TransformcomposeConfigParameters] | None = None,
|
|
381
|
+
help_: bool = False,
|
|
382
|
+
version: bool = False,
|
|
383
|
+
runner: Runner | None = None,
|
|
384
|
+
) -> TransformcomposeOutputs:
|
|
385
|
+
"""
|
|
386
|
+
Compose any number of linear transformations and/or warps into a single
|
|
387
|
+
transformation.
|
|
388
|
+
|
|
389
|
+
Any linear transforms must be supplied as a 4x4 matrix in a text file (e.g.
|
|
390
|
+
as per the output of mrregister). Any warp fields must be supplied as a 4D
|
|
391
|
+
image representing a deformation field (e.g. as output from mrrregister
|
|
392
|
+
-nl_warp).
|
|
393
|
+
|
|
394
|
+
Input transformations should be provided to the command in the order in
|
|
395
|
+
which they would be applied to an image if they were to be applied
|
|
396
|
+
individually.
|
|
397
|
+
|
|
398
|
+
If all input transformations are linear, and the -template option is not
|
|
399
|
+
provided, then the file output by the command will also be a linear
|
|
400
|
+
transformation saved as a 4x4 matrix in a text file. If a template image is
|
|
401
|
+
supplied, then the output will always be a deformation field. If at least
|
|
402
|
+
one of the inputs is a warp field, then the output will be a deformation
|
|
403
|
+
field, which will be defined on the grid of the last input warp image
|
|
404
|
+
supplied if the -template option is not used.
|
|
405
|
+
|
|
406
|
+
References:
|
|
407
|
+
|
|
408
|
+
.
|
|
409
|
+
|
|
410
|
+
Author: MRTrix3 Developers
|
|
411
|
+
|
|
412
|
+
URL: https://www.mrtrix.org/
|
|
413
|
+
|
|
414
|
+
Args:
|
|
415
|
+
input_: the input transforms (either linear or non-linear warps).
|
|
416
|
+
output: the output file (may be a linear transformation text file, or a\
|
|
417
|
+
deformation warp field image, depending on usage).
|
|
418
|
+
template: define the output grid defined by a template image.
|
|
419
|
+
info: display information messages.
|
|
420
|
+
quiet: do not display information messages or progress status;\
|
|
421
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
422
|
+
environment variable to a non-empty string.
|
|
423
|
+
debug: display debugging messages.
|
|
424
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
425
|
+
input and output might cause unexpected behaviour).
|
|
426
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
427
|
+
(set to 0 to disable multi-threading).
|
|
428
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
429
|
+
help_: display this information page and exit.
|
|
430
|
+
version: display version information and exit.
|
|
431
|
+
runner: Command runner.
|
|
432
|
+
Returns:
|
|
433
|
+
NamedTuple of outputs (described in `TransformcomposeOutputs`).
|
|
434
|
+
"""
|
|
435
|
+
runner = runner or get_global_runner()
|
|
436
|
+
execution = runner.start_execution(TRANSFORMCOMPOSE_METADATA)
|
|
437
|
+
params = transformcompose_params(
|
|
438
|
+
template=template,
|
|
439
|
+
info=info,
|
|
440
|
+
quiet=quiet,
|
|
441
|
+
debug=debug,
|
|
442
|
+
force=force,
|
|
443
|
+
nthreads=nthreads,
|
|
444
|
+
config=config,
|
|
445
|
+
help_=help_,
|
|
446
|
+
version=version,
|
|
447
|
+
input_=input_,
|
|
448
|
+
output=output,
|
|
449
|
+
)
|
|
450
|
+
return transformcompose_execute(params, execution)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
__all__ = [
|
|
454
|
+
"TRANSFORMCOMPOSE_METADATA",
|
|
455
|
+
"TransformcomposeConfigParameters",
|
|
456
|
+
"TransformcomposeOutputs",
|
|
457
|
+
"TransformcomposeParameters",
|
|
458
|
+
"TransformcomposeVariousFileParameters",
|
|
459
|
+
"TransformcomposeVariousStringParameters",
|
|
460
|
+
"transformcompose",
|
|
461
|
+
"transformcompose_config_params",
|
|
462
|
+
"transformcompose_params",
|
|
463
|
+
"transformcompose_various_file_params",
|
|
464
|
+
"transformcompose_various_string_params",
|
|
465
|
+
]
|