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,185 +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
- MRI_MOTION_CORRECT_FSL_METADATA = Metadata(
9
- id="e4429f150e08917f7317e164c448c83b94352eed.boutiques",
10
- name="mri_motion_correct.fsl",
11
- package="freesurfer",
12
- container_image_tag="freesurfer/freesurfer:7.4.1",
13
- )
14
-
15
-
16
- MriMotionCorrectFslParameters = typing.TypedDict('MriMotionCorrectFslParameters', {
17
- "__STYX_TYPE__": typing.Literal["mri_motion_correct.fsl"],
18
- "input_image": InputPathType,
19
- "output_image": str,
20
- })
21
-
22
-
23
- def dyn_cargs(
24
- t: str,
25
- ) -> typing.Any:
26
- """
27
- Get build cargs function by command type.
28
-
29
- Args:
30
- t: Command type.
31
- Returns:
32
- Build cargs function.
33
- """
34
- return {
35
- "mri_motion_correct.fsl": mri_motion_correct_fsl_cargs,
36
- }.get(t)
37
-
38
-
39
- def dyn_outputs(
40
- t: str,
41
- ) -> typing.Any:
42
- """
43
- Get build outputs function by command type.
44
-
45
- Args:
46
- t: Command type.
47
- Returns:
48
- Build outputs function.
49
- """
50
- return {
51
- "mri_motion_correct.fsl": mri_motion_correct_fsl_outputs,
52
- }.get(t)
53
-
54
-
55
- class MriMotionCorrectFslOutputs(typing.NamedTuple):
56
- """
57
- Output object returned when calling `mri_motion_correct_fsl(...)`.
58
- """
59
- root: OutputPathType
60
- """Output root folder. This is the root folder for all outputs."""
61
- corrected_output: OutputPathType
62
- """Motion corrected output MRI image"""
63
-
64
-
65
- def mri_motion_correct_fsl_params(
66
- input_image: InputPathType,
67
- output_image: str,
68
- ) -> MriMotionCorrectFslParameters:
69
- """
70
- Build parameters.
71
-
72
- Args:
73
- input_image: Input MRI image to be motion corrected.
74
- output_image: Output corrected MRI image.
75
- Returns:
76
- Parameter dictionary
77
- """
78
- params = {
79
- "__STYXTYPE__": "mri_motion_correct.fsl",
80
- "input_image": input_image,
81
- "output_image": output_image,
82
- }
83
- return params
84
-
85
-
86
- def mri_motion_correct_fsl_cargs(
87
- params: MriMotionCorrectFslParameters,
88
- execution: Execution,
89
- ) -> list[str]:
90
- """
91
- Build command-line arguments from parameters.
92
-
93
- Args:
94
- params: The parameters.
95
- execution: The execution object for resolving input paths.
96
- Returns:
97
- Command-line arguments.
98
- """
99
- cargs = []
100
- cargs.append("mri_motion_correct.fsl")
101
- cargs.append(execution.input_file(params.get("input_image")))
102
- cargs.append(params.get("output_image"))
103
- cargs.append("[OPTIONS]")
104
- return cargs
105
-
106
-
107
- def mri_motion_correct_fsl_outputs(
108
- params: MriMotionCorrectFslParameters,
109
- execution: Execution,
110
- ) -> MriMotionCorrectFslOutputs:
111
- """
112
- Build outputs object containing output file paths and possibly stdout/stderr.
113
-
114
- Args:
115
- params: The parameters.
116
- execution: The execution object for resolving input paths.
117
- Returns:
118
- Outputs object.
119
- """
120
- ret = MriMotionCorrectFslOutputs(
121
- root=execution.output_file("."),
122
- corrected_output=execution.output_file(params.get("output_image") + ".nii.gz"),
123
- )
124
- return ret
125
-
126
-
127
- def mri_motion_correct_fsl_execute(
128
- params: MriMotionCorrectFslParameters,
129
- execution: Execution,
130
- ) -> MriMotionCorrectFslOutputs:
131
- """
132
- Tool for motion correction of MRI images using FSL.
133
-
134
- Author: FreeSurfer Developers
135
-
136
- URL: https://github.com/freesurfer/freesurfer
137
-
138
- Args:
139
- params: The parameters.
140
- execution: The execution object.
141
- Returns:
142
- NamedTuple of outputs (described in `MriMotionCorrectFslOutputs`).
143
- """
144
- params = execution.params(params)
145
- cargs = mri_motion_correct_fsl_cargs(params, execution)
146
- ret = mri_motion_correct_fsl_outputs(params, execution)
147
- execution.run(cargs)
148
- return ret
149
-
150
-
151
- def mri_motion_correct_fsl(
152
- input_image: InputPathType,
153
- output_image: str,
154
- runner: Runner | None = None,
155
- ) -> MriMotionCorrectFslOutputs:
156
- """
157
- Tool for motion correction of MRI images using FSL.
158
-
159
- Author: FreeSurfer Developers
160
-
161
- URL: https://github.com/freesurfer/freesurfer
162
-
163
- Args:
164
- input_image: Input MRI image to be motion corrected.
165
- output_image: Output corrected MRI image.
166
- runner: Command runner.
167
- Returns:
168
- NamedTuple of outputs (described in `MriMotionCorrectFslOutputs`).
169
- """
170
- runner = runner or get_global_runner()
171
- execution = runner.start_execution(MRI_MOTION_CORRECT_FSL_METADATA)
172
- params = mri_motion_correct_fsl_params(
173
- input_image=input_image,
174
- output_image=output_image,
175
- )
176
- return mri_motion_correct_fsl_execute(params, execution)
177
-
178
-
179
- __all__ = [
180
- "MRI_MOTION_CORRECT_FSL_METADATA",
181
- "MriMotionCorrectFslOutputs",
182
- "MriMotionCorrectFslParameters",
183
- "mri_motion_correct_fsl",
184
- "mri_motion_correct_fsl_params",
185
- ]
@@ -1,291 +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
- SLICETIMER_FSL_METADATA = Metadata(
9
- id="27673c86089b795cd88a005218734e798ec23211.boutiques",
10
- name="slicetimer.fsl",
11
- package="freesurfer",
12
- container_image_tag="freesurfer/freesurfer:7.4.1",
13
- )
14
-
15
-
16
- SlicetimerFslParameters = typing.TypedDict('SlicetimerFslParameters', {
17
- "__STYX_TYPE__": typing.Literal["slicetimer.fsl"],
18
- "infile": InputPathType,
19
- "outfile": typing.NotRequired[str | None],
20
- "tr": typing.NotRequired[float | None],
21
- "direction": typing.NotRequired[typing.Literal["x", "y", "z"] | None],
22
- "interleaved": bool,
23
- "reverse": bool,
24
- "custom_timings": typing.NotRequired[InputPathType | None],
25
- "global_shift": typing.NotRequired[float | None],
26
- "custom_interleave_order": typing.NotRequired[InputPathType | None],
27
- "verbose": bool,
28
- })
29
-
30
-
31
- def dyn_cargs(
32
- t: str,
33
- ) -> typing.Any:
34
- """
35
- Get build cargs function by command type.
36
-
37
- Args:
38
- t: Command type.
39
- Returns:
40
- Build cargs function.
41
- """
42
- return {
43
- "slicetimer.fsl": slicetimer_fsl_cargs,
44
- }.get(t)
45
-
46
-
47
- def dyn_outputs(
48
- t: str,
49
- ) -> typing.Any:
50
- """
51
- Get build outputs function by command type.
52
-
53
- Args:
54
- t: Command type.
55
- Returns:
56
- Build outputs function.
57
- """
58
- return {
59
- "slicetimer.fsl": slicetimer_fsl_outputs,
60
- }.get(t)
61
-
62
-
63
- class SlicetimerFslOutputs(typing.NamedTuple):
64
- """
65
- Output object returned when calling `slicetimer_fsl(...)`.
66
- """
67
- root: OutputPathType
68
- """Output root folder. This is the root folder for all outputs."""
69
- corrected_timeseries: OutputPathType | None
70
- """Corrected output timeseries"""
71
-
72
-
73
- def slicetimer_fsl_params(
74
- infile: InputPathType,
75
- outfile: str | None = None,
76
- tr: float | None = None,
77
- direction: typing.Literal["x", "y", "z"] | None = None,
78
- interleaved: bool = False,
79
- reverse: bool = False,
80
- custom_timings: InputPathType | None = None,
81
- global_shift: float | None = None,
82
- custom_interleave_order: InputPathType | None = None,
83
- verbose: bool = False,
84
- ) -> SlicetimerFslParameters:
85
- """
86
- Build parameters.
87
-
88
- Args:
89
- infile: Filename of input timeseries.
90
- outfile: Filename of output corrected timeseries.
91
- tr: Specify TR of data, default is 3s.
92
- direction: Direction of slice acquisition (x=1, y=2, z=3); default is z.
93
- interleaved: Use interleaved acquisition.
94
- reverse: Reverse slice indexing (default is slices were acquired\
95
- bottom-up).
96
- custom_timings: Filename of single-column slice timings in fractions of\
97
- TR, positive values shift slices forwards in time.
98
- global_shift: Global shift in fraction of TR, default is 0.
99
- custom_interleave_order: Filename of single-column custom interleave\
100
- order file (first slice is referred to as 1 not 0).
101
- verbose: Switch on diagnostic messages.
102
- Returns:
103
- Parameter dictionary
104
- """
105
- params = {
106
- "__STYXTYPE__": "slicetimer.fsl",
107
- "infile": infile,
108
- "interleaved": interleaved,
109
- "reverse": reverse,
110
- "verbose": verbose,
111
- }
112
- if outfile is not None:
113
- params["outfile"] = outfile
114
- if tr is not None:
115
- params["tr"] = tr
116
- if direction is not None:
117
- params["direction"] = direction
118
- if custom_timings is not None:
119
- params["custom_timings"] = custom_timings
120
- if global_shift is not None:
121
- params["global_shift"] = global_shift
122
- if custom_interleave_order is not None:
123
- params["custom_interleave_order"] = custom_interleave_order
124
- return params
125
-
126
-
127
- def slicetimer_fsl_cargs(
128
- params: SlicetimerFslParameters,
129
- execution: Execution,
130
- ) -> list[str]:
131
- """
132
- Build command-line arguments from parameters.
133
-
134
- Args:
135
- params: The parameters.
136
- execution: The execution object for resolving input paths.
137
- Returns:
138
- Command-line arguments.
139
- """
140
- cargs = []
141
- cargs.append("slicetimer")
142
- cargs.append("--in")
143
- cargs.extend([
144
- "-i",
145
- execution.input_file(params.get("infile"))
146
- ])
147
- if params.get("outfile") is not None:
148
- cargs.extend([
149
- "-o",
150
- params.get("outfile")
151
- ])
152
- if params.get("tr") is not None:
153
- cargs.extend([
154
- "-r",
155
- str(params.get("tr"))
156
- ])
157
- if params.get("direction") is not None:
158
- cargs.extend([
159
- "-d",
160
- params.get("direction")
161
- ])
162
- if params.get("interleaved"):
163
- cargs.append("--odd")
164
- if params.get("reverse"):
165
- cargs.append("--down")
166
- if params.get("custom_timings") is not None:
167
- cargs.extend([
168
- "--tcustom",
169
- execution.input_file(params.get("custom_timings"))
170
- ])
171
- if params.get("global_shift") is not None:
172
- cargs.extend([
173
- "--tglobal",
174
- str(params.get("global_shift"))
175
- ])
176
- if params.get("custom_interleave_order") is not None:
177
- cargs.extend([
178
- "--ocustom",
179
- execution.input_file(params.get("custom_interleave_order"))
180
- ])
181
- if params.get("verbose"):
182
- cargs.append("-v")
183
- return cargs
184
-
185
-
186
- def slicetimer_fsl_outputs(
187
- params: SlicetimerFslParameters,
188
- execution: Execution,
189
- ) -> SlicetimerFslOutputs:
190
- """
191
- Build outputs object containing output file paths and possibly stdout/stderr.
192
-
193
- Args:
194
- params: The parameters.
195
- execution: The execution object for resolving input paths.
196
- Returns:
197
- Outputs object.
198
- """
199
- ret = SlicetimerFslOutputs(
200
- root=execution.output_file("."),
201
- corrected_timeseries=execution.output_file(params.get("outfile")) if (params.get("outfile") is not None) else None,
202
- )
203
- return ret
204
-
205
-
206
- def slicetimer_fsl_execute(
207
- params: SlicetimerFslParameters,
208
- execution: Execution,
209
- ) -> SlicetimerFslOutputs:
210
- """
211
- FMRIB's Interpolation for Slice Timing correction in FMRI data.
212
-
213
- Author: FreeSurfer Developers
214
-
215
- URL: https://github.com/freesurfer/freesurfer
216
-
217
- Args:
218
- params: The parameters.
219
- execution: The execution object.
220
- Returns:
221
- NamedTuple of outputs (described in `SlicetimerFslOutputs`).
222
- """
223
- params = execution.params(params)
224
- cargs = slicetimer_fsl_cargs(params, execution)
225
- ret = slicetimer_fsl_outputs(params, execution)
226
- execution.run(cargs)
227
- return ret
228
-
229
-
230
- def slicetimer_fsl(
231
- infile: InputPathType,
232
- outfile: str | None = None,
233
- tr: float | None = None,
234
- direction: typing.Literal["x", "y", "z"] | None = None,
235
- interleaved: bool = False,
236
- reverse: bool = False,
237
- custom_timings: InputPathType | None = None,
238
- global_shift: float | None = None,
239
- custom_interleave_order: InputPathType | None = None,
240
- verbose: bool = False,
241
- runner: Runner | None = None,
242
- ) -> SlicetimerFslOutputs:
243
- """
244
- FMRIB's Interpolation for Slice Timing correction in FMRI data.
245
-
246
- Author: FreeSurfer Developers
247
-
248
- URL: https://github.com/freesurfer/freesurfer
249
-
250
- Args:
251
- infile: Filename of input timeseries.
252
- outfile: Filename of output corrected timeseries.
253
- tr: Specify TR of data, default is 3s.
254
- direction: Direction of slice acquisition (x=1, y=2, z=3); default is z.
255
- interleaved: Use interleaved acquisition.
256
- reverse: Reverse slice indexing (default is slices were acquired\
257
- bottom-up).
258
- custom_timings: Filename of single-column slice timings in fractions of\
259
- TR, positive values shift slices forwards in time.
260
- global_shift: Global shift in fraction of TR, default is 0.
261
- custom_interleave_order: Filename of single-column custom interleave\
262
- order file (first slice is referred to as 1 not 0).
263
- verbose: Switch on diagnostic messages.
264
- runner: Command runner.
265
- Returns:
266
- NamedTuple of outputs (described in `SlicetimerFslOutputs`).
267
- """
268
- runner = runner or get_global_runner()
269
- execution = runner.start_execution(SLICETIMER_FSL_METADATA)
270
- params = slicetimer_fsl_params(
271
- infile=infile,
272
- outfile=outfile,
273
- tr=tr,
274
- direction=direction,
275
- interleaved=interleaved,
276
- reverse=reverse,
277
- custom_timings=custom_timings,
278
- global_shift=global_shift,
279
- custom_interleave_order=custom_interleave_order,
280
- verbose=verbose,
281
- )
282
- return slicetimer_fsl_execute(params, execution)
283
-
284
-
285
- __all__ = [
286
- "SLICETIMER_FSL_METADATA",
287
- "SlicetimerFslOutputs",
288
- "SlicetimerFslParameters",
289
- "slicetimer_fsl",
290
- "slicetimer_fsl_params",
291
- ]