niwrap-mrtrix 0.8.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.
Files changed (119) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +263 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +527 -0
  3. niwrap_mrtrix/mrtrix/amp2response.py +560 -0
  4. niwrap_mrtrix/mrtrix/amp2sh.py +870 -0
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +583 -0
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +413 -0
  7. niwrap_mrtrix/mrtrix/connectomestats.py +956 -0
  8. niwrap_mrtrix/mrtrix/dcmedit.py +552 -0
  9. niwrap_mrtrix/mrtrix/dcminfo.py +529 -0
  10. niwrap_mrtrix/mrtrix/dirflip.py +440 -0
  11. niwrap_mrtrix/mrtrix/dirgen.py +514 -0
  12. niwrap_mrtrix/mrtrix/dirmerge.py +446 -0
  13. niwrap_mrtrix/mrtrix/dirorder.py +421 -0
  14. niwrap_mrtrix/mrtrix/dirsplit.py +436 -0
  15. niwrap_mrtrix/mrtrix/dirstat.py +640 -0
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +531 -0
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +1156 -0
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +570 -0
  19. niwrap_mrtrix/mrtrix/dwi2response.py +1774 -0
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +715 -0
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +673 -0
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +570 -0
  23. niwrap_mrtrix/mrtrix/dwiextract.py +1111 -0
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +665 -0
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +613 -0
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +430 -0
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +435 -0
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +523 -0
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +1179 -0
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +477 -0
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +850 -0
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +455 -0
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +422 -0
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +882 -0
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +435 -0
  36. niwrap_mrtrix/mrtrix/fod2dec.py +571 -0
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +646 -0
  38. niwrap_mrtrix/mrtrix/label2colour.py +426 -0
  39. niwrap_mrtrix/mrtrix/label2mesh.py +417 -0
  40. niwrap_mrtrix/mrtrix/labelconvert.py +460 -0
  41. niwrap_mrtrix/mrtrix/labelstats.py +418 -0
  42. niwrap_mrtrix/mrtrix/maskdump.py +404 -0
  43. niwrap_mrtrix/mrtrix/maskfilter.py +730 -0
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +422 -0
  45. niwrap_mrtrix/mrtrix/meshconvert.py +514 -0
  46. niwrap_mrtrix/mrtrix/meshfilter.py +452 -0
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +485 -0
  48. niwrap_mrtrix/mrtrix/mrcalc.py +4302 -0
  49. niwrap_mrtrix/mrtrix/mrcat.py +467 -0
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +418 -0
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +446 -0
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +930 -0
  53. niwrap_mrtrix/mrtrix/mrcolour.py +490 -0
  54. niwrap_mrtrix/mrtrix/mrconvert.py +1967 -0
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +535 -0
  56. niwrap_mrtrix/mrtrix/mrdump.py +423 -0
  57. niwrap_mrtrix/mrtrix/mredit.py +737 -0
  58. niwrap_mrtrix/mrtrix/mrfilter.py +971 -0
  59. niwrap_mrtrix/mrtrix/mrgrid.py +1079 -0
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +494 -0
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +484 -0
  62. niwrap_mrtrix/mrtrix/mrinfo.py +1282 -0
  63. niwrap_mrtrix/mrtrix/mrmath.py +503 -0
  64. niwrap_mrtrix/mrtrix/mrmetric.py +525 -0
  65. niwrap_mrtrix/mrtrix/mrregister.py +2098 -0
  66. niwrap_mrtrix/mrtrix/mrstats.py +534 -0
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +666 -0
  68. niwrap_mrtrix/mrtrix/mrtransform.py +1372 -0
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +725 -0
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +403 -0
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +422 -0
  72. niwrap_mrtrix/mrtrix/responsemean.py +385 -0
  73. niwrap_mrtrix/mrtrix/sh2amp.py +844 -0
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +632 -0
  75. niwrap_mrtrix/mrtrix/sh2power.py +427 -0
  76. niwrap_mrtrix/mrtrix/sh2response.py +481 -0
  77. niwrap_mrtrix/mrtrix/shbasis.py +445 -0
  78. niwrap_mrtrix/mrtrix/shconv.py +661 -0
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +727 -0
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +447 -0
  81. niwrap_mrtrix/mrtrix/tckconvert.py +775 -0
  82. niwrap_mrtrix/mrtrix/tckdfc.py +684 -0
  83. niwrap_mrtrix/mrtrix/tckedit.py +1478 -0
  84. niwrap_mrtrix/mrtrix/tckgen.py +2733 -0
  85. niwrap_mrtrix/mrtrix/tckglobal.py +944 -0
  86. niwrap_mrtrix/mrtrix/tckinfo.py +402 -0
  87. niwrap_mrtrix/mrtrix/tckmap.py +1004 -0
  88. niwrap_mrtrix/mrtrix/tckresample.py +760 -0
  89. niwrap_mrtrix/mrtrix/tcksample.py +497 -0
  90. niwrap_mrtrix/mrtrix/tcksift.py +739 -0
  91. niwrap_mrtrix/mrtrix/tcksift2.py +902 -0
  92. niwrap_mrtrix/mrtrix/tckstats.py +550 -0
  93. niwrap_mrtrix/mrtrix/tcktransform.py +414 -0
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +659 -0
  95. niwrap_mrtrix/mrtrix/transformcalc.py +421 -0
  96. niwrap_mrtrix/mrtrix/transformcompose.py +625 -0
  97. niwrap_mrtrix/mrtrix/transformconvert.py +423 -0
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +414 -0
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +421 -0
  100. niwrap_mrtrix/mrtrix/tsfmult.py +401 -0
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +420 -0
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +428 -0
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +398 -0
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +432 -0
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +505 -0
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +409 -0
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +513 -0
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +1107 -0
  109. niwrap_mrtrix/mrtrix/vectorstats.py +736 -0
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +430 -0
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +454 -0
  112. niwrap_mrtrix/mrtrix/warp2metric.py +556 -0
  113. niwrap_mrtrix/mrtrix/warpconvert.py +498 -0
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +448 -0
  115. niwrap_mrtrix/mrtrix/warpinit.py +425 -0
  116. niwrap_mrtrix/mrtrix/warpinvert.py +448 -0
  117. niwrap_mrtrix-0.8.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.8.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.8.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,494 @@
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
+ MRHISTMATCH_METADATA = Metadata(
9
+ id="1798cd7ea1a79d9523cf1fd1a7ec35b94aa4a5ab.boutiques",
10
+ name="mrhistmatch",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _MrhistmatchConfigParamsDictNoTag = typing.TypedDict('_MrhistmatchConfigParamsDictNoTag', {
17
+ "key": str,
18
+ "value": str,
19
+ })
20
+ MrhistmatchConfigParamsDictTagged = typing.TypedDict('MrhistmatchConfigParamsDictTagged', {
21
+ "@type": typing.Literal["config"],
22
+ "key": str,
23
+ "value": str,
24
+ })
25
+ MrhistmatchConfigParamsDict = _MrhistmatchConfigParamsDictNoTag | MrhistmatchConfigParamsDictTagged
26
+
27
+
28
+ _MrhistmatchParamsDictNoTag = typing.TypedDict('_MrhistmatchParamsDictNoTag', {
29
+ "mask_input": typing.NotRequired[InputPathType | None],
30
+ "mask_target": typing.NotRequired[InputPathType | None],
31
+ "bins": typing.NotRequired[int | None],
32
+ "info": bool,
33
+ "quiet": bool,
34
+ "debug": bool,
35
+ "force": bool,
36
+ "nthreads": typing.NotRequired[int | None],
37
+ "config": typing.NotRequired[list[MrhistmatchConfigParamsDict] | None],
38
+ "help": bool,
39
+ "version": bool,
40
+ "type": str,
41
+ "input": InputPathType,
42
+ "target": InputPathType,
43
+ "output": str,
44
+ })
45
+ MrhistmatchParamsDictTagged = typing.TypedDict('MrhistmatchParamsDictTagged', {
46
+ "@type": typing.Literal["mrtrix/mrhistmatch"],
47
+ "mask_input": typing.NotRequired[InputPathType | None],
48
+ "mask_target": typing.NotRequired[InputPathType | None],
49
+ "bins": typing.NotRequired[int | None],
50
+ "info": bool,
51
+ "quiet": bool,
52
+ "debug": bool,
53
+ "force": bool,
54
+ "nthreads": typing.NotRequired[int | None],
55
+ "config": typing.NotRequired[list[MrhistmatchConfigParamsDict] | None],
56
+ "help": bool,
57
+ "version": bool,
58
+ "type": str,
59
+ "input": InputPathType,
60
+ "target": InputPathType,
61
+ "output": str,
62
+ })
63
+ MrhistmatchParamsDict = _MrhistmatchParamsDictNoTag | MrhistmatchParamsDictTagged
64
+
65
+
66
+ def mrhistmatch_config(
67
+ key: str,
68
+ value: str,
69
+ ) -> MrhistmatchConfigParamsDictTagged:
70
+ """
71
+ Build parameters.
72
+
73
+ Args:
74
+ key: temporarily set the value of an MRtrix config file entry.
75
+ value: temporarily set the value of an MRtrix config file entry.
76
+ Returns:
77
+ Parameter dictionary
78
+ """
79
+ params = {
80
+ "@type": "config",
81
+ "key": key,
82
+ "value": value,
83
+ }
84
+ return params
85
+
86
+
87
+ def mrhistmatch_config_validate(
88
+ params: typing.Any,
89
+ ) -> None:
90
+ """
91
+ Validate parameters. Throws an error if `params` is not a valid
92
+ `MrhistmatchConfigParamsDict` object.
93
+
94
+ Args:
95
+ params: The parameters object to validate.
96
+ """
97
+ if params is None or not isinstance(params, dict):
98
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
99
+ if params.get("key", None) is None:
100
+ raise StyxValidationError("`key` must not be None")
101
+ if not isinstance(params["key"], str):
102
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
103
+ if params.get("value", None) is None:
104
+ raise StyxValidationError("`value` must not be None")
105
+ if not isinstance(params["value"], str):
106
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
107
+
108
+
109
+ def mrhistmatch_config_cargs(
110
+ params: MrhistmatchConfigParamsDict,
111
+ execution: Execution,
112
+ ) -> list[str]:
113
+ """
114
+ Build command-line arguments from parameters.
115
+
116
+ Args:
117
+ params: The parameters.
118
+ execution: The execution object for resolving input paths.
119
+ Returns:
120
+ Command-line arguments.
121
+ """
122
+ cargs = []
123
+ cargs.append("-config")
124
+ cargs.append(params.get("key", None))
125
+ cargs.append(params.get("value", None))
126
+ return cargs
127
+
128
+
129
+ class MrhistmatchOutputs(typing.NamedTuple):
130
+ """
131
+ Output object returned when calling `MrhistmatchParamsDict(...)`.
132
+ """
133
+ root: OutputPathType
134
+ """Output root folder. This is the root folder for all outputs."""
135
+ output: OutputPathType
136
+ """the output image"""
137
+
138
+
139
+ def mrhistmatch_params(
140
+ type_: str,
141
+ input_: InputPathType,
142
+ target: InputPathType,
143
+ output: str,
144
+ mask_input: InputPathType | None = None,
145
+ mask_target: InputPathType | None = None,
146
+ bins: int | None = None,
147
+ info: bool = False,
148
+ quiet: bool = False,
149
+ debug: bool = False,
150
+ force: bool = False,
151
+ nthreads: int | None = None,
152
+ config: list[MrhistmatchConfigParamsDict] | None = None,
153
+ help_: bool = False,
154
+ version: bool = False,
155
+ ) -> MrhistmatchParamsDictTagged:
156
+ """
157
+ Build parameters.
158
+
159
+ Args:
160
+ type_: type of histogram matching to perform; options are:\
161
+ scale,linear,nonlinear.
162
+ input_: the input image to be modified.
163
+ target: the input image from which to derive the target histogram.
164
+ output: the output image.
165
+ mask_input: only generate input histogram based on a specified binary\
166
+ mask image.
167
+ mask_target: only generate target histogram based on a specified binary\
168
+ mask image.
169
+ bins: the number of bins to use to generate the histograms.
170
+ info: display information messages.
171
+ quiet: do not display information messages or progress status;\
172
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
173
+ environment variable to a non-empty string.
174
+ debug: display debugging messages.
175
+ force: force overwrite of output files (caution: using the same file as\
176
+ input and output might cause unexpected behaviour).
177
+ nthreads: use this number of threads in multi-threaded applications\
178
+ (set to 0 to disable multi-threading).
179
+ config: temporarily set the value of an MRtrix config file entry.
180
+ help_: display this information page and exit.
181
+ version: display version information and exit.
182
+ Returns:
183
+ Parameter dictionary
184
+ """
185
+ params = {
186
+ "@type": "mrtrix/mrhistmatch",
187
+ "info": info,
188
+ "quiet": quiet,
189
+ "debug": debug,
190
+ "force": force,
191
+ "help": help_,
192
+ "version": version,
193
+ "type": type_,
194
+ "input": input_,
195
+ "target": target,
196
+ "output": output,
197
+ }
198
+ if mask_input is not None:
199
+ params["mask_input"] = mask_input
200
+ if mask_target is not None:
201
+ params["mask_target"] = mask_target
202
+ if bins is not None:
203
+ params["bins"] = bins
204
+ if nthreads is not None:
205
+ params["nthreads"] = nthreads
206
+ if config is not None:
207
+ params["config"] = config
208
+ return params
209
+
210
+
211
+ def mrhistmatch_validate(
212
+ params: typing.Any,
213
+ ) -> None:
214
+ """
215
+ Validate parameters. Throws an error if `params` is not a valid
216
+ `MrhistmatchParamsDict` object.
217
+
218
+ Args:
219
+ params: The parameters object to validate.
220
+ """
221
+ if params is None or not isinstance(params, dict):
222
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
223
+ if params.get("mask_input", None) is not None:
224
+ if not isinstance(params["mask_input"], (pathlib.Path, str)):
225
+ raise StyxValidationError(f'`mask_input` has the wrong type: Received `{type(params.get("mask_input", None))}` expected `InputPathType | None`')
226
+ if params.get("mask_target", None) is not None:
227
+ if not isinstance(params["mask_target"], (pathlib.Path, str)):
228
+ raise StyxValidationError(f'`mask_target` has the wrong type: Received `{type(params.get("mask_target", None))}` expected `InputPathType | None`')
229
+ if params.get("bins", None) is not None:
230
+ if not isinstance(params["bins"], int):
231
+ raise StyxValidationError(f'`bins` has the wrong type: Received `{type(params.get("bins", None))}` expected `int | None`')
232
+ if params.get("info", False) is None:
233
+ raise StyxValidationError("`info` must not be None")
234
+ if not isinstance(params["info"], bool):
235
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
236
+ if params.get("quiet", False) is None:
237
+ raise StyxValidationError("`quiet` must not be None")
238
+ if not isinstance(params["quiet"], bool):
239
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
240
+ if params.get("debug", False) is None:
241
+ raise StyxValidationError("`debug` must not be None")
242
+ if not isinstance(params["debug"], bool):
243
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
244
+ if params.get("force", False) is None:
245
+ raise StyxValidationError("`force` must not be None")
246
+ if not isinstance(params["force"], bool):
247
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
248
+ if params.get("nthreads", None) is not None:
249
+ if not isinstance(params["nthreads"], int):
250
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
251
+ if params.get("config", None) is not None:
252
+ if not isinstance(params["config"], list):
253
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[MrhistmatchConfigParamsDict] | None`')
254
+ for e in params["config"]:
255
+ mrhistmatch_config_validate(e)
256
+ if params.get("help", False) is None:
257
+ raise StyxValidationError("`help` must not be None")
258
+ if not isinstance(params["help"], bool):
259
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
260
+ if params.get("version", False) is None:
261
+ raise StyxValidationError("`version` must not be None")
262
+ if not isinstance(params["version"], bool):
263
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
264
+ if params.get("type", None) is None:
265
+ raise StyxValidationError("`type` must not be None")
266
+ if not isinstance(params["type"], str):
267
+ raise StyxValidationError(f'`type` has the wrong type: Received `{type(params.get("type", None))}` expected `str`')
268
+ if params.get("input", None) is None:
269
+ raise StyxValidationError("`input` must not be None")
270
+ if not isinstance(params["input"], (pathlib.Path, str)):
271
+ raise StyxValidationError(f'`input` has the wrong type: Received `{type(params.get("input", None))}` expected `InputPathType`')
272
+ if params.get("target", None) is None:
273
+ raise StyxValidationError("`target` must not be None")
274
+ if not isinstance(params["target"], (pathlib.Path, str)):
275
+ raise StyxValidationError(f'`target` has the wrong type: Received `{type(params.get("target", None))}` expected `InputPathType`')
276
+ if params.get("output", None) is None:
277
+ raise StyxValidationError("`output` must not be None")
278
+ if not isinstance(params["output"], str):
279
+ raise StyxValidationError(f'`output` has the wrong type: Received `{type(params.get("output", None))}` expected `str`')
280
+
281
+
282
+ def mrhistmatch_cargs(
283
+ params: MrhistmatchParamsDict,
284
+ execution: Execution,
285
+ ) -> list[str]:
286
+ """
287
+ Build command-line arguments from parameters.
288
+
289
+ Args:
290
+ params: The parameters.
291
+ execution: The execution object for resolving input paths.
292
+ Returns:
293
+ Command-line arguments.
294
+ """
295
+ cargs = []
296
+ cargs.append("mrhistmatch")
297
+ if params.get("mask_input", None) is not None:
298
+ cargs.extend([
299
+ "-mask_input",
300
+ execution.input_file(params.get("mask_input", None))
301
+ ])
302
+ if params.get("mask_target", None) is not None:
303
+ cargs.extend([
304
+ "-mask_target",
305
+ execution.input_file(params.get("mask_target", None))
306
+ ])
307
+ if params.get("bins", None) is not None:
308
+ cargs.extend([
309
+ "-bins",
310
+ str(params.get("bins", None))
311
+ ])
312
+ if params.get("info", False):
313
+ cargs.append("-info")
314
+ if params.get("quiet", False):
315
+ cargs.append("-quiet")
316
+ if params.get("debug", False):
317
+ cargs.append("-debug")
318
+ if params.get("force", False):
319
+ cargs.append("-force")
320
+ if params.get("nthreads", None) is not None:
321
+ cargs.extend([
322
+ "-nthreads",
323
+ str(params.get("nthreads", None))
324
+ ])
325
+ if params.get("config", None) is not None:
326
+ cargs.extend([a for c in [mrhistmatch_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
327
+ if params.get("help", False):
328
+ cargs.append("-help")
329
+ if params.get("version", False):
330
+ cargs.append("-version")
331
+ cargs.append(params.get("type", None))
332
+ cargs.append(execution.input_file(params.get("input", None)))
333
+ cargs.append(execution.input_file(params.get("target", None)))
334
+ cargs.append(params.get("output", None))
335
+ return cargs
336
+
337
+
338
+ def mrhistmatch_outputs(
339
+ params: MrhistmatchParamsDict,
340
+ execution: Execution,
341
+ ) -> MrhistmatchOutputs:
342
+ """
343
+ Build outputs object containing output file paths and possibly stdout/stderr.
344
+
345
+ Args:
346
+ params: The parameters.
347
+ execution: The execution object for resolving input paths.
348
+ Returns:
349
+ Outputs object.
350
+ """
351
+ ret = MrhistmatchOutputs(
352
+ root=execution.output_file("."),
353
+ output=execution.output_file(params.get("output", None)),
354
+ )
355
+ return ret
356
+
357
+
358
+ def mrhistmatch_execute(
359
+ params: MrhistmatchParamsDict,
360
+ runner: Runner | None = None,
361
+ ) -> MrhistmatchOutputs:
362
+ """
363
+ mrhistmatch
364
+
365
+ Modify the intensities of one image to match the histogram of another.
366
+
367
+
368
+
369
+ References:
370
+
371
+ * If using inverse contrast normalization for inter-modal (DWI - T1)
372
+ registration:
373
+ Bhushan, C.; Haldar, J. P.; Choi, S.; Joshi, A. A.; Shattuck, D. W. & Leahy,
374
+ R. M. Co-registration and distortion correction of diffusion and anatomical
375
+ images based on inverse contrast normalization. NeuroImage, 2015, 115,
376
+ 269-280.
377
+
378
+ Author: MRTrix3 Developers
379
+
380
+ URL: https://www.mrtrix.org/
381
+
382
+ Args:
383
+ params: The parameters.
384
+ runner: Command runner.
385
+ Returns:
386
+ NamedTuple of outputs (described in `MrhistmatchOutputs`).
387
+ """
388
+ mrhistmatch_validate(params)
389
+ runner = runner or get_global_runner()
390
+ execution = runner.start_execution(MRHISTMATCH_METADATA)
391
+ params = execution.params(params)
392
+ cargs = mrhistmatch_cargs(params, execution)
393
+ ret = mrhistmatch_outputs(params, execution)
394
+ execution.run(cargs)
395
+ return ret
396
+
397
+
398
+ def mrhistmatch(
399
+ type_: str,
400
+ input_: InputPathType,
401
+ target: InputPathType,
402
+ output: str,
403
+ mask_input: InputPathType | None = None,
404
+ mask_target: InputPathType | None = None,
405
+ bins: int | None = None,
406
+ info: bool = False,
407
+ quiet: bool = False,
408
+ debug: bool = False,
409
+ force: bool = False,
410
+ nthreads: int | None = None,
411
+ config: list[MrhistmatchConfigParamsDict] | None = None,
412
+ help_: bool = False,
413
+ version: bool = False,
414
+ runner: Runner | None = None,
415
+ ) -> MrhistmatchOutputs:
416
+ """
417
+ mrhistmatch
418
+
419
+ Modify the intensities of one image to match the histogram of another.
420
+
421
+
422
+
423
+ References:
424
+
425
+ * If using inverse contrast normalization for inter-modal (DWI - T1)
426
+ registration:
427
+ Bhushan, C.; Haldar, J. P.; Choi, S.; Joshi, A. A.; Shattuck, D. W. & Leahy,
428
+ R. M. Co-registration and distortion correction of diffusion and anatomical
429
+ images based on inverse contrast normalization. NeuroImage, 2015, 115,
430
+ 269-280.
431
+
432
+ Author: MRTrix3 Developers
433
+
434
+ URL: https://www.mrtrix.org/
435
+
436
+ Args:
437
+ type_: type of histogram matching to perform; options are:\
438
+ scale,linear,nonlinear.
439
+ input_: the input image to be modified.
440
+ target: the input image from which to derive the target histogram.
441
+ output: the output image.
442
+ mask_input: only generate input histogram based on a specified binary\
443
+ mask image.
444
+ mask_target: only generate target histogram based on a specified binary\
445
+ mask image.
446
+ bins: the number of bins to use to generate the histograms.
447
+ info: display information messages.
448
+ quiet: do not display information messages or progress status;\
449
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
450
+ environment variable to a non-empty string.
451
+ debug: display debugging messages.
452
+ force: force overwrite of output files (caution: using the same file as\
453
+ input and output might cause unexpected behaviour).
454
+ nthreads: use this number of threads in multi-threaded applications\
455
+ (set to 0 to disable multi-threading).
456
+ config: temporarily set the value of an MRtrix config file entry.
457
+ help_: display this information page and exit.
458
+ version: display version information and exit.
459
+ runner: Command runner.
460
+ Returns:
461
+ NamedTuple of outputs (described in `MrhistmatchOutputs`).
462
+ """
463
+ params = mrhistmatch_params(
464
+ mask_input=mask_input,
465
+ mask_target=mask_target,
466
+ bins=bins,
467
+ info=info,
468
+ quiet=quiet,
469
+ debug=debug,
470
+ force=force,
471
+ nthreads=nthreads,
472
+ config=config,
473
+ help_=help_,
474
+ version=version,
475
+ type_=type_,
476
+ input_=input_,
477
+ target=target,
478
+ output=output,
479
+ )
480
+ return mrhistmatch_execute(params, runner)
481
+
482
+
483
+ __all__ = [
484
+ "MRHISTMATCH_METADATA",
485
+ "MrhistmatchConfigParamsDict",
486
+ "MrhistmatchConfigParamsDictTagged",
487
+ "MrhistmatchOutputs",
488
+ "MrhistmatchParamsDict",
489
+ "MrhistmatchParamsDictTagged",
490
+ "mrhistmatch",
491
+ "mrhistmatch_config",
492
+ "mrhistmatch_execute",
493
+ "mrhistmatch_params",
494
+ ]