niwrap-freesurfer 0.5.1__py3-none-any.whl → 0.5.3__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.3.dist-info}/METADATA +1 -1
  141. {niwrap_freesurfer-0.5.1.dist-info → niwrap_freesurfer-0.5.3.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.3.dist-info}/WHEEL +0 -0
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MERGE_STATS_TABLES_METADATA = Metadata(
9
- id="004967733986569ad699b7fcfc4e0e899cb02c90.boutiques",
9
+ id="35129fec9b70b3cf111ebb349d44b5a25140111b.boutiques",
10
10
  name="merge_stats_tables",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -15,16 +15,18 @@ MERGE_STATS_TABLES_METADATA = Metadata(
15
15
 
16
16
  MergeStatsTablesParameters = typing.TypedDict('MergeStatsTablesParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["merge_stats_tables"],
18
+ "subjects": typing.NotRequired[list[str] | None],
18
19
  "subject": typing.NotRequired[str | None],
20
+ "subjectsfile": typing.NotRequired[InputPathType | None],
21
+ "inputs": typing.NotRequired[list[InputPathType] | None],
19
22
  "input": typing.NotRequired[InputPathType | None],
20
23
  "outputfile": str,
21
24
  "meas": str,
22
- "subjectsfile": typing.NotRequired[InputPathType | None],
25
+ "common_segs": bool,
26
+ "all_segs": bool,
23
27
  "intable": typing.NotRequired[InputPathType | None],
24
28
  "subdir": typing.NotRequired[str | None],
25
29
  "delimiter": typing.NotRequired[str | None],
26
- "common_segs": bool,
27
- "all_segs": bool,
28
30
  "transpose": bool,
29
31
  "skip": bool,
30
32
  "debug": bool,
@@ -76,14 +78,16 @@ class MergeStatsTablesOutputs(typing.NamedTuple):
76
78
  def merge_stats_tables_params(
77
79
  outputfile: str,
78
80
  meas: str,
81
+ subjects: list[str] | None = None,
79
82
  subject: str | None = None,
80
- input_: InputPathType | None = None,
81
83
  subjectsfile: InputPathType | None = None,
84
+ inputs: list[InputPathType] | None = None,
85
+ input_: InputPathType | None = None,
86
+ common_segs: bool = False,
87
+ all_segs: bool = False,
82
88
  intable: InputPathType | None = None,
83
89
  subdir: str | None = None,
84
90
  delimiter: str | None = None,
85
- common_segs: bool = False,
86
- all_segs: bool = False,
87
91
  transpose: bool = False,
88
92
  skip: bool = False,
89
93
  debug: bool = False,
@@ -94,18 +98,20 @@ def merge_stats_tables_params(
94
98
  Args:
95
99
  outputfile: The output table file.
96
100
  meas: Measure to write in output table.
101
+ subjects: Specify the subjects names.
97
102
  subject: Specify a single subject name.
98
- input_: Specify a single input stat file.
99
103
  subjectsfile: Name of the file which has the list of subjects (one\
100
104
  subject per line).
105
+ inputs: Specify all the input stat files.
106
+ input_: Specify a single input stat file.
107
+ common_segs: Output only the common segmentations of all the statsfiles\
108
+ given.
109
+ all_segs: Output all the segmentations of the statsfiles given.
101
110
  intable: Use `fname` as input (REQUIRED when passing subject ids).
102
111
  subdir: Use `subdir` instead of default "stats/" when passing subject\
103
112
  ids.
104
113
  delimiter: Delimiter between measures in the table. Options are 'tab',\
105
114
  'space', 'comma', and 'semicolon'. Default is 'space'.
106
- common_segs: Output only the common segmentations of all the statsfiles\
107
- given.
108
- all_segs: Output all the segmentations of the statsfiles given.
109
115
  transpose: Transpose the table (default is subjects in rows and\
110
116
  segmentations in cols).
111
117
  skip: If a subject does not have a stats file, skip it instead of\
@@ -124,12 +130,16 @@ def merge_stats_tables_params(
124
130
  "skip": skip,
125
131
  "debug": debug,
126
132
  }
133
+ if subjects is not None:
134
+ params["subjects"] = subjects
127
135
  if subject is not None:
128
136
  params["subject"] = subject
129
- if input_ is not None:
130
- params["input"] = input_
131
137
  if subjectsfile is not None:
132
138
  params["subjectsfile"] = subjectsfile
139
+ if inputs is not None:
140
+ params["inputs"] = inputs
141
+ if input_ is not None:
142
+ params["input"] = input_
133
143
  if intable is not None:
134
144
  params["intable"] = intable
135
145
  if subdir is not None:
@@ -154,11 +164,26 @@ def merge_stats_tables_cargs(
154
164
  """
155
165
  cargs = []
156
166
  cargs.append("merge_stats_tables")
167
+ if params.get("subjects") is not None:
168
+ cargs.extend([
169
+ "--subjects",
170
+ *params.get("subjects")
171
+ ])
157
172
  if params.get("subject") is not None:
158
173
  cargs.extend([
159
174
  "-s",
160
175
  params.get("subject")
161
176
  ])
177
+ if params.get("subjectsfile") is not None:
178
+ cargs.extend([
179
+ "--subjectsfile",
180
+ execution.input_file(params.get("subjectsfile"))
181
+ ])
182
+ if params.get("inputs") is not None:
183
+ cargs.extend([
184
+ "--inputs",
185
+ *[execution.input_file(f) for f in params.get("inputs")]
186
+ ])
162
187
  if params.get("input") is not None:
163
188
  cargs.extend([
164
189
  "-i",
@@ -172,11 +197,10 @@ def merge_stats_tables_cargs(
172
197
  "-m",
173
198
  params.get("meas")
174
199
  ])
175
- if params.get("subjectsfile") is not None:
176
- cargs.extend([
177
- "--subjectsfile",
178
- execution.input_file(params.get("subjectsfile"))
179
- ])
200
+ if params.get("common_segs"):
201
+ cargs.append("--common-segs")
202
+ if params.get("all_segs"):
203
+ cargs.append("--all-segs")
180
204
  if params.get("intable") is not None:
181
205
  cargs.extend([
182
206
  "--intable",
@@ -192,13 +216,6 @@ def merge_stats_tables_cargs(
192
216
  "-d",
193
217
  params.get("delimiter")
194
218
  ])
195
- if params.get("common_segs"):
196
- cargs.append("--common-segs")
197
- if params.get("all_segs"):
198
- cargs.append("--all-segs")
199
- cargs.append("[SEGIDS_FROM_FILE]")
200
- cargs.append("[SEGNO]")
201
- cargs.append("[NO_SEGNO_FLAG]")
202
219
  if params.get("transpose"):
203
220
  cargs.append("--transpose")
204
221
  if params.get("skip"):
@@ -256,14 +273,16 @@ def merge_stats_tables_execute(
256
273
  def merge_stats_tables(
257
274
  outputfile: str,
258
275
  meas: str,
276
+ subjects: list[str] | None = None,
259
277
  subject: str | None = None,
260
- input_: InputPathType | None = None,
261
278
  subjectsfile: InputPathType | None = None,
279
+ inputs: list[InputPathType] | None = None,
280
+ input_: InputPathType | None = None,
281
+ common_segs: bool = False,
282
+ all_segs: bool = False,
262
283
  intable: InputPathType | None = None,
263
284
  subdir: str | None = None,
264
285
  delimiter: str | None = None,
265
- common_segs: bool = False,
266
- all_segs: bool = False,
267
286
  transpose: bool = False,
268
287
  skip: bool = False,
269
288
  debug: bool = False,
@@ -280,18 +299,20 @@ def merge_stats_tables(
280
299
  Args:
281
300
  outputfile: The output table file.
282
301
  meas: Measure to write in output table.
302
+ subjects: Specify the subjects names.
283
303
  subject: Specify a single subject name.
284
- input_: Specify a single input stat file.
285
304
  subjectsfile: Name of the file which has the list of subjects (one\
286
305
  subject per line).
306
+ inputs: Specify all the input stat files.
307
+ input_: Specify a single input stat file.
308
+ common_segs: Output only the common segmentations of all the statsfiles\
309
+ given.
310
+ all_segs: Output all the segmentations of the statsfiles given.
287
311
  intable: Use `fname` as input (REQUIRED when passing subject ids).
288
312
  subdir: Use `subdir` instead of default "stats/" when passing subject\
289
313
  ids.
290
314
  delimiter: Delimiter between measures in the table. Options are 'tab',\
291
315
  'space', 'comma', and 'semicolon'. Default is 'space'.
292
- common_segs: Output only the common segmentations of all the statsfiles\
293
- given.
294
- all_segs: Output all the segmentations of the statsfiles given.
295
316
  transpose: Transpose the table (default is subjects in rows and\
296
317
  segmentations in cols).
297
318
  skip: If a subject does not have a stats file, skip it instead of\
@@ -304,16 +325,18 @@ def merge_stats_tables(
304
325
  runner = runner or get_global_runner()
305
326
  execution = runner.start_execution(MERGE_STATS_TABLES_METADATA)
306
327
  params = merge_stats_tables_params(
328
+ subjects=subjects,
307
329
  subject=subject,
330
+ subjectsfile=subjectsfile,
331
+ inputs=inputs,
308
332
  input_=input_,
309
333
  outputfile=outputfile,
310
334
  meas=meas,
311
- subjectsfile=subjectsfile,
335
+ common_segs=common_segs,
336
+ all_segs=all_segs,
312
337
  intable=intable,
313
338
  subdir=subdir,
314
339
  delimiter=delimiter,
315
- common_segs=common_segs,
316
- all_segs=all_segs,
317
340
  transpose=transpose,
318
341
  skip=skip,
319
342
  debug=debug,
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MIDEFACE_METADATA = Metadata(
9
- id="78ed8c9b1bc484046f26f89a611375e8c4e503a1.boutiques",
9
+ id="e4a7d1cf3f8f93ccdd73f64b12dba5ce0fe4110b.boutiques",
10
10
  name="mideface",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -22,18 +22,29 @@ MidefaceParameters = typing.TypedDict('MidefaceParameters', {
22
22
  "exclusion_mask": typing.NotRequired[InputPathType | None],
23
23
  "samseg_ndilations": typing.NotRequired[float | None],
24
24
  "samseg_json": typing.NotRequired[str | None],
25
+ "samseg_fast": bool,
26
+ "no_samseg_fast": bool,
25
27
  "init_reg": typing.NotRequired[InputPathType | None],
26
28
  "synthseg_ndilations": typing.NotRequired[float | None],
27
29
  "fill_const": typing.NotRequired[list[float] | None],
30
+ "fill_zero": bool,
28
31
  "fhi": typing.NotRequired[float | None],
32
+ "no_ears": bool,
33
+ "back_of_head": bool,
34
+ "forehead": bool,
35
+ "pics": bool,
29
36
  "code": typing.NotRequired[str | None],
30
37
  "image_convert": typing.NotRequired[str | None],
38
+ "no_post": bool,
31
39
  "threads": typing.NotRequired[float | None],
40
+ "force": bool,
41
+ "output_format": typing.NotRequired[str | None],
42
+ "atlas": typing.NotRequired[str | None],
43
+ "expert": typing.NotRequired[str | None],
32
44
  "display_no": typing.NotRequired[float | None],
33
45
  "apply_volume": typing.NotRequired[str | None],
34
46
  "check_volume": typing.NotRequired[InputPathType | None],
35
47
  "check_output_file": typing.NotRequired[InputPathType | None],
36
- "output_format": typing.NotRequired[str | None],
37
48
  })
38
49
 
39
50
 
@@ -89,18 +100,29 @@ def mideface_params(
89
100
  exclusion_mask: InputPathType | None = None,
90
101
  samseg_ndilations: float | None = None,
91
102
  samseg_json: str | None = None,
103
+ samseg_fast: bool = False,
104
+ no_samseg_fast: bool = False,
92
105
  init_reg: InputPathType | None = None,
93
106
  synthseg_ndilations: float | None = None,
94
107
  fill_const: list[float] | None = None,
108
+ fill_zero: bool = False,
95
109
  fhi: float | None = None,
110
+ no_ears: bool = False,
111
+ back_of_head: bool = False,
112
+ forehead: bool = False,
113
+ pics: bool = False,
96
114
  code_: str | None = None,
97
115
  image_convert: str | None = None,
116
+ no_post: bool = False,
98
117
  threads: float | None = None,
118
+ force: bool = False,
119
+ output_format: str | None = None,
120
+ atlas: str | None = None,
121
+ expert: str | None = None,
99
122
  display_no: float | None = None,
100
123
  apply_volume: str | None = None,
101
124
  check_volume: InputPathType | None = None,
102
125
  check_output_file: InputPathType | None = None,
103
- output_format: str | None = None,
104
126
  ) -> MidefaceParameters:
105
127
  """
106
128
  Build parameters.
@@ -113,18 +135,29 @@ def mideface_params(
113
135
  exclusion_mask: Mask to exclude certain regions from defacing.
114
136
  samseg_ndilations: Number of dilations for Samseg segmentation.
115
137
  samseg_json: JSON configuration for Samseg.
138
+ samseg_fast: Configure Samseg to run quickly.
139
+ no_samseg_fast: Do not configure Samseg to run quickly.
116
140
  init_reg: Initial registration file for Samseg.
117
141
  synthseg_ndilations: Number of dilations for Synthseg segmentation.
118
142
  fill_const: Constants for filling regions.
143
+ fill_zero: Fill regions with zero.
119
144
  fhi: FHI value for MRIchangeType().
145
+ no_ears: Do not include ears in the defacing.
146
+ back_of_head: Include back of head in defacing.
147
+ forehead: Include forehead in defacing (risks removing brain).
148
+ pics: Take pictures of the defaced result.
120
149
  code_: Embed code name in pictures.
121
150
  image_convert: Path to ImageMagick convert binary for pictures.
151
+ no_post: Do not make a head surface after defacing.
122
152
  threads: Number of threads to use.
153
+ force: Force reprocessing (only applicable if output directory is used).
154
+ output_format: Output file format.
155
+ atlas: Directory containing atlas files.
156
+ expert: Additional expert options.
123
157
  display_no: Xvfb display number for taking pictures.
124
158
  apply_volume: Apply midface output to a second volume.
125
159
  check_volume: Volume to check if defaced.
126
160
  check_output_file: Optional output file for check result.
127
- output_format: Output file format.
128
161
  Returns:
129
162
  Parameter dictionary
130
163
  """
@@ -132,6 +165,15 @@ def mideface_params(
132
165
  "__STYXTYPE__": "mideface",
133
166
  "input_volume": input_volume,
134
167
  "output_volume": output_volume,
168
+ "samseg_fast": samseg_fast,
169
+ "no_samseg_fast": no_samseg_fast,
170
+ "fill_zero": fill_zero,
171
+ "no_ears": no_ears,
172
+ "back_of_head": back_of_head,
173
+ "forehead": forehead,
174
+ "pics": pics,
175
+ "no_post": no_post,
176
+ "force": force,
135
177
  }
136
178
  if facemask is not None:
137
179
  params["facemask"] = facemask
@@ -157,6 +199,12 @@ def mideface_params(
157
199
  params["image_convert"] = image_convert
158
200
  if threads is not None:
159
201
  params["threads"] = threads
202
+ if output_format is not None:
203
+ params["output_format"] = output_format
204
+ if atlas is not None:
205
+ params["atlas"] = atlas
206
+ if expert is not None:
207
+ params["expert"] = expert
160
208
  if display_no is not None:
161
209
  params["display_no"] = display_no
162
210
  if apply_volume is not None:
@@ -165,8 +213,6 @@ def mideface_params(
165
213
  params["check_volume"] = check_volume
166
214
  if check_output_file is not None:
167
215
  params["check_output_file"] = check_output_file
168
- if output_format is not None:
169
- params["output_format"] = output_format
170
216
  return params
171
217
 
172
218
 
@@ -218,6 +264,10 @@ def mideface_cargs(
218
264
  "--samseg-json",
219
265
  params.get("samseg_json")
220
266
  ])
267
+ if params.get("samseg_fast"):
268
+ cargs.append("--samseg-fast")
269
+ if params.get("no_samseg_fast"):
270
+ cargs.append("--no-samseg-fast")
221
271
  if params.get("init_reg") is not None:
222
272
  cargs.extend([
223
273
  "--init-reg",
@@ -233,11 +283,21 @@ def mideface_cargs(
233
283
  "--fill-const",
234
284
  *map(str, params.get("fill_const"))
235
285
  ])
286
+ if params.get("fill_zero"):
287
+ cargs.append("--fill-zero")
236
288
  if params.get("fhi") is not None:
237
289
  cargs.extend([
238
290
  "--fhi",
239
291
  str(params.get("fhi"))
240
292
  ])
293
+ if params.get("no_ears"):
294
+ cargs.append("--no-ears")
295
+ if params.get("back_of_head"):
296
+ cargs.append("--back-of-head")
297
+ if params.get("forehead"):
298
+ cargs.append("--forehead")
299
+ if params.get("pics"):
300
+ cargs.append("--pics")
241
301
  if params.get("code") is not None:
242
302
  cargs.extend([
243
303
  "--code",
@@ -248,11 +308,30 @@ def mideface_cargs(
248
308
  "--imconvert",
249
309
  params.get("image_convert")
250
310
  ])
311
+ if params.get("no_post"):
312
+ cargs.append("--no-post")
251
313
  if params.get("threads") is not None:
252
314
  cargs.extend([
253
315
  "--threads",
254
316
  str(params.get("threads"))
255
317
  ])
318
+ if params.get("force"):
319
+ cargs.append("--force")
320
+ if params.get("output_format") is not None:
321
+ cargs.extend([
322
+ "--nii --nii.gz --mgz",
323
+ params.get("output_format")
324
+ ])
325
+ if params.get("atlas") is not None:
326
+ cargs.extend([
327
+ "--atlas",
328
+ params.get("atlas")
329
+ ])
330
+ if params.get("expert") is not None:
331
+ cargs.extend([
332
+ "--expert",
333
+ params.get("expert")
334
+ ])
256
335
  if params.get("display_no") is not None:
257
336
  cargs.extend([
258
337
  "--display",
@@ -273,11 +352,6 @@ def mideface_cargs(
273
352
  "--check",
274
353
  execution.input_file(params.get("check_output_file"))
275
354
  ])
276
- if params.get("output_format") is not None:
277
- cargs.extend([
278
- "--nii --nii.gz --mgz",
279
- params.get("output_format")
280
- ])
281
355
  return cargs
282
356
 
283
357
 
@@ -334,18 +408,29 @@ def mideface(
334
408
  exclusion_mask: InputPathType | None = None,
335
409
  samseg_ndilations: float | None = None,
336
410
  samseg_json: str | None = None,
411
+ samseg_fast: bool = False,
412
+ no_samseg_fast: bool = False,
337
413
  init_reg: InputPathType | None = None,
338
414
  synthseg_ndilations: float | None = None,
339
415
  fill_const: list[float] | None = None,
416
+ fill_zero: bool = False,
340
417
  fhi: float | None = None,
418
+ no_ears: bool = False,
419
+ back_of_head: bool = False,
420
+ forehead: bool = False,
421
+ pics: bool = False,
341
422
  code_: str | None = None,
342
423
  image_convert: str | None = None,
424
+ no_post: bool = False,
343
425
  threads: float | None = None,
426
+ force: bool = False,
427
+ output_format: str | None = None,
428
+ atlas: str | None = None,
429
+ expert: str | None = None,
344
430
  display_no: float | None = None,
345
431
  apply_volume: str | None = None,
346
432
  check_volume: InputPathType | None = None,
347
433
  check_output_file: InputPathType | None = None,
348
- output_format: str | None = None,
349
434
  runner: Runner | None = None,
350
435
  ) -> MidefaceOutputs:
351
436
  """
@@ -363,18 +448,29 @@ def mideface(
363
448
  exclusion_mask: Mask to exclude certain regions from defacing.
364
449
  samseg_ndilations: Number of dilations for Samseg segmentation.
365
450
  samseg_json: JSON configuration for Samseg.
451
+ samseg_fast: Configure Samseg to run quickly.
452
+ no_samseg_fast: Do not configure Samseg to run quickly.
366
453
  init_reg: Initial registration file for Samseg.
367
454
  synthseg_ndilations: Number of dilations for Synthseg segmentation.
368
455
  fill_const: Constants for filling regions.
456
+ fill_zero: Fill regions with zero.
369
457
  fhi: FHI value for MRIchangeType().
458
+ no_ears: Do not include ears in the defacing.
459
+ back_of_head: Include back of head in defacing.
460
+ forehead: Include forehead in defacing (risks removing brain).
461
+ pics: Take pictures of the defaced result.
370
462
  code_: Embed code name in pictures.
371
463
  image_convert: Path to ImageMagick convert binary for pictures.
464
+ no_post: Do not make a head surface after defacing.
372
465
  threads: Number of threads to use.
466
+ force: Force reprocessing (only applicable if output directory is used).
467
+ output_format: Output file format.
468
+ atlas: Directory containing atlas files.
469
+ expert: Additional expert options.
373
470
  display_no: Xvfb display number for taking pictures.
374
471
  apply_volume: Apply midface output to a second volume.
375
472
  check_volume: Volume to check if defaced.
376
473
  check_output_file: Optional output file for check result.
377
- output_format: Output file format.
378
474
  runner: Command runner.
379
475
  Returns:
380
476
  NamedTuple of outputs (described in `MidefaceOutputs`).
@@ -389,18 +485,29 @@ def mideface(
389
485
  exclusion_mask=exclusion_mask,
390
486
  samseg_ndilations=samseg_ndilations,
391
487
  samseg_json=samseg_json,
488
+ samseg_fast=samseg_fast,
489
+ no_samseg_fast=no_samseg_fast,
392
490
  init_reg=init_reg,
393
491
  synthseg_ndilations=synthseg_ndilations,
394
492
  fill_const=fill_const,
493
+ fill_zero=fill_zero,
395
494
  fhi=fhi,
495
+ no_ears=no_ears,
496
+ back_of_head=back_of_head,
497
+ forehead=forehead,
498
+ pics=pics,
396
499
  code_=code_,
397
500
  image_convert=image_convert,
501
+ no_post=no_post,
398
502
  threads=threads,
503
+ force=force,
504
+ output_format=output_format,
505
+ atlas=atlas,
506
+ expert=expert,
399
507
  display_no=display_no,
400
508
  apply_volume=apply_volume,
401
509
  check_volume=check_volume,
402
510
  check_output_file=check_output_file,
403
- output_format=output_format,
404
511
  )
405
512
  return mideface_execute(params, execution)
406
513
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MNI152REG_METADATA = Metadata(
9
- id="ce57b863d24379ba72442d213f0a02c5cba44366.boutiques",
9
+ id="8fa95f49688c26996caeccdd18ef44b1edc62d55.boutiques",
10
10
  name="mni152reg",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -115,7 +115,7 @@ def mni152reg_cargs(
115
115
  cargs.append("mni152reg")
116
116
  cargs.extend([
117
117
  "-s",
118
- "-" + params.get("subject")
118
+ params.get("subject")
119
119
  ])
120
120
  if params.get("register_1mm"):
121
121
  cargs.append("--1")
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MORPH_ONLY_SUBJECT_LH_METADATA = Metadata(
9
- id="352935372f9b953d29e77e48bc48053d0bb7123b.boutiques",
9
+ id="675fa84f456fc1eaf42786b61325807752029a72.boutiques",
10
10
  name="morph_only_subject-lh",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -93,9 +93,10 @@ def morph_only_subject_lh_cargs(
93
93
  Command-line arguments.
94
94
  """
95
95
  cargs = []
96
+ cargs.append("morph_only_subject-lh")
96
97
  cargs.extend([
97
98
  "-lh",
98
- "morph_only_subject" + params.get("subject_dir")
99
+ params.get("subject_dir")
99
100
  ])
100
101
  return cargs
101
102
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MORPH_ONLY_SUBJECT_RH_METADATA = Metadata(
9
- id="cf178313d144b58ca109c79e9c3499855a731ab6.boutiques",
9
+ id="dfd0ca80bee1df9c17a052f04b511b4001fa744d.boutiques",
10
10
  name="morph_only_subject-rh",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -95,9 +95,10 @@ def morph_only_subject_rh_cargs(
95
95
  Command-line arguments.
96
96
  """
97
97
  cargs = []
98
+ cargs.append("morph_only_subject-rh")
98
99
  cargs.extend([
99
100
  "-rh",
100
- "morph_only_subject" + execution.input_file(params.get("subject_dir"))
101
+ execution.input_file(params.get("subject_dir"))
101
102
  ])
102
103
  return cargs
103
104
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MORPH_RGB_LH_METADATA = Metadata(
9
- id="8a27176b135c7e00506bbb223dc33d4f8b5c331f.boutiques",
9
+ id="044963f7616c001fb9f232b33ff6dda1d55eaf4f.boutiques",
10
10
  name="morph_rgb-lh",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -92,9 +92,10 @@ def morph_rgb_lh_cargs(
92
92
  Command-line arguments.
93
93
  """
94
94
  cargs = []
95
+ cargs.append("morph_rgb-lh")
95
96
  cargs.extend([
96
97
  "-lh",
97
- "morph_rgb" + params.get("subject_id")
98
+ params.get("subject_id")
98
99
  ])
99
100
  return cargs
100
101
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MORPH_RGB_RH_METADATA = Metadata(
9
- id="d9ff451dc5d9779a26edbf9b5422cc9aac7df58e.boutiques",
9
+ id="aff93e163c0c3d9d9260e950945412279336cdbc.boutiques",
10
10
  name="morph_rgb-rh",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -90,9 +90,10 @@ def morph_rgb_rh_cargs(
90
90
  Command-line arguments.
91
91
  """
92
92
  cargs = []
93
+ cargs.append("morph_rgb-rh")
93
94
  cargs.extend([
94
95
  "-rh",
95
- "morph_rgb" + params.get("subject_id")
96
+ params.get("subject_id")
96
97
  ])
97
98
  return cargs
98
99
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MORPH_SUBJECT_LH_METADATA = Metadata(
9
- id="da06f833976d33a0c94b485e6e21f58bc7a8916f.boutiques",
9
+ id="50281e785fbd08bfa132876681fac0d45cfa2be9.boutiques",
10
10
  name="morph_subject-lh",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -90,9 +90,10 @@ def morph_subject_lh_cargs(
90
90
  Command-line arguments.
91
91
  """
92
92
  cargs = []
93
+ cargs.append("morph_subject-lh")
93
94
  cargs.extend([
94
95
  "-lh",
95
- "morph_subject" + params.get("subject_id")
96
+ params.get("subject_id")
96
97
  ])
97
98
  return cargs
98
99
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MORPH_SUBJECT_RH_METADATA = Metadata(
9
- id="f2d5e549617839220f590599e3a6e8f1eae8c024.boutiques",
9
+ id="3bc20c9a814d4ed47946818ef81d8f65039baeee.boutiques",
10
10
  name="morph_subject-rh",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -90,9 +90,10 @@ def morph_subject_rh_cargs(
90
90
  Command-line arguments.
91
91
  """
92
92
  cargs = []
93
+ cargs.append("morph_subject-rh")
93
94
  cargs.extend([
94
95
  "-rh",
95
- "morph_subject" + params.get("subject_id")
96
+ params.get("subject_id")
96
97
  ])
97
98
  return cargs
98
99
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  MORPH_TABLES_LH_METADATA = Metadata(
9
- id="e50487cf18790588cbef4e2983a79d88589f3cc3.boutiques",
9
+ id="34324860233ca7709fb6c2b4418a71bd3f0cbdf6.boutiques",
10
10
  name="morph_tables-lh",
11
11
  package="freesurfer",
12
12
  container_image_tag="freesurfer/freesurfer:7.4.1",
@@ -98,9 +98,10 @@ def morph_tables_lh_cargs(
98
98
  Command-line arguments.
99
99
  """
100
100
  cargs = []
101
+ cargs.append("morph_tables-lh")
101
102
  cargs.extend([
102
103
  "-lh",
103
- "morph_tables" + execution.input_file(params.get("input_file"))
104
+ execution.input_file(params.get("input_file"))
104
105
  ])
105
106
  if params.get("some_flag"):
106
107
  cargs.append("--some-flag")