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,443 @@
|
|
|
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
|
+
MRDEGIBBS_METADATA = Metadata(
|
|
9
|
+
id="07aa2daa1ce97b2b9113590497c38c7cb9570763.boutiques",
|
|
10
|
+
name="mrdegibbs",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
MrdegibbsConfigParameters = typing.TypedDict('MrdegibbsConfigParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
MrdegibbsParameters = typing.TypedDict('MrdegibbsParameters', {
|
|
24
|
+
"__STYX_TYPE__": typing.Literal["mrdegibbs"],
|
|
25
|
+
"axes": typing.NotRequired[list[int] | None],
|
|
26
|
+
"nshifts": typing.NotRequired[int | None],
|
|
27
|
+
"minW": typing.NotRequired[int | None],
|
|
28
|
+
"maxW": typing.NotRequired[int | None],
|
|
29
|
+
"datatype": typing.NotRequired[str | None],
|
|
30
|
+
"info": bool,
|
|
31
|
+
"quiet": bool,
|
|
32
|
+
"debug": bool,
|
|
33
|
+
"force": bool,
|
|
34
|
+
"nthreads": typing.NotRequired[int | None],
|
|
35
|
+
"config": typing.NotRequired[list[MrdegibbsConfigParameters] | None],
|
|
36
|
+
"help": bool,
|
|
37
|
+
"version": bool,
|
|
38
|
+
"in": InputPathType,
|
|
39
|
+
"out": 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
|
+
"mrdegibbs": mrdegibbs_cargs,
|
|
56
|
+
"config": mrdegibbs_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
|
+
"mrdegibbs": mrdegibbs_outputs,
|
|
73
|
+
}.get(t)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def mrdegibbs_config_params(
|
|
77
|
+
key: str,
|
|
78
|
+
value: str,
|
|
79
|
+
) -> MrdegibbsConfigParameters:
|
|
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 mrdegibbs_config_cargs(
|
|
98
|
+
params: MrdegibbsConfigParameters,
|
|
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 MrdegibbsOutputs(typing.NamedTuple):
|
|
118
|
+
"""
|
|
119
|
+
Output object returned when calling `mrdegibbs(...)`.
|
|
120
|
+
"""
|
|
121
|
+
root: OutputPathType
|
|
122
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
123
|
+
out: OutputPathType
|
|
124
|
+
"""the output image."""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def mrdegibbs_params(
|
|
128
|
+
in_: InputPathType,
|
|
129
|
+
out: str,
|
|
130
|
+
axes: list[int] | None = None,
|
|
131
|
+
nshifts: int | None = None,
|
|
132
|
+
min_w: int | None = None,
|
|
133
|
+
max_w: int | None = None,
|
|
134
|
+
datatype: str | None = None,
|
|
135
|
+
info: bool = False,
|
|
136
|
+
quiet: bool = False,
|
|
137
|
+
debug: bool = False,
|
|
138
|
+
force: bool = False,
|
|
139
|
+
nthreads: int | None = None,
|
|
140
|
+
config: list[MrdegibbsConfigParameters] | None = None,
|
|
141
|
+
help_: bool = False,
|
|
142
|
+
version: bool = False,
|
|
143
|
+
) -> MrdegibbsParameters:
|
|
144
|
+
"""
|
|
145
|
+
Build parameters.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
in_: the input image.
|
|
149
|
+
out: the output image.
|
|
150
|
+
axes: select the slice axes (default: 0,1 - i.e. x-y).
|
|
151
|
+
nshifts: discretization of subpixel spacing (default: 20).
|
|
152
|
+
min_w: left border of window used for TV computation (default: 1).
|
|
153
|
+
max_w: right border of window used for TV computation (default: 3).
|
|
154
|
+
datatype: specify output image data type. Valid choices are: float32,\
|
|
155
|
+
float32le, float32be, float64, float64le, float64be, int64, uint64,\
|
|
156
|
+
int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
|
|
157
|
+
int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
|
|
158
|
+
cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
|
|
159
|
+
int8, uint8, bit.
|
|
160
|
+
info: display information messages.
|
|
161
|
+
quiet: do not display information messages or progress status;\
|
|
162
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
163
|
+
environment variable to a non-empty string.
|
|
164
|
+
debug: display debugging messages.
|
|
165
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
166
|
+
input and output might cause unexpected behaviour).
|
|
167
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
168
|
+
(set to 0 to disable multi-threading).
|
|
169
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
170
|
+
help_: display this information page and exit.
|
|
171
|
+
version: display version information and exit.
|
|
172
|
+
Returns:
|
|
173
|
+
Parameter dictionary
|
|
174
|
+
"""
|
|
175
|
+
params = {
|
|
176
|
+
"__STYXTYPE__": "mrdegibbs",
|
|
177
|
+
"info": info,
|
|
178
|
+
"quiet": quiet,
|
|
179
|
+
"debug": debug,
|
|
180
|
+
"force": force,
|
|
181
|
+
"help": help_,
|
|
182
|
+
"version": version,
|
|
183
|
+
"in": in_,
|
|
184
|
+
"out": out,
|
|
185
|
+
}
|
|
186
|
+
if axes is not None:
|
|
187
|
+
params["axes"] = axes
|
|
188
|
+
if nshifts is not None:
|
|
189
|
+
params["nshifts"] = nshifts
|
|
190
|
+
if min_w is not None:
|
|
191
|
+
params["minW"] = min_w
|
|
192
|
+
if max_w is not None:
|
|
193
|
+
params["maxW"] = max_w
|
|
194
|
+
if datatype is not None:
|
|
195
|
+
params["datatype"] = datatype
|
|
196
|
+
if nthreads is not None:
|
|
197
|
+
params["nthreads"] = nthreads
|
|
198
|
+
if config is not None:
|
|
199
|
+
params["config"] = config
|
|
200
|
+
return params
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def mrdegibbs_cargs(
|
|
204
|
+
params: MrdegibbsParameters,
|
|
205
|
+
execution: Execution,
|
|
206
|
+
) -> list[str]:
|
|
207
|
+
"""
|
|
208
|
+
Build command-line arguments from parameters.
|
|
209
|
+
|
|
210
|
+
Args:
|
|
211
|
+
params: The parameters.
|
|
212
|
+
execution: The execution object for resolving input paths.
|
|
213
|
+
Returns:
|
|
214
|
+
Command-line arguments.
|
|
215
|
+
"""
|
|
216
|
+
cargs = []
|
|
217
|
+
cargs.append("mrdegibbs")
|
|
218
|
+
if params.get("axes") is not None:
|
|
219
|
+
cargs.extend([
|
|
220
|
+
"-axes",
|
|
221
|
+
*map(str, params.get("axes"))
|
|
222
|
+
])
|
|
223
|
+
if params.get("nshifts") is not None:
|
|
224
|
+
cargs.extend([
|
|
225
|
+
"-nshifts",
|
|
226
|
+
str(params.get("nshifts"))
|
|
227
|
+
])
|
|
228
|
+
if params.get("minW") is not None:
|
|
229
|
+
cargs.extend([
|
|
230
|
+
"-minW",
|
|
231
|
+
str(params.get("minW"))
|
|
232
|
+
])
|
|
233
|
+
if params.get("maxW") is not None:
|
|
234
|
+
cargs.extend([
|
|
235
|
+
"-maxW",
|
|
236
|
+
str(params.get("maxW"))
|
|
237
|
+
])
|
|
238
|
+
if params.get("datatype") is not None:
|
|
239
|
+
cargs.extend([
|
|
240
|
+
"-datatype",
|
|
241
|
+
params.get("datatype")
|
|
242
|
+
])
|
|
243
|
+
if params.get("info"):
|
|
244
|
+
cargs.append("-info")
|
|
245
|
+
if params.get("quiet"):
|
|
246
|
+
cargs.append("-quiet")
|
|
247
|
+
if params.get("debug"):
|
|
248
|
+
cargs.append("-debug")
|
|
249
|
+
if params.get("force"):
|
|
250
|
+
cargs.append("-force")
|
|
251
|
+
if params.get("nthreads") is not None:
|
|
252
|
+
cargs.extend([
|
|
253
|
+
"-nthreads",
|
|
254
|
+
str(params.get("nthreads"))
|
|
255
|
+
])
|
|
256
|
+
if params.get("config") is not None:
|
|
257
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
258
|
+
if params.get("help"):
|
|
259
|
+
cargs.append("-help")
|
|
260
|
+
if params.get("version"):
|
|
261
|
+
cargs.append("-version")
|
|
262
|
+
cargs.append(execution.input_file(params.get("in")))
|
|
263
|
+
cargs.append(params.get("out"))
|
|
264
|
+
return cargs
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def mrdegibbs_outputs(
|
|
268
|
+
params: MrdegibbsParameters,
|
|
269
|
+
execution: Execution,
|
|
270
|
+
) -> MrdegibbsOutputs:
|
|
271
|
+
"""
|
|
272
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
273
|
+
|
|
274
|
+
Args:
|
|
275
|
+
params: The parameters.
|
|
276
|
+
execution: The execution object for resolving input paths.
|
|
277
|
+
Returns:
|
|
278
|
+
Outputs object.
|
|
279
|
+
"""
|
|
280
|
+
ret = MrdegibbsOutputs(
|
|
281
|
+
root=execution.output_file("."),
|
|
282
|
+
out=execution.output_file(params.get("out")),
|
|
283
|
+
)
|
|
284
|
+
return ret
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def mrdegibbs_execute(
|
|
288
|
+
params: MrdegibbsParameters,
|
|
289
|
+
execution: Execution,
|
|
290
|
+
) -> MrdegibbsOutputs:
|
|
291
|
+
"""
|
|
292
|
+
Remove Gibbs Ringing Artifacts.
|
|
293
|
+
|
|
294
|
+
This application attempts to remove Gibbs ringing artefacts from MRI images
|
|
295
|
+
using the method of local subvoxel-shifts proposed by Kellner et al. (see
|
|
296
|
+
reference below for details).
|
|
297
|
+
|
|
298
|
+
This command is designed to run on data directly after it has been
|
|
299
|
+
reconstructed by the scanner, before any interpolation of any kind has taken
|
|
300
|
+
place. You should not run this command after any form of motion correction
|
|
301
|
+
(e.g. not after dwifslpreproc). Similarly, if you intend running dwidenoise,
|
|
302
|
+
you should run denoising before this command to not alter the noise
|
|
303
|
+
structure, which would impact on dwidenoise's performance.
|
|
304
|
+
|
|
305
|
+
Note that this method is designed to work on images acquired with full
|
|
306
|
+
k-space coverage. Running this method on partial Fourier ('half-scan') data
|
|
307
|
+
may lead to suboptimal and/or biased results, as noted in the original
|
|
308
|
+
reference below. There is currently no means of dealing with this; users
|
|
309
|
+
should exercise caution when using this method on partial Fourier data, and
|
|
310
|
+
inspect its output for any obvious artefacts.
|
|
311
|
+
|
|
312
|
+
References:
|
|
313
|
+
|
|
314
|
+
Kellner, E; Dhital, B; Kiselev, V.G & Reisert, M. Gibbs-ringing artifact
|
|
315
|
+
removal based on local subvoxel-shifts. Magnetic Resonance in Medicine,
|
|
316
|
+
2016, 76, 1574–1581.
|
|
317
|
+
|
|
318
|
+
Author: MRTrix3 Developers
|
|
319
|
+
|
|
320
|
+
URL: https://www.mrtrix.org/
|
|
321
|
+
|
|
322
|
+
Args:
|
|
323
|
+
params: The parameters.
|
|
324
|
+
execution: The execution object.
|
|
325
|
+
Returns:
|
|
326
|
+
NamedTuple of outputs (described in `MrdegibbsOutputs`).
|
|
327
|
+
"""
|
|
328
|
+
params = execution.params(params)
|
|
329
|
+
cargs = mrdegibbs_cargs(params, execution)
|
|
330
|
+
ret = mrdegibbs_outputs(params, execution)
|
|
331
|
+
execution.run(cargs)
|
|
332
|
+
return ret
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def mrdegibbs(
|
|
336
|
+
in_: InputPathType,
|
|
337
|
+
out: str,
|
|
338
|
+
axes: list[int] | None = None,
|
|
339
|
+
nshifts: int | None = None,
|
|
340
|
+
min_w: int | None = None,
|
|
341
|
+
max_w: int | None = None,
|
|
342
|
+
datatype: str | None = None,
|
|
343
|
+
info: bool = False,
|
|
344
|
+
quiet: bool = False,
|
|
345
|
+
debug: bool = False,
|
|
346
|
+
force: bool = False,
|
|
347
|
+
nthreads: int | None = None,
|
|
348
|
+
config: list[MrdegibbsConfigParameters] | None = None,
|
|
349
|
+
help_: bool = False,
|
|
350
|
+
version: bool = False,
|
|
351
|
+
runner: Runner | None = None,
|
|
352
|
+
) -> MrdegibbsOutputs:
|
|
353
|
+
"""
|
|
354
|
+
Remove Gibbs Ringing Artifacts.
|
|
355
|
+
|
|
356
|
+
This application attempts to remove Gibbs ringing artefacts from MRI images
|
|
357
|
+
using the method of local subvoxel-shifts proposed by Kellner et al. (see
|
|
358
|
+
reference below for details).
|
|
359
|
+
|
|
360
|
+
This command is designed to run on data directly after it has been
|
|
361
|
+
reconstructed by the scanner, before any interpolation of any kind has taken
|
|
362
|
+
place. You should not run this command after any form of motion correction
|
|
363
|
+
(e.g. not after dwifslpreproc). Similarly, if you intend running dwidenoise,
|
|
364
|
+
you should run denoising before this command to not alter the noise
|
|
365
|
+
structure, which would impact on dwidenoise's performance.
|
|
366
|
+
|
|
367
|
+
Note that this method is designed to work on images acquired with full
|
|
368
|
+
k-space coverage. Running this method on partial Fourier ('half-scan') data
|
|
369
|
+
may lead to suboptimal and/or biased results, as noted in the original
|
|
370
|
+
reference below. There is currently no means of dealing with this; users
|
|
371
|
+
should exercise caution when using this method on partial Fourier data, and
|
|
372
|
+
inspect its output for any obvious artefacts.
|
|
373
|
+
|
|
374
|
+
References:
|
|
375
|
+
|
|
376
|
+
Kellner, E; Dhital, B; Kiselev, V.G & Reisert, M. Gibbs-ringing artifact
|
|
377
|
+
removal based on local subvoxel-shifts. Magnetic Resonance in Medicine,
|
|
378
|
+
2016, 76, 1574–1581.
|
|
379
|
+
|
|
380
|
+
Author: MRTrix3 Developers
|
|
381
|
+
|
|
382
|
+
URL: https://www.mrtrix.org/
|
|
383
|
+
|
|
384
|
+
Args:
|
|
385
|
+
in_: the input image.
|
|
386
|
+
out: the output image.
|
|
387
|
+
axes: select the slice axes (default: 0,1 - i.e. x-y).
|
|
388
|
+
nshifts: discretization of subpixel spacing (default: 20).
|
|
389
|
+
min_w: left border of window used for TV computation (default: 1).
|
|
390
|
+
max_w: right border of window used for TV computation (default: 3).
|
|
391
|
+
datatype: specify output image data type. Valid choices are: float32,\
|
|
392
|
+
float32le, float32be, float64, float64le, float64be, int64, uint64,\
|
|
393
|
+
int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
|
|
394
|
+
int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
|
|
395
|
+
cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
|
|
396
|
+
int8, uint8, bit.
|
|
397
|
+
info: display information messages.
|
|
398
|
+
quiet: do not display information messages or progress status;\
|
|
399
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
400
|
+
environment variable to a non-empty string.
|
|
401
|
+
debug: display debugging messages.
|
|
402
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
403
|
+
input and output might cause unexpected behaviour).
|
|
404
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
405
|
+
(set to 0 to disable multi-threading).
|
|
406
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
407
|
+
help_: display this information page and exit.
|
|
408
|
+
version: display version information and exit.
|
|
409
|
+
runner: Command runner.
|
|
410
|
+
Returns:
|
|
411
|
+
NamedTuple of outputs (described in `MrdegibbsOutputs`).
|
|
412
|
+
"""
|
|
413
|
+
runner = runner or get_global_runner()
|
|
414
|
+
execution = runner.start_execution(MRDEGIBBS_METADATA)
|
|
415
|
+
params = mrdegibbs_params(
|
|
416
|
+
axes=axes,
|
|
417
|
+
nshifts=nshifts,
|
|
418
|
+
min_w=min_w,
|
|
419
|
+
max_w=max_w,
|
|
420
|
+
datatype=datatype,
|
|
421
|
+
info=info,
|
|
422
|
+
quiet=quiet,
|
|
423
|
+
debug=debug,
|
|
424
|
+
force=force,
|
|
425
|
+
nthreads=nthreads,
|
|
426
|
+
config=config,
|
|
427
|
+
help_=help_,
|
|
428
|
+
version=version,
|
|
429
|
+
in_=in_,
|
|
430
|
+
out=out,
|
|
431
|
+
)
|
|
432
|
+
return mrdegibbs_execute(params, execution)
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
__all__ = [
|
|
436
|
+
"MRDEGIBBS_METADATA",
|
|
437
|
+
"MrdegibbsConfigParameters",
|
|
438
|
+
"MrdegibbsOutputs",
|
|
439
|
+
"MrdegibbsParameters",
|
|
440
|
+
"mrdegibbs",
|
|
441
|
+
"mrdegibbs_config_params",
|
|
442
|
+
"mrdegibbs_params",
|
|
443
|
+
]
|