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,344 @@
|
|
|
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
|
+
MRCENTROID_METADATA = Metadata(
|
|
9
|
+
id="d45d49e8b930b948a798b910b254792bd30544a6.boutiques",
|
|
10
|
+
name="mrcentroid",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
MrcentroidConfigParameters = typing.TypedDict('MrcentroidConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
MrcentroidParameters = typing.TypedDict('MrcentroidParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["mrcentroid"],
|
|
25
|
+
"mask": typing.NotRequired[InputPathType | None],
|
|
26
|
+
"voxelspace": bool,
|
|
27
|
+
"info": bool,
|
|
28
|
+
"quiet": bool,
|
|
29
|
+
"debug": bool,
|
|
30
|
+
"force": bool,
|
|
31
|
+
"nthreads": typing.NotRequired[int | None],
|
|
32
|
+
"config": typing.NotRequired[list[MrcentroidConfigParameters] | None],
|
|
33
|
+
"help": bool,
|
|
34
|
+
"version": bool,
|
|
35
|
+
"input": InputPathType,
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def dyn_cargs(
|
|
40
|
+
t: str,
|
|
41
|
+
) -> typing.Any:
|
|
42
|
+
"""
|
|
43
|
+
Get build cargs function by command type.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
t: Command type.
|
|
47
|
+
Returns:
|
|
48
|
+
Build cargs function.
|
|
49
|
+
"""
|
|
50
|
+
return {
|
|
51
|
+
"mrcentroid": mrcentroid_cargs,
|
|
52
|
+
"config": mrcentroid_config_cargs,
|
|
53
|
+
}.get(t)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def dyn_outputs(
|
|
57
|
+
t: str,
|
|
58
|
+
) -> typing.Any:
|
|
59
|
+
"""
|
|
60
|
+
Get build outputs function by command type.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
t: Command type.
|
|
64
|
+
Returns:
|
|
65
|
+
Build outputs function.
|
|
66
|
+
"""
|
|
67
|
+
return {
|
|
68
|
+
}.get(t)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def mrcentroid_config_params(
|
|
72
|
+
key: str,
|
|
73
|
+
value: str,
|
|
74
|
+
) -> MrcentroidConfigParameters:
|
|
75
|
+
"""
|
|
76
|
+
Build parameters.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
80
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
81
|
+
Returns:
|
|
82
|
+
Parameter dictionary
|
|
83
|
+
"""
|
|
84
|
+
params = {
|
|
85
|
+
"__STYXTYPE__": "config",
|
|
86
|
+
"key": key,
|
|
87
|
+
"value": value,
|
|
88
|
+
}
|
|
89
|
+
return params
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def mrcentroid_config_cargs(
|
|
93
|
+
params: MrcentroidConfigParameters,
|
|
94
|
+
execution: Execution,
|
|
95
|
+
) -> list[str]:
|
|
96
|
+
"""
|
|
97
|
+
Build command-line arguments from parameters.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
params: The parameters.
|
|
101
|
+
execution: The execution object for resolving input paths.
|
|
102
|
+
Returns:
|
|
103
|
+
Command-line arguments.
|
|
104
|
+
"""
|
|
105
|
+
cargs = []
|
|
106
|
+
cargs.append("-config")
|
|
107
|
+
cargs.append(params.get("key"))
|
|
108
|
+
cargs.append(params.get("value"))
|
|
109
|
+
return cargs
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class MrcentroidOutputs(typing.NamedTuple):
|
|
113
|
+
"""
|
|
114
|
+
Output object returned when calling `mrcentroid(...)`.
|
|
115
|
+
"""
|
|
116
|
+
root: OutputPathType
|
|
117
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def mrcentroid_params(
|
|
121
|
+
input_: InputPathType,
|
|
122
|
+
mask: InputPathType | None = None,
|
|
123
|
+
voxelspace: bool = False,
|
|
124
|
+
info: bool = False,
|
|
125
|
+
quiet: bool = False,
|
|
126
|
+
debug: bool = False,
|
|
127
|
+
force: bool = False,
|
|
128
|
+
nthreads: int | None = None,
|
|
129
|
+
config: list[MrcentroidConfigParameters] | None = None,
|
|
130
|
+
help_: bool = False,
|
|
131
|
+
version: bool = False,
|
|
132
|
+
) -> MrcentroidParameters:
|
|
133
|
+
"""
|
|
134
|
+
Build parameters.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
input_: the input image.
|
|
138
|
+
mask: only include voxels within a mask in the calculation.
|
|
139
|
+
voxelspace: report image centre of mass in voxel space rather than\
|
|
140
|
+
scanner space.
|
|
141
|
+
info: display information messages.
|
|
142
|
+
quiet: do not display information messages or progress status;\
|
|
143
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
144
|
+
environment variable to a non-empty string.
|
|
145
|
+
debug: display debugging messages.
|
|
146
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
147
|
+
input and output might cause unexpected behaviour).
|
|
148
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
149
|
+
(set to 0 to disable multi-threading).
|
|
150
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
151
|
+
help_: display this information page and exit.
|
|
152
|
+
version: display version information and exit.
|
|
153
|
+
Returns:
|
|
154
|
+
Parameter dictionary
|
|
155
|
+
"""
|
|
156
|
+
params = {
|
|
157
|
+
"__STYXTYPE__": "mrcentroid",
|
|
158
|
+
"voxelspace": voxelspace,
|
|
159
|
+
"info": info,
|
|
160
|
+
"quiet": quiet,
|
|
161
|
+
"debug": debug,
|
|
162
|
+
"force": force,
|
|
163
|
+
"help": help_,
|
|
164
|
+
"version": version,
|
|
165
|
+
"input": input_,
|
|
166
|
+
}
|
|
167
|
+
if mask is not None:
|
|
168
|
+
params["mask"] = mask
|
|
169
|
+
if nthreads is not None:
|
|
170
|
+
params["nthreads"] = nthreads
|
|
171
|
+
if config is not None:
|
|
172
|
+
params["config"] = config
|
|
173
|
+
return params
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def mrcentroid_cargs(
|
|
177
|
+
params: MrcentroidParameters,
|
|
178
|
+
execution: Execution,
|
|
179
|
+
) -> list[str]:
|
|
180
|
+
"""
|
|
181
|
+
Build command-line arguments from parameters.
|
|
182
|
+
|
|
183
|
+
Args:
|
|
184
|
+
params: The parameters.
|
|
185
|
+
execution: The execution object for resolving input paths.
|
|
186
|
+
Returns:
|
|
187
|
+
Command-line arguments.
|
|
188
|
+
"""
|
|
189
|
+
cargs = []
|
|
190
|
+
cargs.append("mrcentroid")
|
|
191
|
+
if params.get("mask") is not None:
|
|
192
|
+
cargs.extend([
|
|
193
|
+
"-mask",
|
|
194
|
+
execution.input_file(params.get("mask"))
|
|
195
|
+
])
|
|
196
|
+
if params.get("voxelspace"):
|
|
197
|
+
cargs.append("-voxelspace")
|
|
198
|
+
if params.get("info"):
|
|
199
|
+
cargs.append("-info")
|
|
200
|
+
if params.get("quiet"):
|
|
201
|
+
cargs.append("-quiet")
|
|
202
|
+
if params.get("debug"):
|
|
203
|
+
cargs.append("-debug")
|
|
204
|
+
if params.get("force"):
|
|
205
|
+
cargs.append("-force")
|
|
206
|
+
if params.get("nthreads") is not None:
|
|
207
|
+
cargs.extend([
|
|
208
|
+
"-nthreads",
|
|
209
|
+
str(params.get("nthreads"))
|
|
210
|
+
])
|
|
211
|
+
if params.get("config") is not None:
|
|
212
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
213
|
+
if params.get("help"):
|
|
214
|
+
cargs.append("-help")
|
|
215
|
+
if params.get("version"):
|
|
216
|
+
cargs.append("-version")
|
|
217
|
+
cargs.append(execution.input_file(params.get("input")))
|
|
218
|
+
return cargs
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def mrcentroid_outputs(
|
|
222
|
+
params: MrcentroidParameters,
|
|
223
|
+
execution: Execution,
|
|
224
|
+
) -> MrcentroidOutputs:
|
|
225
|
+
"""
|
|
226
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
227
|
+
|
|
228
|
+
Args:
|
|
229
|
+
params: The parameters.
|
|
230
|
+
execution: The execution object for resolving input paths.
|
|
231
|
+
Returns:
|
|
232
|
+
Outputs object.
|
|
233
|
+
"""
|
|
234
|
+
ret = MrcentroidOutputs(
|
|
235
|
+
root=execution.output_file("."),
|
|
236
|
+
)
|
|
237
|
+
return ret
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def mrcentroid_execute(
|
|
241
|
+
params: MrcentroidParameters,
|
|
242
|
+
execution: Execution,
|
|
243
|
+
) -> MrcentroidOutputs:
|
|
244
|
+
"""
|
|
245
|
+
Determine the centre of mass / centre of gravity of an image.
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
References:
|
|
250
|
+
|
|
251
|
+
.
|
|
252
|
+
|
|
253
|
+
Author: MRTrix3 Developers
|
|
254
|
+
|
|
255
|
+
URL: https://www.mrtrix.org/
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
params: The parameters.
|
|
259
|
+
execution: The execution object.
|
|
260
|
+
Returns:
|
|
261
|
+
NamedTuple of outputs (described in `MrcentroidOutputs`).
|
|
262
|
+
"""
|
|
263
|
+
params = execution.params(params)
|
|
264
|
+
cargs = mrcentroid_cargs(params, execution)
|
|
265
|
+
ret = mrcentroid_outputs(params, execution)
|
|
266
|
+
execution.run(cargs)
|
|
267
|
+
return ret
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def mrcentroid(
|
|
271
|
+
input_: InputPathType,
|
|
272
|
+
mask: InputPathType | None = None,
|
|
273
|
+
voxelspace: bool = False,
|
|
274
|
+
info: bool = False,
|
|
275
|
+
quiet: bool = False,
|
|
276
|
+
debug: bool = False,
|
|
277
|
+
force: bool = False,
|
|
278
|
+
nthreads: int | None = None,
|
|
279
|
+
config: list[MrcentroidConfigParameters] | None = None,
|
|
280
|
+
help_: bool = False,
|
|
281
|
+
version: bool = False,
|
|
282
|
+
runner: Runner | None = None,
|
|
283
|
+
) -> MrcentroidOutputs:
|
|
284
|
+
"""
|
|
285
|
+
Determine the centre of mass / centre of gravity of an image.
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
References:
|
|
290
|
+
|
|
291
|
+
.
|
|
292
|
+
|
|
293
|
+
Author: MRTrix3 Developers
|
|
294
|
+
|
|
295
|
+
URL: https://www.mrtrix.org/
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
input_: the input image.
|
|
299
|
+
mask: only include voxels within a mask in the calculation.
|
|
300
|
+
voxelspace: report image centre of mass in voxel space rather than\
|
|
301
|
+
scanner space.
|
|
302
|
+
info: display information messages.
|
|
303
|
+
quiet: do not display information messages or progress status;\
|
|
304
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
305
|
+
environment variable to a non-empty string.
|
|
306
|
+
debug: display debugging messages.
|
|
307
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
308
|
+
input and output might cause unexpected behaviour).
|
|
309
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
310
|
+
(set to 0 to disable multi-threading).
|
|
311
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
312
|
+
help_: display this information page and exit.
|
|
313
|
+
version: display version information and exit.
|
|
314
|
+
runner: Command runner.
|
|
315
|
+
Returns:
|
|
316
|
+
NamedTuple of outputs (described in `MrcentroidOutputs`).
|
|
317
|
+
"""
|
|
318
|
+
runner = runner or get_global_runner()
|
|
319
|
+
execution = runner.start_execution(MRCENTROID_METADATA)
|
|
320
|
+
params = mrcentroid_params(
|
|
321
|
+
mask=mask,
|
|
322
|
+
voxelspace=voxelspace,
|
|
323
|
+
info=info,
|
|
324
|
+
quiet=quiet,
|
|
325
|
+
debug=debug,
|
|
326
|
+
force=force,
|
|
327
|
+
nthreads=nthreads,
|
|
328
|
+
config=config,
|
|
329
|
+
help_=help_,
|
|
330
|
+
version=version,
|
|
331
|
+
input_=input_,
|
|
332
|
+
)
|
|
333
|
+
return mrcentroid_execute(params, execution)
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
__all__ = [
|
|
337
|
+
"MRCENTROID_METADATA",
|
|
338
|
+
"MrcentroidConfigParameters",
|
|
339
|
+
"MrcentroidOutputs",
|
|
340
|
+
"MrcentroidParameters",
|
|
341
|
+
"mrcentroid",
|
|
342
|
+
"mrcentroid_config_params",
|
|
343
|
+
"mrcentroid_params",
|
|
344
|
+
]
|
|
@@ -0,0 +1,363 @@
|
|
|
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
|
+
MRCHECKERBOARDMASK_METADATA = Metadata(
|
|
9
|
+
id="d3e361c565ddae09545311ba3dafc739a0f94a5f.boutiques",
|
|
10
|
+
name="mrcheckerboardmask",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
MrcheckerboardmaskConfigParameters = typing.TypedDict('MrcheckerboardmaskConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
MrcheckerboardmaskParameters = typing.TypedDict('MrcheckerboardmaskParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["mrcheckerboardmask"],
|
|
25
|
+
"tiles": typing.NotRequired[int | None],
|
|
26
|
+
"invert": bool,
|
|
27
|
+
"nan": bool,
|
|
28
|
+
"info": bool,
|
|
29
|
+
"quiet": bool,
|
|
30
|
+
"debug": bool,
|
|
31
|
+
"force": bool,
|
|
32
|
+
"nthreads": typing.NotRequired[int | None],
|
|
33
|
+
"config": typing.NotRequired[list[MrcheckerboardmaskConfigParameters] | None],
|
|
34
|
+
"help": bool,
|
|
35
|
+
"version": bool,
|
|
36
|
+
"input": InputPathType,
|
|
37
|
+
"output": str,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def dyn_cargs(
|
|
42
|
+
t: str,
|
|
43
|
+
) -> typing.Any:
|
|
44
|
+
"""
|
|
45
|
+
Get build cargs function by command type.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
t: Command type.
|
|
49
|
+
Returns:
|
|
50
|
+
Build cargs function.
|
|
51
|
+
"""
|
|
52
|
+
return {
|
|
53
|
+
"mrcheckerboardmask": mrcheckerboardmask_cargs,
|
|
54
|
+
"config": mrcheckerboardmask_config_cargs,
|
|
55
|
+
}.get(t)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def dyn_outputs(
|
|
59
|
+
t: str,
|
|
60
|
+
) -> typing.Any:
|
|
61
|
+
"""
|
|
62
|
+
Get build outputs function by command type.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
t: Command type.
|
|
66
|
+
Returns:
|
|
67
|
+
Build outputs function.
|
|
68
|
+
"""
|
|
69
|
+
return {
|
|
70
|
+
"mrcheckerboardmask": mrcheckerboardmask_outputs,
|
|
71
|
+
}.get(t)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def mrcheckerboardmask_config_params(
|
|
75
|
+
key: str,
|
|
76
|
+
value: str,
|
|
77
|
+
) -> MrcheckerboardmaskConfigParameters:
|
|
78
|
+
"""
|
|
79
|
+
Build parameters.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
83
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
84
|
+
Returns:
|
|
85
|
+
Parameter dictionary
|
|
86
|
+
"""
|
|
87
|
+
params = {
|
|
88
|
+
"__STYXTYPE__": "config",
|
|
89
|
+
"key": key,
|
|
90
|
+
"value": value,
|
|
91
|
+
}
|
|
92
|
+
return params
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def mrcheckerboardmask_config_cargs(
|
|
96
|
+
params: MrcheckerboardmaskConfigParameters,
|
|
97
|
+
execution: Execution,
|
|
98
|
+
) -> list[str]:
|
|
99
|
+
"""
|
|
100
|
+
Build command-line arguments from parameters.
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
params: The parameters.
|
|
104
|
+
execution: The execution object for resolving input paths.
|
|
105
|
+
Returns:
|
|
106
|
+
Command-line arguments.
|
|
107
|
+
"""
|
|
108
|
+
cargs = []
|
|
109
|
+
cargs.append("-config")
|
|
110
|
+
cargs.append(params.get("key"))
|
|
111
|
+
cargs.append(params.get("value"))
|
|
112
|
+
return cargs
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class MrcheckerboardmaskOutputs(typing.NamedTuple):
|
|
116
|
+
"""
|
|
117
|
+
Output object returned when calling `mrcheckerboardmask(...)`.
|
|
118
|
+
"""
|
|
119
|
+
root: OutputPathType
|
|
120
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
121
|
+
output: OutputPathType
|
|
122
|
+
"""the output binary image mask."""
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def mrcheckerboardmask_params(
|
|
126
|
+
input_: InputPathType,
|
|
127
|
+
output: str,
|
|
128
|
+
tiles: int | None = None,
|
|
129
|
+
invert: bool = False,
|
|
130
|
+
nan: bool = False,
|
|
131
|
+
info: bool = False,
|
|
132
|
+
quiet: bool = False,
|
|
133
|
+
debug: bool = False,
|
|
134
|
+
force: bool = False,
|
|
135
|
+
nthreads: int | None = None,
|
|
136
|
+
config: list[MrcheckerboardmaskConfigParameters] | None = None,
|
|
137
|
+
help_: bool = False,
|
|
138
|
+
version: bool = False,
|
|
139
|
+
) -> MrcheckerboardmaskParameters:
|
|
140
|
+
"""
|
|
141
|
+
Build parameters.
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
input_: the input image to be used as a template.
|
|
145
|
+
output: the output binary image mask.
|
|
146
|
+
tiles: specify the number of tiles in any direction.
|
|
147
|
+
invert: invert output binary mask.
|
|
148
|
+
nan: use NaN as the output zero value.
|
|
149
|
+
info: display information messages.
|
|
150
|
+
quiet: do not display information messages or progress status;\
|
|
151
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
152
|
+
environment variable to a non-empty string.
|
|
153
|
+
debug: display debugging messages.
|
|
154
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
155
|
+
input and output might cause unexpected behaviour).
|
|
156
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
157
|
+
(set to 0 to disable multi-threading).
|
|
158
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
159
|
+
help_: display this information page and exit.
|
|
160
|
+
version: display version information and exit.
|
|
161
|
+
Returns:
|
|
162
|
+
Parameter dictionary
|
|
163
|
+
"""
|
|
164
|
+
params = {
|
|
165
|
+
"__STYXTYPE__": "mrcheckerboardmask",
|
|
166
|
+
"invert": invert,
|
|
167
|
+
"nan": nan,
|
|
168
|
+
"info": info,
|
|
169
|
+
"quiet": quiet,
|
|
170
|
+
"debug": debug,
|
|
171
|
+
"force": force,
|
|
172
|
+
"help": help_,
|
|
173
|
+
"version": version,
|
|
174
|
+
"input": input_,
|
|
175
|
+
"output": output,
|
|
176
|
+
}
|
|
177
|
+
if tiles is not None:
|
|
178
|
+
params["tiles"] = tiles
|
|
179
|
+
if nthreads is not None:
|
|
180
|
+
params["nthreads"] = nthreads
|
|
181
|
+
if config is not None:
|
|
182
|
+
params["config"] = config
|
|
183
|
+
return params
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def mrcheckerboardmask_cargs(
|
|
187
|
+
params: MrcheckerboardmaskParameters,
|
|
188
|
+
execution: Execution,
|
|
189
|
+
) -> list[str]:
|
|
190
|
+
"""
|
|
191
|
+
Build command-line arguments from parameters.
|
|
192
|
+
|
|
193
|
+
Args:
|
|
194
|
+
params: The parameters.
|
|
195
|
+
execution: The execution object for resolving input paths.
|
|
196
|
+
Returns:
|
|
197
|
+
Command-line arguments.
|
|
198
|
+
"""
|
|
199
|
+
cargs = []
|
|
200
|
+
cargs.append("mrcheckerboardmask")
|
|
201
|
+
if params.get("tiles") is not None:
|
|
202
|
+
cargs.extend([
|
|
203
|
+
"-tiles",
|
|
204
|
+
str(params.get("tiles"))
|
|
205
|
+
])
|
|
206
|
+
if params.get("invert"):
|
|
207
|
+
cargs.append("-invert")
|
|
208
|
+
if params.get("nan"):
|
|
209
|
+
cargs.append("-nan")
|
|
210
|
+
if params.get("info"):
|
|
211
|
+
cargs.append("-info")
|
|
212
|
+
if params.get("quiet"):
|
|
213
|
+
cargs.append("-quiet")
|
|
214
|
+
if params.get("debug"):
|
|
215
|
+
cargs.append("-debug")
|
|
216
|
+
if params.get("force"):
|
|
217
|
+
cargs.append("-force")
|
|
218
|
+
if params.get("nthreads") is not None:
|
|
219
|
+
cargs.extend([
|
|
220
|
+
"-nthreads",
|
|
221
|
+
str(params.get("nthreads"))
|
|
222
|
+
])
|
|
223
|
+
if params.get("config") is not None:
|
|
224
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
225
|
+
if params.get("help"):
|
|
226
|
+
cargs.append("-help")
|
|
227
|
+
if params.get("version"):
|
|
228
|
+
cargs.append("-version")
|
|
229
|
+
cargs.append(execution.input_file(params.get("input")))
|
|
230
|
+
cargs.append(params.get("output"))
|
|
231
|
+
return cargs
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def mrcheckerboardmask_outputs(
|
|
235
|
+
params: MrcheckerboardmaskParameters,
|
|
236
|
+
execution: Execution,
|
|
237
|
+
) -> MrcheckerboardmaskOutputs:
|
|
238
|
+
"""
|
|
239
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
240
|
+
|
|
241
|
+
Args:
|
|
242
|
+
params: The parameters.
|
|
243
|
+
execution: The execution object for resolving input paths.
|
|
244
|
+
Returns:
|
|
245
|
+
Outputs object.
|
|
246
|
+
"""
|
|
247
|
+
ret = MrcheckerboardmaskOutputs(
|
|
248
|
+
root=execution.output_file("."),
|
|
249
|
+
output=execution.output_file(params.get("output")),
|
|
250
|
+
)
|
|
251
|
+
return ret
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def mrcheckerboardmask_execute(
|
|
255
|
+
params: MrcheckerboardmaskParameters,
|
|
256
|
+
execution: Execution,
|
|
257
|
+
) -> MrcheckerboardmaskOutputs:
|
|
258
|
+
"""
|
|
259
|
+
Create bitwise checkerboard image.
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
References:
|
|
264
|
+
|
|
265
|
+
.
|
|
266
|
+
|
|
267
|
+
Author: MRTrix3 Developers
|
|
268
|
+
|
|
269
|
+
URL: https://www.mrtrix.org/
|
|
270
|
+
|
|
271
|
+
Args:
|
|
272
|
+
params: The parameters.
|
|
273
|
+
execution: The execution object.
|
|
274
|
+
Returns:
|
|
275
|
+
NamedTuple of outputs (described in `MrcheckerboardmaskOutputs`).
|
|
276
|
+
"""
|
|
277
|
+
params = execution.params(params)
|
|
278
|
+
cargs = mrcheckerboardmask_cargs(params, execution)
|
|
279
|
+
ret = mrcheckerboardmask_outputs(params, execution)
|
|
280
|
+
execution.run(cargs)
|
|
281
|
+
return ret
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def mrcheckerboardmask(
|
|
285
|
+
input_: InputPathType,
|
|
286
|
+
output: str,
|
|
287
|
+
tiles: int | None = None,
|
|
288
|
+
invert: bool = False,
|
|
289
|
+
nan: bool = False,
|
|
290
|
+
info: bool = False,
|
|
291
|
+
quiet: bool = False,
|
|
292
|
+
debug: bool = False,
|
|
293
|
+
force: bool = False,
|
|
294
|
+
nthreads: int | None = None,
|
|
295
|
+
config: list[MrcheckerboardmaskConfigParameters] | None = None,
|
|
296
|
+
help_: bool = False,
|
|
297
|
+
version: bool = False,
|
|
298
|
+
runner: Runner | None = None,
|
|
299
|
+
) -> MrcheckerboardmaskOutputs:
|
|
300
|
+
"""
|
|
301
|
+
Create bitwise checkerboard image.
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
References:
|
|
306
|
+
|
|
307
|
+
.
|
|
308
|
+
|
|
309
|
+
Author: MRTrix3 Developers
|
|
310
|
+
|
|
311
|
+
URL: https://www.mrtrix.org/
|
|
312
|
+
|
|
313
|
+
Args:
|
|
314
|
+
input_: the input image to be used as a template.
|
|
315
|
+
output: the output binary image mask.
|
|
316
|
+
tiles: specify the number of tiles in any direction.
|
|
317
|
+
invert: invert output binary mask.
|
|
318
|
+
nan: use NaN as the output zero value.
|
|
319
|
+
info: display information messages.
|
|
320
|
+
quiet: do not display information messages or progress status;\
|
|
321
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
322
|
+
environment variable to a non-empty string.
|
|
323
|
+
debug: display debugging messages.
|
|
324
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
325
|
+
input and output might cause unexpected behaviour).
|
|
326
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
327
|
+
(set to 0 to disable multi-threading).
|
|
328
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
329
|
+
help_: display this information page and exit.
|
|
330
|
+
version: display version information and exit.
|
|
331
|
+
runner: Command runner.
|
|
332
|
+
Returns:
|
|
333
|
+
NamedTuple of outputs (described in `MrcheckerboardmaskOutputs`).
|
|
334
|
+
"""
|
|
335
|
+
runner = runner or get_global_runner()
|
|
336
|
+
execution = runner.start_execution(MRCHECKERBOARDMASK_METADATA)
|
|
337
|
+
params = mrcheckerboardmask_params(
|
|
338
|
+
tiles=tiles,
|
|
339
|
+
invert=invert,
|
|
340
|
+
nan=nan,
|
|
341
|
+
info=info,
|
|
342
|
+
quiet=quiet,
|
|
343
|
+
debug=debug,
|
|
344
|
+
force=force,
|
|
345
|
+
nthreads=nthreads,
|
|
346
|
+
config=config,
|
|
347
|
+
help_=help_,
|
|
348
|
+
version=version,
|
|
349
|
+
input_=input_,
|
|
350
|
+
output=output,
|
|
351
|
+
)
|
|
352
|
+
return mrcheckerboardmask_execute(params, execution)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
__all__ = [
|
|
356
|
+
"MRCHECKERBOARDMASK_METADATA",
|
|
357
|
+
"MrcheckerboardmaskConfigParameters",
|
|
358
|
+
"MrcheckerboardmaskOutputs",
|
|
359
|
+
"MrcheckerboardmaskParameters",
|
|
360
|
+
"mrcheckerboardmask",
|
|
361
|
+
"mrcheckerboardmask_config_params",
|
|
362
|
+
"mrcheckerboardmask_params",
|
|
363
|
+
]
|