niwrap-freesurfer 0.5.1__py3-none-any.whl → 0.5.2__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-freesurfer might be problematic. Click here for more details.

Files changed (153) hide show
  1. niwrap_freesurfer/freesurfer/__init__.py +0 -11
  2. niwrap_freesurfer/freesurfer/annot2std.py +32 -1
  3. niwrap_freesurfer/freesurfer/aparc2feat.py +19 -1
  4. niwrap_freesurfer/freesurfer/bbregister.py +143 -4
  5. niwrap_freesurfer/freesurfer/bmedits2surf.py +2 -2
  6. niwrap_freesurfer/freesurfer/compute_interrater_variability_csh.py +20 -2
  7. niwrap_freesurfer/freesurfer/compute_label_volumes_csh.py +17 -2
  8. niwrap_freesurfer/freesurfer/conf2hires.py +59 -1
  9. niwrap_freesurfer/freesurfer/connected_components.py +34 -2
  10. niwrap_freesurfer/freesurfer/dcmdir_info_mgh.py +3 -2
  11. niwrap_freesurfer/freesurfer/dcmdjpeg_fs.py +2 -2
  12. niwrap_freesurfer/freesurfer/dcmdrle_fs.py +2 -2
  13. niwrap_freesurfer/freesurfer/dicom_rename.py +21 -2
  14. niwrap_freesurfer/freesurfer/dmri_bset.py +14 -2
  15. niwrap_freesurfer/freesurfer/dmri_forrest.py +10 -1
  16. niwrap_freesurfer/freesurfer/dmri_mergepaths.py +2 -2
  17. niwrap_freesurfer/freesurfer/dmri_pathstats.py +2 -2
  18. niwrap_freesurfer/freesurfer/dmri_stats_ac.py +1 -3
  19. niwrap_freesurfer/freesurfer/exvivo_hemi_proc.py +10 -1
  20. niwrap_freesurfer/freesurfer/fiducials_calibration.py +15 -1
  21. niwrap_freesurfer/freesurfer/fiducials_correction.py +10 -3
  22. niwrap_freesurfer/freesurfer/fix_subject_corrected_rh.py +3 -2
  23. niwrap_freesurfer/freesurfer/fix_subject_rh.py +3 -2
  24. niwrap_freesurfer/freesurfer/fs_check_version.py +19 -1
  25. niwrap_freesurfer/freesurfer/fs_spmreg_glnxa64.py +19 -4
  26. niwrap_freesurfer/freesurfer/fs_temp_file.py +36 -1
  27. niwrap_freesurfer/freesurfer/fs_update.py +19 -1
  28. niwrap_freesurfer/freesurfer/fsl_sub_mgh.py +1 -2
  29. niwrap_freesurfer/freesurfer/fsr_import.py +55 -5
  30. niwrap_freesurfer/freesurfer/fvcompare.py +10 -1
  31. niwrap_freesurfer/freesurfer/gca_apply.py +3 -2
  32. niwrap_freesurfer/freesurfer/gdcmconv_fs.py +2 -2
  33. niwrap_freesurfer/freesurfer/get_label_thickness.py +1 -2
  34. niwrap_freesurfer/freesurfer/groupstats.py +97 -1
  35. niwrap_freesurfer/freesurfer/groupstatsdiff.py +4 -4
  36. niwrap_freesurfer/freesurfer/hiam_make_surfaces.py +1 -2
  37. niwrap_freesurfer/freesurfer/histo_synthesize.py +1 -2
  38. niwrap_freesurfer/freesurfer/inflate_subject_lh.py +3 -2
  39. niwrap_freesurfer/freesurfer/inflate_subject_new_lh.py +3 -3
  40. niwrap_freesurfer/freesurfer/inflate_subject_new_rh.py +3 -2
  41. niwrap_freesurfer/freesurfer/inflate_subject_rh.py +3 -2
  42. niwrap_freesurfer/freesurfer/inflate_subject_sc.py +28 -3
  43. niwrap_freesurfer/freesurfer/irepifitvol_glnx64.py +2 -2
  44. niwrap_freesurfer/freesurfer/is_surface.py +3 -2
  45. niwrap_freesurfer/freesurfer/isolate_labels_csh.py +17 -2
  46. niwrap_freesurfer/freesurfer/label_subject_flash.py +2 -2
  47. niwrap_freesurfer/freesurfer/label_subject_mixed.py +2 -2
  48. niwrap_freesurfer/freesurfer/listsubj.py +82 -2
  49. niwrap_freesurfer/freesurfer/long_stats_combine.py +1 -2
  50. niwrap_freesurfer/freesurfer/long_stats_tps.py +7 -7
  51. niwrap_freesurfer/freesurfer/long_submit_jobs.py +1 -5
  52. niwrap_freesurfer/freesurfer/longmc.py +10 -1
  53. niwrap_freesurfer/freesurfer/lta_convert.py +157 -1
  54. niwrap_freesurfer/freesurfer/make_average_volume.py +19 -1
  55. niwrap_freesurfer/freesurfer/make_folding_atlas.py +10 -1
  56. niwrap_freesurfer/freesurfer/map_all_labels_lh.py +11 -3
  57. niwrap_freesurfer/freesurfer/map_central_sulcus.py +2 -2
  58. niwrap_freesurfer/freesurfer/merge_stats_tables.py +58 -35
  59. niwrap_freesurfer/freesurfer/mideface.py +121 -14
  60. niwrap_freesurfer/freesurfer/mni152reg.py +2 -2
  61. niwrap_freesurfer/freesurfer/morph_only_subject_lh.py +3 -2
  62. niwrap_freesurfer/freesurfer/morph_only_subject_rh.py +3 -2
  63. niwrap_freesurfer/freesurfer/morph_rgb_lh.py +3 -2
  64. niwrap_freesurfer/freesurfer/morph_rgb_rh.py +3 -2
  65. niwrap_freesurfer/freesurfer/morph_subject_lh.py +3 -2
  66. niwrap_freesurfer/freesurfer/morph_subject_rh.py +3 -2
  67. niwrap_freesurfer/freesurfer/morph_tables_lh.py +3 -2
  68. niwrap_freesurfer/freesurfer/morph_tables_rh.py +3 -2
  69. niwrap_freesurfer/freesurfer/mri_aparc2aseg.py +10 -1
  70. niwrap_freesurfer/freesurfer/mri_apply_bias.py +1 -2
  71. niwrap_freesurfer/freesurfer/mri_average.py +10 -1
  72. niwrap_freesurfer/freesurfer/mri_brain_volume.py +23 -2
  73. niwrap_freesurfer/freesurfer/mri_ca_label.py +603 -2
  74. niwrap_freesurfer/freesurfer/mri_ca_train.py +10 -1
  75. niwrap_freesurfer/freesurfer/mri_convert.py +188 -2
  76. niwrap_freesurfer/freesurfer/mri_fuse_segmentations.py +10 -3
  77. niwrap_freesurfer/freesurfer/mri_gcab_train.py +15 -1
  78. niwrap_freesurfer/freesurfer/mri_gdfglm.py +13 -1
  79. niwrap_freesurfer/freesurfer/mri_gtmpvc.py +19 -1
  80. niwrap_freesurfer/freesurfer/mri_hausdorff_dist.py +1 -2
  81. niwrap_freesurfer/freesurfer/mri_head.py +19 -1
  82. niwrap_freesurfer/freesurfer/mri_jacobian.py +10 -1
  83. niwrap_freesurfer/freesurfer/mri_nl_align.py +27 -1
  84. niwrap_freesurfer/freesurfer/mri_relabel_nonwm_hypos.py +3 -3
  85. niwrap_freesurfer/freesurfer/mri_reorient_lr_csh.py +2 -2
  86. niwrap_freesurfer/freesurfer/mri_seg_diff.py +14 -1
  87. niwrap_freesurfer/freesurfer/mri_twoclass.py +1 -2
  88. niwrap_freesurfer/freesurfer/mri_validate_skull_stripped.py +2 -2
  89. niwrap_freesurfer/freesurfer/mri_warp_convert.py +131 -1
  90. niwrap_freesurfer/freesurfer/mri_z2p.py +37 -1
  91. niwrap_freesurfer/freesurfer/mris_add_template.py +11 -1
  92. niwrap_freesurfer/freesurfer/mris_apply_reg.py +1 -2
  93. niwrap_freesurfer/freesurfer/mris_curvature_stats.py +419 -7
  94. niwrap_freesurfer/freesurfer/mris_diff.py +255 -1
  95. niwrap_freesurfer/freesurfer/mris_distance_map.py +1 -2
  96. niwrap_freesurfer/freesurfer/mris_errors.py +1 -2
  97. niwrap_freesurfer/freesurfer/mris_info.py +45 -46
  98. niwrap_freesurfer/freesurfer/mris_label_calc.py +14 -1
  99. niwrap_freesurfer/freesurfer/mris_map_cuts.py +1 -2
  100. niwrap_freesurfer/freesurfer/mris_nudge.py +1 -2
  101. niwrap_freesurfer/freesurfer/mris_place_surface.py +1 -2
  102. niwrap_freesurfer/freesurfer/mris_preproc.py +16 -2
  103. niwrap_freesurfer/freesurfer/mris_spherical_average.py +93 -8
  104. niwrap_freesurfer/freesurfer/mris_thickness_diff.py +1 -5
  105. niwrap_freesurfer/freesurfer/mris_volmask_vtk.py +2 -2
  106. niwrap_freesurfer/freesurfer/pctsurfcon.py +2 -2
  107. niwrap_freesurfer/freesurfer/plot_structure_stats_tcl.py +2 -2
  108. niwrap_freesurfer/freesurfer/post_recon_all.py +39 -2
  109. niwrap_freesurfer/freesurfer/predict_v1_sh.py +11 -2
  110. niwrap_freesurfer/freesurfer/print_unique_labels_csh.py +34 -3
  111. niwrap_freesurfer/freesurfer/rbbr.py +37 -1
  112. niwrap_freesurfer/freesurfer/rca_base_init.py +3 -2
  113. niwrap_freesurfer/freesurfer/rca_config.py +3 -2
  114. niwrap_freesurfer/freesurfer/rca_config2csh.py +3 -2
  115. niwrap_freesurfer/freesurfer/recon_all.py +75 -1
  116. niwrap_freesurfer/freesurfer/register_elderly_subject.py +2 -2
  117. niwrap_freesurfer/freesurfer/reinflate_subject_lh.py +3 -2
  118. niwrap_freesurfer/freesurfer/reinflate_subject_rh.py +3 -2
  119. niwrap_freesurfer/freesurfer/renormalize_subject_keep_editting.py +13 -1
  120. niwrap_freesurfer/freesurfer/rtview.py +34 -1
  121. niwrap_freesurfer/freesurfer/run_qdec_glm.py +3 -2
  122. niwrap_freesurfer/freesurfer/samseg.py +14 -1
  123. niwrap_freesurfer/freesurfer/samseg_long.py +17 -8
  124. niwrap_freesurfer/freesurfer/samsegmesh2surf.py +5 -7
  125. niwrap_freesurfer/freesurfer/seg2filled.py +4 -4
  126. niwrap_freesurfer/freesurfer/segment_subject.py +2 -2
  127. niwrap_freesurfer/freesurfer/segment_subject_old_skull_strip.py +4 -4
  128. niwrap_freesurfer/freesurfer/segment_subject_sc.py +4 -4
  129. niwrap_freesurfer/freesurfer/segment_subject_t2_auto_estimate_alveus_ml.py +11 -1
  130. niwrap_freesurfer/freesurfer/segpons.py +2 -2
  131. niwrap_freesurfer/freesurfer/sphere_subject_lh.py +3 -2
  132. niwrap_freesurfer/freesurfer/sphere_subject_rh.py +3 -2
  133. niwrap_freesurfer/freesurfer/talairach.py +4 -4
  134. niwrap_freesurfer/freesurfer/trac_all.py +283 -1
  135. niwrap_freesurfer/freesurfer/train_gcs_atlas.py +19 -1
  136. niwrap_freesurfer/freesurfer/update_needed.py +13 -2
  137. niwrap_freesurfer/freesurfer/vertexvol.py +19 -1
  138. niwrap_freesurfer/freesurfer/vol2subfield.py +72 -1
  139. niwrap_freesurfer/freesurfer/wmsaseg.py +2 -2
  140. {niwrap_freesurfer-0.5.1.dist-info → niwrap_freesurfer-0.5.2.dist-info}/METADATA +1 -1
  141. {niwrap_freesurfer-0.5.1.dist-info → niwrap_freesurfer-0.5.2.dist-info}/RECORD +142 -153
  142. niwrap_freesurfer/freesurfer/bet_fsl.py +0 -441
  143. niwrap_freesurfer/freesurfer/epidewarp_fsl.py +0 -439
  144. niwrap_freesurfer/freesurfer/flirt_fsl.py +0 -604
  145. niwrap_freesurfer/freesurfer/fscalc_fsl.py +0 -196
  146. niwrap_freesurfer/freesurfer/fsfirst_fsl.py +0 -166
  147. niwrap_freesurfer/freesurfer/fslmaths_fsl.py +0 -196
  148. niwrap_freesurfer/freesurfer/fslorient_fsl.py +0 -207
  149. niwrap_freesurfer/freesurfer/fslswapdim_fsl.py +0 -216
  150. niwrap_freesurfer/freesurfer/fspython.py +0 -175
  151. niwrap_freesurfer/freesurfer/mri_motion_correct_fsl.py +0 -185
  152. niwrap_freesurfer/freesurfer/slicetimer_fsl.py +0 -291
  153. {niwrap_freesurfer-0.5.1.dist-info → niwrap_freesurfer-0.5.2.dist-info}/WHEEL +0 -0
@@ -1,196 +0,0 @@
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
- FSCALC_FSL_METADATA = Metadata(
9
- id="a318448c0ae9ee2486a72de6136c2f2bdab8a57e.boutiques",
10
- name="fscalc.fsl",
11
- package="freesurfer",
12
- container_image_tag="freesurfer/freesurfer:7.4.1",
13
- )
14
-
15
-
16
- FscalcFslParameters = typing.TypedDict('FscalcFslParameters', {
17
- "__STYX_TYPE__": typing.Literal["fscalc.fsl"],
18
- "input_file": InputPathType,
19
- "output_file": str,
20
- "additional_options": typing.NotRequired[str | None],
21
- })
22
-
23
-
24
- def dyn_cargs(
25
- t: str,
26
- ) -> typing.Any:
27
- """
28
- Get build cargs function by command type.
29
-
30
- Args:
31
- t: Command type.
32
- Returns:
33
- Build cargs function.
34
- """
35
- return {
36
- "fscalc.fsl": fscalc_fsl_cargs,
37
- }.get(t)
38
-
39
-
40
- def dyn_outputs(
41
- t: str,
42
- ) -> typing.Any:
43
- """
44
- Get build outputs function by command type.
45
-
46
- Args:
47
- t: Command type.
48
- Returns:
49
- Build outputs function.
50
- """
51
- return {
52
- "fscalc.fsl": fscalc_fsl_outputs,
53
- }.get(t)
54
-
55
-
56
- class FscalcFslOutputs(typing.NamedTuple):
57
- """
58
- Output object returned when calling `fscalc_fsl(...)`.
59
- """
60
- root: OutputPathType
61
- """Output root folder. This is the root folder for all outputs."""
62
- output_file: OutputPathType
63
- """Output file"""
64
-
65
-
66
- def fscalc_fsl_params(
67
- input_file: InputPathType,
68
- output_file: str,
69
- additional_options: str | None = None,
70
- ) -> FscalcFslParameters:
71
- """
72
- Build parameters.
73
-
74
- Args:
75
- input_file: Input image file readable by Freesurfer.
76
- output_file: Output image file writable by Freesurfer.
77
- additional_options: Additional fslmaths-specific options.
78
- Returns:
79
- Parameter dictionary
80
- """
81
- params = {
82
- "__STYXTYPE__": "fscalc.fsl",
83
- "input_file": input_file,
84
- "output_file": output_file,
85
- }
86
- if additional_options is not None:
87
- params["additional_options"] = additional_options
88
- return params
89
-
90
-
91
- def fscalc_fsl_cargs(
92
- params: FscalcFslParameters,
93
- execution: Execution,
94
- ) -> list[str]:
95
- """
96
- Build command-line arguments from parameters.
97
-
98
- Args:
99
- params: The parameters.
100
- execution: The execution object for resolving input paths.
101
- Returns:
102
- Command-line arguments.
103
- """
104
- cargs = []
105
- cargs.append("fscalc.fsl")
106
- cargs.append(execution.input_file(params.get("input_file")))
107
- cargs.append(params.get("output_file"))
108
- if params.get("additional_options") is not None:
109
- cargs.append(params.get("additional_options"))
110
- return cargs
111
-
112
-
113
- def fscalc_fsl_outputs(
114
- params: FscalcFslParameters,
115
- execution: Execution,
116
- ) -> FscalcFslOutputs:
117
- """
118
- Build outputs object containing output file paths and possibly stdout/stderr.
119
-
120
- Args:
121
- params: The parameters.
122
- execution: The execution object for resolving input paths.
123
- Returns:
124
- Outputs object.
125
- """
126
- ret = FscalcFslOutputs(
127
- root=execution.output_file("."),
128
- output_file=execution.output_file(params.get("output_file")),
129
- )
130
- return ret
131
-
132
-
133
- def fscalc_fsl_execute(
134
- params: FscalcFslParameters,
135
- execution: Execution,
136
- ) -> FscalcFslOutputs:
137
- """
138
- A Freesurfer wrapper around fslmaths, allowing input and output formats
139
- compatible with Freesurfer.
140
-
141
- Author: FreeSurfer Developers
142
-
143
- URL: https://github.com/freesurfer/freesurfer
144
-
145
- Args:
146
- params: The parameters.
147
- execution: The execution object.
148
- Returns:
149
- NamedTuple of outputs (described in `FscalcFslOutputs`).
150
- """
151
- params = execution.params(params)
152
- cargs = fscalc_fsl_cargs(params, execution)
153
- ret = fscalc_fsl_outputs(params, execution)
154
- execution.run(cargs)
155
- return ret
156
-
157
-
158
- def fscalc_fsl(
159
- input_file: InputPathType,
160
- output_file: str,
161
- additional_options: str | None = None,
162
- runner: Runner | None = None,
163
- ) -> FscalcFslOutputs:
164
- """
165
- A Freesurfer wrapper around fslmaths, allowing input and output formats
166
- compatible with Freesurfer.
167
-
168
- Author: FreeSurfer Developers
169
-
170
- URL: https://github.com/freesurfer/freesurfer
171
-
172
- Args:
173
- input_file: Input image file readable by Freesurfer.
174
- output_file: Output image file writable by Freesurfer.
175
- additional_options: Additional fslmaths-specific options.
176
- runner: Command runner.
177
- Returns:
178
- NamedTuple of outputs (described in `FscalcFslOutputs`).
179
- """
180
- runner = runner or get_global_runner()
181
- execution = runner.start_execution(FSCALC_FSL_METADATA)
182
- params = fscalc_fsl_params(
183
- input_file=input_file,
184
- output_file=output_file,
185
- additional_options=additional_options,
186
- )
187
- return fscalc_fsl_execute(params, execution)
188
-
189
-
190
- __all__ = [
191
- "FSCALC_FSL_METADATA",
192
- "FscalcFslOutputs",
193
- "FscalcFslParameters",
194
- "fscalc_fsl",
195
- "fscalc_fsl_params",
196
- ]
@@ -1,166 +0,0 @@
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
- FSFIRST_FSL_METADATA = Metadata(
9
- id="fe4368d67f0bf44514ba8d3556dd0dd0df276d60.boutiques",
10
- name="fsfirst.fsl",
11
- package="freesurfer",
12
- container_image_tag="freesurfer/freesurfer:7.4.1",
13
- )
14
-
15
-
16
- FsfirstFslParameters = typing.TypedDict('FsfirstFslParameters', {
17
- "__STYX_TYPE__": typing.Literal["fsfirst.fsl"],
18
- })
19
-
20
-
21
- def dyn_cargs(
22
- t: str,
23
- ) -> typing.Any:
24
- """
25
- Get build cargs function by command type.
26
-
27
- Args:
28
- t: Command type.
29
- Returns:
30
- Build cargs function.
31
- """
32
- return {
33
- "fsfirst.fsl": fsfirst_fsl_cargs,
34
- }.get(t)
35
-
36
-
37
- def dyn_outputs(
38
- t: str,
39
- ) -> typing.Any:
40
- """
41
- Get build outputs function by command type.
42
-
43
- Args:
44
- t: Command type.
45
- Returns:
46
- Build outputs function.
47
- """
48
- return {
49
- }.get(t)
50
-
51
-
52
- class FsfirstFslOutputs(typing.NamedTuple):
53
- """
54
- Output object returned when calling `fsfirst_fsl(...)`.
55
- """
56
- root: OutputPathType
57
- """Output root folder. This is the root folder for all outputs."""
58
-
59
-
60
- def fsfirst_fsl_params(
61
- ) -> FsfirstFslParameters:
62
- """
63
- Build parameters.
64
-
65
- Args:
66
- Returns:
67
- Parameter dictionary
68
- """
69
- params = {
70
- "__STYXTYPE__": "fsfirst.fsl",
71
- }
72
- return params
73
-
74
-
75
- def fsfirst_fsl_cargs(
76
- params: FsfirstFslParameters,
77
- execution: Execution,
78
- ) -> list[str]:
79
- """
80
- Build command-line arguments from parameters.
81
-
82
- Args:
83
- params: The parameters.
84
- execution: The execution object for resolving input paths.
85
- Returns:
86
- Command-line arguments.
87
- """
88
- cargs = []
89
- cargs.append("fsfirst.fsl")
90
- return cargs
91
-
92
-
93
- def fsfirst_fsl_outputs(
94
- params: FsfirstFslParameters,
95
- execution: Execution,
96
- ) -> FsfirstFslOutputs:
97
- """
98
- Build outputs object containing output file paths and possibly stdout/stderr.
99
-
100
- Args:
101
- params: The parameters.
102
- execution: The execution object for resolving input paths.
103
- Returns:
104
- Outputs object.
105
- """
106
- ret = FsfirstFslOutputs(
107
- root=execution.output_file("."),
108
- )
109
- return ret
110
-
111
-
112
- def fsfirst_fsl_execute(
113
- params: FsfirstFslParameters,
114
- execution: Execution,
115
- ) -> FsfirstFslOutputs:
116
- """
117
- The tool intended for FSL's FIRST module, responsible for model-based
118
- segmentation and registration of subcortical structures.
119
-
120
- Author: FreeSurfer Developers
121
-
122
- URL: https://github.com/freesurfer/freesurfer
123
-
124
- Args:
125
- params: The parameters.
126
- execution: The execution object.
127
- Returns:
128
- NamedTuple of outputs (described in `FsfirstFslOutputs`).
129
- """
130
- params = execution.params(params)
131
- cargs = fsfirst_fsl_cargs(params, execution)
132
- ret = fsfirst_fsl_outputs(params, execution)
133
- execution.run(cargs)
134
- return ret
135
-
136
-
137
- def fsfirst_fsl(
138
- runner: Runner | None = None,
139
- ) -> FsfirstFslOutputs:
140
- """
141
- The tool intended for FSL's FIRST module, responsible for model-based
142
- segmentation and registration of subcortical structures.
143
-
144
- Author: FreeSurfer Developers
145
-
146
- URL: https://github.com/freesurfer/freesurfer
147
-
148
- Args:
149
- runner: Command runner.
150
- Returns:
151
- NamedTuple of outputs (described in `FsfirstFslOutputs`).
152
- """
153
- runner = runner or get_global_runner()
154
- execution = runner.start_execution(FSFIRST_FSL_METADATA)
155
- params = fsfirst_fsl_params(
156
- )
157
- return fsfirst_fsl_execute(params, execution)
158
-
159
-
160
- __all__ = [
161
- "FSFIRST_FSL_METADATA",
162
- "FsfirstFslOutputs",
163
- "FsfirstFslParameters",
164
- "fsfirst_fsl",
165
- "fsfirst_fsl_params",
166
- ]
@@ -1,196 +0,0 @@
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
- FSLMATHS_FSL_METADATA = Metadata(
9
- id="1ba348f3e9fa1acbe3b64d58f1387f609d1c083e.boutiques",
10
- name="fslmaths.fsl",
11
- package="freesurfer",
12
- container_image_tag="freesurfer/freesurfer:7.4.1",
13
- )
14
-
15
-
16
- FslmathsFslParameters = typing.TypedDict('FslmathsFslParameters', {
17
- "__STYX_TYPE__": typing.Literal["fslmaths.fsl"],
18
- "first_input": InputPathType,
19
- "operations_and_inputs": str,
20
- "output_image": str,
21
- })
22
-
23
-
24
- def dyn_cargs(
25
- t: str,
26
- ) -> typing.Any:
27
- """
28
- Get build cargs function by command type.
29
-
30
- Args:
31
- t: Command type.
32
- Returns:
33
- Build cargs function.
34
- """
35
- return {
36
- "fslmaths.fsl": fslmaths_fsl_cargs,
37
- }.get(t)
38
-
39
-
40
- def dyn_outputs(
41
- t: str,
42
- ) -> typing.Any:
43
- """
44
- Get build outputs function by command type.
45
-
46
- Args:
47
- t: Command type.
48
- Returns:
49
- Build outputs function.
50
- """
51
- return {
52
- "fslmaths.fsl": fslmaths_fsl_outputs,
53
- }.get(t)
54
-
55
-
56
- class FslmathsFslOutputs(typing.NamedTuple):
57
- """
58
- Output object returned when calling `fslmaths_fsl(...)`.
59
- """
60
- root: OutputPathType
61
- """Output root folder. This is the root folder for all outputs."""
62
- output_file: OutputPathType
63
- """The resultant output image after applying the specified operations."""
64
-
65
-
66
- def fslmaths_fsl_params(
67
- first_input: InputPathType,
68
- operations_and_inputs: str,
69
- output_image: str,
70
- ) -> FslmathsFslParameters:
71
- """
72
- Build parameters.
73
-
74
- Args:
75
- first_input: First input image for fslmaths operations.
76
- operations_and_inputs: Operations and inputs to be applied on the first\
77
- image.
78
- output_image: Output image file.
79
- Returns:
80
- Parameter dictionary
81
- """
82
- params = {
83
- "__STYXTYPE__": "fslmaths.fsl",
84
- "first_input": first_input,
85
- "operations_and_inputs": operations_and_inputs,
86
- "output_image": output_image,
87
- }
88
- return params
89
-
90
-
91
- def fslmaths_fsl_cargs(
92
- params: FslmathsFslParameters,
93
- execution: Execution,
94
- ) -> list[str]:
95
- """
96
- Build command-line arguments from parameters.
97
-
98
- Args:
99
- params: The parameters.
100
- execution: The execution object for resolving input paths.
101
- Returns:
102
- Command-line arguments.
103
- """
104
- cargs = []
105
- cargs.append("fslmaths")
106
- cargs.append(execution.input_file(params.get("first_input")))
107
- cargs.append(params.get("operations_and_inputs"))
108
- cargs.append(params.get("output_image"))
109
- return cargs
110
-
111
-
112
- def fslmaths_fsl_outputs(
113
- params: FslmathsFslParameters,
114
- execution: Execution,
115
- ) -> FslmathsFslOutputs:
116
- """
117
- Build outputs object containing output file paths and possibly stdout/stderr.
118
-
119
- Args:
120
- params: The parameters.
121
- execution: The execution object for resolving input paths.
122
- Returns:
123
- Outputs object.
124
- """
125
- ret = FslmathsFslOutputs(
126
- root=execution.output_file("."),
127
- output_file=execution.output_file(params.get("output_image") + ".nii.gz"),
128
- )
129
- return ret
130
-
131
-
132
- def fslmaths_fsl_execute(
133
- params: FslmathsFslParameters,
134
- execution: Execution,
135
- ) -> FslmathsFslOutputs:
136
- """
137
- FSLmaths: part of FMRIB Software Library (FSL) for manipulating images via
138
- various mathematical operations.
139
-
140
- Author: FreeSurfer Developers
141
-
142
- URL: https://github.com/freesurfer/freesurfer
143
-
144
- Args:
145
- params: The parameters.
146
- execution: The execution object.
147
- Returns:
148
- NamedTuple of outputs (described in `FslmathsFslOutputs`).
149
- """
150
- params = execution.params(params)
151
- cargs = fslmaths_fsl_cargs(params, execution)
152
- ret = fslmaths_fsl_outputs(params, execution)
153
- execution.run(cargs)
154
- return ret
155
-
156
-
157
- def fslmaths_fsl(
158
- first_input: InputPathType,
159
- operations_and_inputs: str,
160
- output_image: str,
161
- runner: Runner | None = None,
162
- ) -> FslmathsFslOutputs:
163
- """
164
- FSLmaths: part of FMRIB Software Library (FSL) for manipulating images via
165
- various mathematical operations.
166
-
167
- Author: FreeSurfer Developers
168
-
169
- URL: https://github.com/freesurfer/freesurfer
170
-
171
- Args:
172
- first_input: First input image for fslmaths operations.
173
- operations_and_inputs: Operations and inputs to be applied on the first\
174
- image.
175
- output_image: Output image file.
176
- runner: Command runner.
177
- Returns:
178
- NamedTuple of outputs (described in `FslmathsFslOutputs`).
179
- """
180
- runner = runner or get_global_runner()
181
- execution = runner.start_execution(FSLMATHS_FSL_METADATA)
182
- params = fslmaths_fsl_params(
183
- first_input=first_input,
184
- operations_and_inputs=operations_and_inputs,
185
- output_image=output_image,
186
- )
187
- return fslmaths_fsl_execute(params, execution)
188
-
189
-
190
- __all__ = [
191
- "FSLMATHS_FSL_METADATA",
192
- "FslmathsFslOutputs",
193
- "FslmathsFslParameters",
194
- "fslmaths_fsl",
195
- "fslmaths_fsl_params",
196
- ]