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.

Files changed (119) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +130 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
  3. niwrap_mrtrix/mrtrix/amp2response.py +453 -0
  4. niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
  7. niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
  8. niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
  9. niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
  10. niwrap_mrtrix/mrtrix/dirflip.py +362 -0
  11. niwrap_mrtrix/mrtrix/dirgen.py +423 -0
  12. niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
  13. niwrap_mrtrix/mrtrix/dirorder.py +347 -0
  14. niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
  15. niwrap_mrtrix/mrtrix/dirstat.py +530 -0
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
  19. niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
  23. niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
  36. niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
  38. niwrap_mrtrix/mrtrix/label2colour.py +351 -0
  39. niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
  40. niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
  41. niwrap_mrtrix/mrtrix/labelstats.py +344 -0
  42. niwrap_mrtrix/mrtrix/maskdump.py +336 -0
  43. niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
  45. niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
  46. niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
  48. niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
  49. niwrap_mrtrix/mrtrix/mrcat.py +382 -0
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
  53. niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
  54. niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
  56. niwrap_mrtrix/mrtrix/mrdump.py +351 -0
  57. niwrap_mrtrix/mrtrix/mredit.py +546 -0
  58. niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
  59. niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
  62. niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
  63. niwrap_mrtrix/mrtrix/mrmath.py +413 -0
  64. niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
  65. niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
  66. niwrap_mrtrix/mrtrix/mrstats.py +427 -0
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
  68. niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
  72. niwrap_mrtrix/mrtrix/responsemean.py +316 -0
  73. niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
  75. niwrap_mrtrix/mrtrix/sh2power.py +353 -0
  76. niwrap_mrtrix/mrtrix/sh2response.py +394 -0
  77. niwrap_mrtrix/mrtrix/shbasis.py +373 -0
  78. niwrap_mrtrix/mrtrix/shconv.py +498 -0
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
  81. niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
  82. niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
  83. niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
  84. niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
  85. niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
  86. niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
  87. niwrap_mrtrix/mrtrix/tckmap.py +772 -0
  88. niwrap_mrtrix/mrtrix/tckresample.py +580 -0
  89. niwrap_mrtrix/mrtrix/tcksample.py +404 -0
  90. niwrap_mrtrix/mrtrix/tcksift.py +592 -0
  91. niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
  92. niwrap_mrtrix/mrtrix/tckstats.py +441 -0
  93. niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
  95. niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
  96. niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
  97. niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
  100. niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
  109. niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
  112. niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
  113. niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
  115. niwrap_mrtrix/mrtrix/warpinit.py +356 -0
  116. niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
  117. niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,403 @@
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="82971ece0a248809e6ac4741b981b24094fbed5d.boutiques",
10
+ name="mrhistmatch",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ MrhistmatchConfigParameters = typing.TypedDict('MrhistmatchConfigParameters', {
17
+ "__STYX_TYPE__": typing.Literal["config"],
18
+ "key": str,
19
+ "value": str,
20
+ })
21
+
22
+
23
+ MrhistmatchParameters = typing.TypedDict('MrhistmatchParameters', {
24
+ "__STYX_TYPE__": typing.Literal["mrhistmatch"],
25
+ "mask_input": typing.NotRequired[InputPathType | None],
26
+ "mask_target": typing.NotRequired[InputPathType | None],
27
+ "bins": typing.NotRequired[int | None],
28
+ "info": bool,
29
+ "quiet": bool,
30
+ "debug": bool,
31
+ "force": bool,
32
+ "nthreads": typing.NotRequired[int | None],
33
+ "config": typing.NotRequired[list[MrhistmatchConfigParameters] | None],
34
+ "help": bool,
35
+ "version": bool,
36
+ "type": str,
37
+ "input": InputPathType,
38
+ "target": InputPathType,
39
+ "output": 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
+ "mrhistmatch": mrhistmatch_cargs,
56
+ "config": mrhistmatch_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
+ "mrhistmatch": mrhistmatch_outputs,
73
+ }.get(t)
74
+
75
+
76
+ def mrhistmatch_config_params(
77
+ key: str,
78
+ value: str,
79
+ ) -> MrhistmatchConfigParameters:
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 mrhistmatch_config_cargs(
98
+ params: MrhistmatchConfigParameters,
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 MrhistmatchOutputs(typing.NamedTuple):
118
+ """
119
+ Output object returned when calling `mrhistmatch(...)`.
120
+ """
121
+ root: OutputPathType
122
+ """Output root folder. This is the root folder for all outputs."""
123
+ output: OutputPathType
124
+ """the output image"""
125
+
126
+
127
+ def mrhistmatch_params(
128
+ type_: str,
129
+ input_: InputPathType,
130
+ target: InputPathType,
131
+ output: str,
132
+ mask_input: InputPathType | None = None,
133
+ mask_target: InputPathType | None = None,
134
+ bins: int | 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[MrhistmatchConfigParameters] | None = None,
141
+ help_: bool = False,
142
+ version: bool = False,
143
+ ) -> MrhistmatchParameters:
144
+ """
145
+ Build parameters.
146
+
147
+ Args:
148
+ type_: type of histogram matching to perform; options are:\
149
+ scale,linear,nonlinear.
150
+ input_: the input image to be modified.
151
+ target: the input image from which to derive the target histogram.
152
+ output: the output image.
153
+ mask_input: only generate input histogram based on a specified binary\
154
+ mask image.
155
+ mask_target: only generate target histogram based on a specified binary\
156
+ mask image.
157
+ bins: the number of bins to use to generate the histograms.
158
+ info: display information messages.
159
+ quiet: do not display information messages or progress status;\
160
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
161
+ environment variable to a non-empty string.
162
+ debug: display debugging messages.
163
+ force: force overwrite of output files (caution: using the same file as\
164
+ input and output might cause unexpected behaviour).
165
+ nthreads: use this number of threads in multi-threaded applications\
166
+ (set to 0 to disable multi-threading).
167
+ config: temporarily set the value of an MRtrix config file entry.
168
+ help_: display this information page and exit.
169
+ version: display version information and exit.
170
+ Returns:
171
+ Parameter dictionary
172
+ """
173
+ params = {
174
+ "__STYXTYPE__": "mrhistmatch",
175
+ "info": info,
176
+ "quiet": quiet,
177
+ "debug": debug,
178
+ "force": force,
179
+ "help": help_,
180
+ "version": version,
181
+ "type": type_,
182
+ "input": input_,
183
+ "target": target,
184
+ "output": output,
185
+ }
186
+ if mask_input is not None:
187
+ params["mask_input"] = mask_input
188
+ if mask_target is not None:
189
+ params["mask_target"] = mask_target
190
+ if bins is not None:
191
+ params["bins"] = bins
192
+ if nthreads is not None:
193
+ params["nthreads"] = nthreads
194
+ if config is not None:
195
+ params["config"] = config
196
+ return params
197
+
198
+
199
+ def mrhistmatch_cargs(
200
+ params: MrhistmatchParameters,
201
+ execution: Execution,
202
+ ) -> list[str]:
203
+ """
204
+ Build command-line arguments from parameters.
205
+
206
+ Args:
207
+ params: The parameters.
208
+ execution: The execution object for resolving input paths.
209
+ Returns:
210
+ Command-line arguments.
211
+ """
212
+ cargs = []
213
+ cargs.append("mrhistmatch")
214
+ if params.get("mask_input") is not None:
215
+ cargs.extend([
216
+ "-mask_input",
217
+ execution.input_file(params.get("mask_input"))
218
+ ])
219
+ if params.get("mask_target") is not None:
220
+ cargs.extend([
221
+ "-mask_target",
222
+ execution.input_file(params.get("mask_target"))
223
+ ])
224
+ if params.get("bins") is not None:
225
+ cargs.extend([
226
+ "-bins",
227
+ str(params.get("bins"))
228
+ ])
229
+ if params.get("info"):
230
+ cargs.append("-info")
231
+ if params.get("quiet"):
232
+ cargs.append("-quiet")
233
+ if params.get("debug"):
234
+ cargs.append("-debug")
235
+ if params.get("force"):
236
+ cargs.append("-force")
237
+ if params.get("nthreads") is not None:
238
+ cargs.extend([
239
+ "-nthreads",
240
+ str(params.get("nthreads"))
241
+ ])
242
+ if params.get("config") is not None:
243
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
244
+ if params.get("help"):
245
+ cargs.append("-help")
246
+ if params.get("version"):
247
+ cargs.append("-version")
248
+ cargs.append(params.get("type"))
249
+ cargs.append(execution.input_file(params.get("input")))
250
+ cargs.append(execution.input_file(params.get("target")))
251
+ cargs.append(params.get("output"))
252
+ return cargs
253
+
254
+
255
+ def mrhistmatch_outputs(
256
+ params: MrhistmatchParameters,
257
+ execution: Execution,
258
+ ) -> MrhistmatchOutputs:
259
+ """
260
+ Build outputs object containing output file paths and possibly stdout/stderr.
261
+
262
+ Args:
263
+ params: The parameters.
264
+ execution: The execution object for resolving input paths.
265
+ Returns:
266
+ Outputs object.
267
+ """
268
+ ret = MrhistmatchOutputs(
269
+ root=execution.output_file("."),
270
+ output=execution.output_file(params.get("output")),
271
+ )
272
+ return ret
273
+
274
+
275
+ def mrhistmatch_execute(
276
+ params: MrhistmatchParameters,
277
+ execution: Execution,
278
+ ) -> MrhistmatchOutputs:
279
+ """
280
+ Modify the intensities of one image to match the histogram of another.
281
+
282
+
283
+
284
+ References:
285
+
286
+ * If using inverse contrast normalization for inter-modal (DWI - T1)
287
+ registration:
288
+ Bhushan, C.; Haldar, J. P.; Choi, S.; Joshi, A. A.; Shattuck, D. W. & Leahy,
289
+ R. M. Co-registration and distortion correction of diffusion and anatomical
290
+ images based on inverse contrast normalization. NeuroImage, 2015, 115,
291
+ 269-280.
292
+
293
+ Author: MRTrix3 Developers
294
+
295
+ URL: https://www.mrtrix.org/
296
+
297
+ Args:
298
+ params: The parameters.
299
+ execution: The execution object.
300
+ Returns:
301
+ NamedTuple of outputs (described in `MrhistmatchOutputs`).
302
+ """
303
+ params = execution.params(params)
304
+ cargs = mrhistmatch_cargs(params, execution)
305
+ ret = mrhistmatch_outputs(params, execution)
306
+ execution.run(cargs)
307
+ return ret
308
+
309
+
310
+ def mrhistmatch(
311
+ type_: str,
312
+ input_: InputPathType,
313
+ target: InputPathType,
314
+ output: str,
315
+ mask_input: InputPathType | None = None,
316
+ mask_target: InputPathType | None = None,
317
+ bins: int | None = None,
318
+ info: bool = False,
319
+ quiet: bool = False,
320
+ debug: bool = False,
321
+ force: bool = False,
322
+ nthreads: int | None = None,
323
+ config: list[MrhistmatchConfigParameters] | None = None,
324
+ help_: bool = False,
325
+ version: bool = False,
326
+ runner: Runner | None = None,
327
+ ) -> MrhistmatchOutputs:
328
+ """
329
+ Modify the intensities of one image to match the histogram of another.
330
+
331
+
332
+
333
+ References:
334
+
335
+ * If using inverse contrast normalization for inter-modal (DWI - T1)
336
+ registration:
337
+ Bhushan, C.; Haldar, J. P.; Choi, S.; Joshi, A. A.; Shattuck, D. W. & Leahy,
338
+ R. M. Co-registration and distortion correction of diffusion and anatomical
339
+ images based on inverse contrast normalization. NeuroImage, 2015, 115,
340
+ 269-280.
341
+
342
+ Author: MRTrix3 Developers
343
+
344
+ URL: https://www.mrtrix.org/
345
+
346
+ Args:
347
+ type_: type of histogram matching to perform; options are:\
348
+ scale,linear,nonlinear.
349
+ input_: the input image to be modified.
350
+ target: the input image from which to derive the target histogram.
351
+ output: the output image.
352
+ mask_input: only generate input histogram based on a specified binary\
353
+ mask image.
354
+ mask_target: only generate target histogram based on a specified binary\
355
+ mask image.
356
+ bins: the number of bins to use to generate the histograms.
357
+ info: display information messages.
358
+ quiet: do not display information messages or progress status;\
359
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
360
+ environment variable to a non-empty string.
361
+ debug: display debugging messages.
362
+ force: force overwrite of output files (caution: using the same file as\
363
+ input and output might cause unexpected behaviour).
364
+ nthreads: use this number of threads in multi-threaded applications\
365
+ (set to 0 to disable multi-threading).
366
+ config: temporarily set the value of an MRtrix config file entry.
367
+ help_: display this information page and exit.
368
+ version: display version information and exit.
369
+ runner: Command runner.
370
+ Returns:
371
+ NamedTuple of outputs (described in `MrhistmatchOutputs`).
372
+ """
373
+ runner = runner or get_global_runner()
374
+ execution = runner.start_execution(MRHISTMATCH_METADATA)
375
+ params = mrhistmatch_params(
376
+ mask_input=mask_input,
377
+ mask_target=mask_target,
378
+ bins=bins,
379
+ info=info,
380
+ quiet=quiet,
381
+ debug=debug,
382
+ force=force,
383
+ nthreads=nthreads,
384
+ config=config,
385
+ help_=help_,
386
+ version=version,
387
+ type_=type_,
388
+ input_=input_,
389
+ target=target,
390
+ output=output,
391
+ )
392
+ return mrhistmatch_execute(params, execution)
393
+
394
+
395
+ __all__ = [
396
+ "MRHISTMATCH_METADATA",
397
+ "MrhistmatchConfigParameters",
398
+ "MrhistmatchOutputs",
399
+ "MrhistmatchParameters",
400
+ "mrhistmatch",
401
+ "mrhistmatch_config_params",
402
+ "mrhistmatch_params",
403
+ ]