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,529 @@
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
+ DCMINFO_METADATA = Metadata(
9
+ id="f02767c67a910f0ef82176cc014707d1d17070a2.boutiques",
10
+ name="dcminfo",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _DcminfoTagParamsDictNoTag = typing.TypedDict('_DcminfoTagParamsDictNoTag', {
17
+ "group": str,
18
+ "element": str,
19
+ })
20
+ DcminfoTagParamsDictTagged = typing.TypedDict('DcminfoTagParamsDictTagged', {
21
+ "@type": typing.Literal["tag"],
22
+ "group": str,
23
+ "element": str,
24
+ })
25
+ DcminfoTagParamsDict = _DcminfoTagParamsDictNoTag | DcminfoTagParamsDictTagged
26
+
27
+
28
+ _DcminfoConfigParamsDictNoTag = typing.TypedDict('_DcminfoConfigParamsDictNoTag', {
29
+ "key": str,
30
+ "value": str,
31
+ })
32
+ DcminfoConfigParamsDictTagged = typing.TypedDict('DcminfoConfigParamsDictTagged', {
33
+ "@type": typing.Literal["config"],
34
+ "key": str,
35
+ "value": str,
36
+ })
37
+ DcminfoConfigParamsDict = _DcminfoConfigParamsDictNoTag | DcminfoConfigParamsDictTagged
38
+
39
+
40
+ _DcminfoParamsDictNoTag = typing.TypedDict('_DcminfoParamsDictNoTag', {
41
+ "all": bool,
42
+ "csa": bool,
43
+ "phoenix": bool,
44
+ "tag": typing.NotRequired[list[DcminfoTagParamsDict] | None],
45
+ "info": bool,
46
+ "quiet": bool,
47
+ "debug": bool,
48
+ "force": bool,
49
+ "nthreads": typing.NotRequired[int | None],
50
+ "config": typing.NotRequired[list[DcminfoConfigParamsDict] | None],
51
+ "help": bool,
52
+ "version": bool,
53
+ "file": InputPathType,
54
+ })
55
+ DcminfoParamsDictTagged = typing.TypedDict('DcminfoParamsDictTagged', {
56
+ "@type": typing.Literal["mrtrix/dcminfo"],
57
+ "all": bool,
58
+ "csa": bool,
59
+ "phoenix": bool,
60
+ "tag": typing.NotRequired[list[DcminfoTagParamsDict] | None],
61
+ "info": bool,
62
+ "quiet": bool,
63
+ "debug": bool,
64
+ "force": bool,
65
+ "nthreads": typing.NotRequired[int | None],
66
+ "config": typing.NotRequired[list[DcminfoConfigParamsDict] | None],
67
+ "help": bool,
68
+ "version": bool,
69
+ "file": InputPathType,
70
+ })
71
+ DcminfoParamsDict = _DcminfoParamsDictNoTag | DcminfoParamsDictTagged
72
+
73
+
74
+ def dcminfo_tag(
75
+ group: str,
76
+ element: str,
77
+ ) -> DcminfoTagParamsDictTagged:
78
+ """
79
+ Build parameters.
80
+
81
+ Args:
82
+ group: print field specified by the group & element tags supplied. Tags\
83
+ should be supplied as Hexadecimal (i.e. as they appear in the -all\
84
+ listing).
85
+ element: print field specified by the group & element tags supplied.\
86
+ Tags should be supplied as Hexadecimal (i.e. as they appear in the -all\
87
+ listing).
88
+ Returns:
89
+ Parameter dictionary
90
+ """
91
+ params = {
92
+ "@type": "tag",
93
+ "group": group,
94
+ "element": element,
95
+ }
96
+ return params
97
+
98
+
99
+ def dcminfo_tag_validate(
100
+ params: typing.Any,
101
+ ) -> None:
102
+ """
103
+ Validate parameters. Throws an error if `params` is not a valid
104
+ `DcminfoTagParamsDict` object.
105
+
106
+ Args:
107
+ params: The parameters object to validate.
108
+ """
109
+ if params is None or not isinstance(params, dict):
110
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
111
+ if params.get("group", None) is None:
112
+ raise StyxValidationError("`group` must not be None")
113
+ if not isinstance(params["group"], str):
114
+ raise StyxValidationError(f'`group` has the wrong type: Received `{type(params.get("group", None))}` expected `str`')
115
+ if params.get("element", None) is None:
116
+ raise StyxValidationError("`element` must not be None")
117
+ if not isinstance(params["element"], str):
118
+ raise StyxValidationError(f'`element` has the wrong type: Received `{type(params.get("element", None))}` expected `str`')
119
+
120
+
121
+ def dcminfo_tag_cargs(
122
+ params: DcminfoTagParamsDict,
123
+ execution: Execution,
124
+ ) -> list[str]:
125
+ """
126
+ Build command-line arguments from parameters.
127
+
128
+ Args:
129
+ params: The parameters.
130
+ execution: The execution object for resolving input paths.
131
+ Returns:
132
+ Command-line arguments.
133
+ """
134
+ cargs = []
135
+ cargs.append("-tag")
136
+ cargs.append(params.get("group", None))
137
+ cargs.append(params.get("element", None))
138
+ return cargs
139
+
140
+
141
+ def dcminfo_config(
142
+ key: str,
143
+ value: str,
144
+ ) -> DcminfoConfigParamsDictTagged:
145
+ """
146
+ Build parameters.
147
+
148
+ Args:
149
+ key: temporarily set the value of an MRtrix config file entry.
150
+ value: temporarily set the value of an MRtrix config file entry.
151
+ Returns:
152
+ Parameter dictionary
153
+ """
154
+ params = {
155
+ "@type": "config",
156
+ "key": key,
157
+ "value": value,
158
+ }
159
+ return params
160
+
161
+
162
+ def dcminfo_config_validate(
163
+ params: typing.Any,
164
+ ) -> None:
165
+ """
166
+ Validate parameters. Throws an error if `params` is not a valid
167
+ `DcminfoConfigParamsDict` object.
168
+
169
+ Args:
170
+ params: The parameters object to validate.
171
+ """
172
+ if params is None or not isinstance(params, dict):
173
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
174
+ if params.get("key", None) is None:
175
+ raise StyxValidationError("`key` must not be None")
176
+ if not isinstance(params["key"], str):
177
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
178
+ if params.get("value", None) is None:
179
+ raise StyxValidationError("`value` must not be None")
180
+ if not isinstance(params["value"], str):
181
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
182
+
183
+
184
+ def dcminfo_config_cargs(
185
+ params: DcminfoConfigParamsDict,
186
+ execution: Execution,
187
+ ) -> list[str]:
188
+ """
189
+ Build command-line arguments from parameters.
190
+
191
+ Args:
192
+ params: The parameters.
193
+ execution: The execution object for resolving input paths.
194
+ Returns:
195
+ Command-line arguments.
196
+ """
197
+ cargs = []
198
+ cargs.append("-config")
199
+ cargs.append(params.get("key", None))
200
+ cargs.append(params.get("value", None))
201
+ return cargs
202
+
203
+
204
+ class DcminfoOutputs(typing.NamedTuple):
205
+ """
206
+ Output object returned when calling `DcminfoParamsDict(...)`.
207
+ """
208
+ root: OutputPathType
209
+ """Output root folder. This is the root folder for all outputs."""
210
+
211
+
212
+ def dcminfo_params(
213
+ file: InputPathType,
214
+ all_: bool = False,
215
+ csa: bool = False,
216
+ phoenix: bool = False,
217
+ tag: list[DcminfoTagParamsDict] | None = None,
218
+ info: bool = False,
219
+ quiet: bool = False,
220
+ debug: bool = False,
221
+ force: bool = False,
222
+ nthreads: int | None = None,
223
+ config: list[DcminfoConfigParamsDict] | None = None,
224
+ help_: bool = False,
225
+ version: bool = False,
226
+ ) -> DcminfoParamsDictTagged:
227
+ """
228
+ Build parameters.
229
+
230
+ Args:
231
+ file: the DICOM file to be scanned.
232
+ all_: print all DICOM fields.
233
+ csa: print all Siemens CSA fields (excluding Phoenix unless requested).
234
+ phoenix: print Siemens Phoenix protocol information.
235
+ tag: print field specified by the group & element tags supplied. Tags\
236
+ should be supplied as Hexadecimal (i.e. as they appear in the -all\
237
+ listing).
238
+ info: display information messages.
239
+ quiet: do not display information messages or progress status;\
240
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
241
+ environment variable to a non-empty string.
242
+ debug: display debugging messages.
243
+ force: force overwrite of output files (caution: using the same file as\
244
+ input and output might cause unexpected behaviour).
245
+ nthreads: use this number of threads in multi-threaded applications\
246
+ (set to 0 to disable multi-threading).
247
+ config: temporarily set the value of an MRtrix config file entry.
248
+ help_: display this information page and exit.
249
+ version: display version information and exit.
250
+ Returns:
251
+ Parameter dictionary
252
+ """
253
+ params = {
254
+ "@type": "mrtrix/dcminfo",
255
+ "all": all_,
256
+ "csa": csa,
257
+ "phoenix": phoenix,
258
+ "info": info,
259
+ "quiet": quiet,
260
+ "debug": debug,
261
+ "force": force,
262
+ "help": help_,
263
+ "version": version,
264
+ "file": file,
265
+ }
266
+ if tag is not None:
267
+ params["tag"] = tag
268
+ if nthreads is not None:
269
+ params["nthreads"] = nthreads
270
+ if config is not None:
271
+ params["config"] = config
272
+ return params
273
+
274
+
275
+ def dcminfo_validate(
276
+ params: typing.Any,
277
+ ) -> None:
278
+ """
279
+ Validate parameters. Throws an error if `params` is not a valid
280
+ `DcminfoParamsDict` object.
281
+
282
+ Args:
283
+ params: The parameters object to validate.
284
+ """
285
+ if params is None or not isinstance(params, dict):
286
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
287
+ if params.get("all", False) is None:
288
+ raise StyxValidationError("`all` must not be None")
289
+ if not isinstance(params["all"], bool):
290
+ raise StyxValidationError(f'`all` has the wrong type: Received `{type(params.get("all", False))}` expected `bool`')
291
+ if params.get("csa", False) is None:
292
+ raise StyxValidationError("`csa` must not be None")
293
+ if not isinstance(params["csa"], bool):
294
+ raise StyxValidationError(f'`csa` has the wrong type: Received `{type(params.get("csa", False))}` expected `bool`')
295
+ if params.get("phoenix", False) is None:
296
+ raise StyxValidationError("`phoenix` must not be None")
297
+ if not isinstance(params["phoenix"], bool):
298
+ raise StyxValidationError(f'`phoenix` has the wrong type: Received `{type(params.get("phoenix", False))}` expected `bool`')
299
+ if params.get("tag", None) is not None:
300
+ if not isinstance(params["tag"], list):
301
+ raise StyxValidationError(f'`tag` has the wrong type: Received `{type(params.get("tag", None))}` expected `list[DcminfoTagParamsDict] | None`')
302
+ for e in params["tag"]:
303
+ dcminfo_tag_validate(e)
304
+ if params.get("info", False) is None:
305
+ raise StyxValidationError("`info` must not be None")
306
+ if not isinstance(params["info"], bool):
307
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
308
+ if params.get("quiet", False) is None:
309
+ raise StyxValidationError("`quiet` must not be None")
310
+ if not isinstance(params["quiet"], bool):
311
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
312
+ if params.get("debug", False) is None:
313
+ raise StyxValidationError("`debug` must not be None")
314
+ if not isinstance(params["debug"], bool):
315
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
316
+ if params.get("force", False) is None:
317
+ raise StyxValidationError("`force` must not be None")
318
+ if not isinstance(params["force"], bool):
319
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
320
+ if params.get("nthreads", None) is not None:
321
+ if not isinstance(params["nthreads"], int):
322
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
323
+ if params.get("config", None) is not None:
324
+ if not isinstance(params["config"], list):
325
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[DcminfoConfigParamsDict] | None`')
326
+ for e in params["config"]:
327
+ dcminfo_config_validate(e)
328
+ if params.get("help", False) is None:
329
+ raise StyxValidationError("`help` must not be None")
330
+ if not isinstance(params["help"], bool):
331
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
332
+ if params.get("version", False) is None:
333
+ raise StyxValidationError("`version` must not be None")
334
+ if not isinstance(params["version"], bool):
335
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
336
+ if params.get("file", None) is None:
337
+ raise StyxValidationError("`file` must not be None")
338
+ if not isinstance(params["file"], (pathlib.Path, str)):
339
+ raise StyxValidationError(f'`file` has the wrong type: Received `{type(params.get("file", None))}` expected `InputPathType`')
340
+
341
+
342
+ def dcminfo_cargs(
343
+ params: DcminfoParamsDict,
344
+ execution: Execution,
345
+ ) -> list[str]:
346
+ """
347
+ Build command-line arguments from parameters.
348
+
349
+ Args:
350
+ params: The parameters.
351
+ execution: The execution object for resolving input paths.
352
+ Returns:
353
+ Command-line arguments.
354
+ """
355
+ cargs = []
356
+ cargs.append("dcminfo")
357
+ if params.get("all", False):
358
+ cargs.append("-all")
359
+ if params.get("csa", False):
360
+ cargs.append("-csa")
361
+ if params.get("phoenix", False):
362
+ cargs.append("-phoenix")
363
+ if params.get("tag", None) is not None:
364
+ cargs.extend([a for c in [dcminfo_tag_cargs(s, execution) for s in params.get("tag", None)] for a in c])
365
+ if params.get("info", False):
366
+ cargs.append("-info")
367
+ if params.get("quiet", False):
368
+ cargs.append("-quiet")
369
+ if params.get("debug", False):
370
+ cargs.append("-debug")
371
+ if params.get("force", False):
372
+ cargs.append("-force")
373
+ if params.get("nthreads", None) is not None:
374
+ cargs.extend([
375
+ "-nthreads",
376
+ str(params.get("nthreads", None))
377
+ ])
378
+ if params.get("config", None) is not None:
379
+ cargs.extend([a for c in [dcminfo_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
380
+ if params.get("help", False):
381
+ cargs.append("-help")
382
+ if params.get("version", False):
383
+ cargs.append("-version")
384
+ cargs.append(execution.input_file(params.get("file", None)))
385
+ return cargs
386
+
387
+
388
+ def dcminfo_outputs(
389
+ params: DcminfoParamsDict,
390
+ execution: Execution,
391
+ ) -> DcminfoOutputs:
392
+ """
393
+ Build outputs object containing output file paths and possibly stdout/stderr.
394
+
395
+ Args:
396
+ params: The parameters.
397
+ execution: The execution object for resolving input paths.
398
+ Returns:
399
+ Outputs object.
400
+ """
401
+ ret = DcminfoOutputs(
402
+ root=execution.output_file("."),
403
+ )
404
+ return ret
405
+
406
+
407
+ def dcminfo_execute(
408
+ params: DcminfoParamsDict,
409
+ runner: Runner | None = None,
410
+ ) -> DcminfoOutputs:
411
+ """
412
+ dcminfo
413
+
414
+ Output DICOM fields in human-readable format.
415
+
416
+
417
+
418
+ References:
419
+
420
+ .
421
+
422
+ Author: MRTrix3 Developers
423
+
424
+ URL: https://www.mrtrix.org/
425
+
426
+ Args:
427
+ params: The parameters.
428
+ runner: Command runner.
429
+ Returns:
430
+ NamedTuple of outputs (described in `DcminfoOutputs`).
431
+ """
432
+ dcminfo_validate(params)
433
+ runner = runner or get_global_runner()
434
+ execution = runner.start_execution(DCMINFO_METADATA)
435
+ params = execution.params(params)
436
+ cargs = dcminfo_cargs(params, execution)
437
+ ret = dcminfo_outputs(params, execution)
438
+ execution.run(cargs)
439
+ return ret
440
+
441
+
442
+ def dcminfo(
443
+ file: InputPathType,
444
+ all_: bool = False,
445
+ csa: bool = False,
446
+ phoenix: bool = False,
447
+ tag: list[DcminfoTagParamsDict] | None = None,
448
+ info: bool = False,
449
+ quiet: bool = False,
450
+ debug: bool = False,
451
+ force: bool = False,
452
+ nthreads: int | None = None,
453
+ config: list[DcminfoConfigParamsDict] | None = None,
454
+ help_: bool = False,
455
+ version: bool = False,
456
+ runner: Runner | None = None,
457
+ ) -> DcminfoOutputs:
458
+ """
459
+ dcminfo
460
+
461
+ Output DICOM fields in human-readable format.
462
+
463
+
464
+
465
+ References:
466
+
467
+ .
468
+
469
+ Author: MRTrix3 Developers
470
+
471
+ URL: https://www.mrtrix.org/
472
+
473
+ Args:
474
+ file: the DICOM file to be scanned.
475
+ all_: print all DICOM fields.
476
+ csa: print all Siemens CSA fields (excluding Phoenix unless requested).
477
+ phoenix: print Siemens Phoenix protocol information.
478
+ tag: print field specified by the group & element tags supplied. Tags\
479
+ should be supplied as Hexadecimal (i.e. as they appear in the -all\
480
+ listing).
481
+ info: display information messages.
482
+ quiet: do not display information messages or progress status;\
483
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
484
+ environment variable to a non-empty string.
485
+ debug: display debugging messages.
486
+ force: force overwrite of output files (caution: using the same file as\
487
+ input and output might cause unexpected behaviour).
488
+ nthreads: use this number of threads in multi-threaded applications\
489
+ (set to 0 to disable multi-threading).
490
+ config: temporarily set the value of an MRtrix config file entry.
491
+ help_: display this information page and exit.
492
+ version: display version information and exit.
493
+ runner: Command runner.
494
+ Returns:
495
+ NamedTuple of outputs (described in `DcminfoOutputs`).
496
+ """
497
+ params = dcminfo_params(
498
+ all_=all_,
499
+ csa=csa,
500
+ phoenix=phoenix,
501
+ tag=tag,
502
+ info=info,
503
+ quiet=quiet,
504
+ debug=debug,
505
+ force=force,
506
+ nthreads=nthreads,
507
+ config=config,
508
+ help_=help_,
509
+ version=version,
510
+ file=file,
511
+ )
512
+ return dcminfo_execute(params, runner)
513
+
514
+
515
+ __all__ = [
516
+ "DCMINFO_METADATA",
517
+ "DcminfoConfigParamsDict",
518
+ "DcminfoConfigParamsDictTagged",
519
+ "DcminfoOutputs",
520
+ "DcminfoParamsDict",
521
+ "DcminfoParamsDictTagged",
522
+ "DcminfoTagParamsDict",
523
+ "DcminfoTagParamsDictTagged",
524
+ "dcminfo",
525
+ "dcminfo_config",
526
+ "dcminfo_execute",
527
+ "dcminfo_params",
528
+ "dcminfo_tag",
529
+ ]