niwrap-afni 0.5.0__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-afni might be problematic. Click here for more details.

Files changed (111) hide show
  1. niwrap_afni/afni/abids_json_tool_py.py +104 -1
  2. niwrap_afni/afni/abids_tool.py +43 -1
  3. niwrap_afni/afni/adjunct_make_script_and_rst_py.py +2 -2
  4. niwrap_afni/afni/afni_batch_r.py +1 -2
  5. niwrap_afni/afni/balloon.py +25 -1
  6. niwrap_afni/afni/brain_skin.py +16 -1
  7. niwrap_afni/afni/build_afni_py.py +28 -1
  8. niwrap_afni/afni/cat_matvec.py +23 -1
  9. niwrap_afni/afni/convert_surface.py +38 -1
  10. niwrap_afni/afni/dicom_hinfo.py +9 -2
  11. niwrap_afni/afni/dsetstat2p.py +19 -1
  12. niwrap_afni/afni/fat_proc_align_anat_pair.py +10 -1
  13. niwrap_afni/afni/fat_proc_convert_dcm_anat.py +16 -1
  14. niwrap_afni/afni/fat_roi_row.py +1 -4
  15. niwrap_afni/afni/fsread_annot.py +2 -2
  16. niwrap_afni/afni/imrotate.py +10 -1
  17. niwrap_afni/afni/myget.py +16 -3
  18. niwrap_afni/afni/nifti_tool.py +3 -2
  19. niwrap_afni/afni/p2dsetstat.py +19 -1
  20. niwrap_afni/afni/plugout_drive.py +93 -1
  21. niwrap_afni/afni/prompt_popup.py +46 -1
  22. niwrap_afni/afni/prompt_user.py +16 -1
  23. niwrap_afni/afni/rbox.py +170 -9
  24. niwrap_afni/afni/samp_bias.py +16 -1
  25. niwrap_afni/afni/sfim.py +9 -2
  26. niwrap_afni/afni/stimband.py +22 -3
  27. niwrap_afni/afni/surf_dist.py +47 -1
  28. niwrap_afni/afni/surf_fwhm.py +1 -5
  29. niwrap_afni/afni/surf_info.py +99 -2
  30. niwrap_afni/afni/surface_metrics.py +179 -172
  31. niwrap_afni/afni/tedana_wrapper_py.py +19 -1
  32. niwrap_afni/afni/v_1d_bport.py +12 -1
  33. niwrap_afni/afni/v_1d_correlate.py +39 -1
  34. niwrap_afni/afni/v_1d_marry.py +1 -2
  35. niwrap_afni/afni/v_1d_rplot.py +233 -4
  36. niwrap_afni/afni/v_1d_sem.py +157 -2
  37. niwrap_afni/afni/v_1d_tsort.py +10 -1
  38. niwrap_afni/afni/v_1ddot.py +5 -4
  39. niwrap_afni/afni/v_1deval.py +16 -1
  40. niwrap_afni/afni/v_1dgen_arma11.py +16 -1
  41. niwrap_afni/afni/v_3_droimaker.py +16 -1
  42. niwrap_afni/afni/v_3d_afnito3_d.py +34 -4
  43. niwrap_afni/afni/v_3d_afnito_niml.py +34 -2
  44. niwrap_afni/afni/v_3d_amp_to_rsfc.py +10 -9
  45. niwrap_afni/afni/v_3d_anova3.py +323 -20
  46. niwrap_afni/afni/v_3d_clip_level.py +38 -2
  47. niwrap_afni/afni/v_3d_clust_sim.py +275 -22
  48. niwrap_afni/afni/v_3d_cm.py +103 -2
  49. niwrap_afni/afni/v_3d_dtto_dwi.py +58 -4
  50. niwrap_afni/afni/v_3d_dwito_dt.py +299 -2
  51. niwrap_afni/afni/v_3d_ecm.py +24 -2
  52. niwrap_afni/afni/v_3d_fdr.py +14 -1
  53. niwrap_afni/afni/v_3d_gen_feature_dist.py +53 -1
  54. niwrap_afni/afni/v_3d_hist.py +14 -1
  55. niwrap_afni/afni/v_3d_icc.py +137 -2
  56. niwrap_afni/afni/v_3d_lfcd.py +24 -5
  57. niwrap_afni/afni/v_3d_lme.py +1 -3
  58. niwrap_afni/afni/v_3d_local_histog.py +32 -1
  59. niwrap_afni/afni/v_3d_lrflip.py +46 -1
  60. niwrap_afni/afni/v_3d_lss.py +107 -4
  61. niwrap_afni/afni/v_3d_mask_to_ascii.py +12 -4
  62. niwrap_afni/afni/v_3d_mema.py +301 -3
  63. niwrap_afni/afni/v_3d_mepfm.py +1 -2
  64. niwrap_afni/afni/v_3d_nlfim.py +487 -30
  65. niwrap_afni/afni/v_3d_nwarp_xyz.py +27 -14
  66. niwrap_afni/afni/v_3d_overlap.py +20 -6
  67. niwrap_afni/afni/v_3d_par2_afni.py +32 -1
  68. niwrap_afni/afni/v_3d_pfm.py +200 -2
  69. niwrap_afni/afni/v_3d_remlfit.py +41 -1
  70. niwrap_afni/afni/v_3d_roistats.py +1 -2
  71. niwrap_afni/afni/v_3d_rsfc.py +240 -6
  72. niwrap_afni/afni/v_3d_stat_clust.py +19 -1
  73. niwrap_afni/afni/v_3d_tcat.py +24 -5
  74. niwrap_afni/afni/v_3d_threeto_rgb.py +1 -2
  75. niwrap_afni/afni/v_3d_toy_prog.py +111 -1
  76. niwrap_afni/afni/v_3d_tsgen.py +18 -1
  77. niwrap_afni/afni/v_3d_tsort.py +10 -1
  78. niwrap_afni/afni/v_3d_tstat.py +25 -15
  79. niwrap_afni/afni/v_3d_undump.py +10 -1
  80. niwrap_afni/afni/v_3d_warp.py +236 -2
  81. niwrap_afni/afni/v_3d_wilcoxon.py +9 -7
  82. niwrap_afni/afni/v_3dbucket.py +14 -1
  83. niwrap_afni/afni/v_3dcalc.py +1 -1
  84. niwrap_afni/afni/v_3dcopy.py +31 -3
  85. niwrap_afni/afni/v_3dmask_svd.py +99 -2
  86. niwrap_afni/afni/v__4_daverage.py +11 -2
  87. niwrap_afni/afni/v__afni_env.py +19 -1
  88. niwrap_afni/afni/v__afni_refacer_run.py +36 -1
  89. niwrap_afni/afni/v__build_afni_xlib.py +21 -1
  90. niwrap_afni/afni/v__chauffeur_afni.py +184 -2
  91. niwrap_afni/afni/v__command_globb.py +13 -7
  92. niwrap_afni/afni/v__compute_oc_weights.py +16 -1
  93. niwrap_afni/afni/v__deblank_file_names.py +13 -2
  94. niwrap_afni/afni/v__dice_metric.py +18 -14
  95. niwrap_afni/afni/v__djunct_edgy_align_check.py +82 -10
  96. niwrap_afni/afni/v__djunct_montage_coordinator.py +10 -1
  97. niwrap_afni/afni/v__get_afni_res.py +3 -2
  98. niwrap_afni/afni/v__grad_flip_test.py +38 -42
  99. niwrap_afni/afni/v__grayplot.py +34 -1
  100. niwrap_afni/afni/v__help_afni.py +63 -2
  101. niwrap_afni/afni/v__make_label_table.py +14 -1
  102. niwrap_afni/afni/v__no_ext.py +9 -2
  103. niwrap_afni/afni/v__reorder.py +10 -1
  104. niwrap_afni/afni/v__skull_strip_touch_up.py +10 -1
  105. niwrap_afni/afni/v__suma_make_spec_caret.py +62 -2
  106. niwrap_afni/afni/v__suma_make_spec_fs.py +180 -2
  107. niwrap_afni/afni/v__to_mni_qwarpar.py +21 -1
  108. niwrap_afni/afni/v__to_rai.py +23 -7
  109. {niwrap_afni-0.5.0.dist-info → niwrap_afni-0.5.2.dist-info}/METADATA +1 -1
  110. {niwrap_afni-0.5.0.dist-info → niwrap_afni-0.5.2.dist-info}/RECORD +111 -111
  111. {niwrap_afni-0.5.0.dist-info → niwrap_afni-0.5.2.dist-info}/WHEEL +0 -0
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  V_3D_CLIP_LEVEL_METADATA = Metadata(
9
- id="d74c5cd045e053e286d1b5c8e3587d88d871f128.boutiques",
9
+ id="e0dffc3fb16b61bec3a898141cfff2cf90509ea6.boutiques",
10
10
  name="3dClipLevel",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -16,6 +16,9 @@ V_3D_CLIP_LEVEL_METADATA = Metadata(
16
16
  V3dClipLevelParameters = typing.TypedDict('V3dClipLevelParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["3dClipLevel"],
18
18
  "dataset": InputPathType,
19
+ "mfrac": typing.NotRequired[float | None],
20
+ "doall": bool,
21
+ "grad": typing.NotRequired[str | None],
19
22
  })
20
23
 
21
24
 
@@ -60,19 +63,31 @@ class V3dClipLevelOutputs(typing.NamedTuple):
60
63
 
61
64
  def v_3d_clip_level_params(
62
65
  dataset: InputPathType,
66
+ mfrac: float | None = None,
67
+ doall: bool = False,
68
+ grad: str | None = None,
63
69
  ) -> V3dClipLevelParameters:
64
70
  """
65
71
  Build parameters.
66
72
 
67
73
  Args:
68
74
  dataset: Input dataset (e.g. dataset.nii.gz).
75
+ mfrac: Use the number ff instead of 0.50 in the algorithm.
76
+ doall: Apply the algorithm to each sub-brick separately.
77
+ grad: Compute a 'gradual' clip level as a function of voxel position\
78
+ and output to a dataset with the given prefix.
69
79
  Returns:
70
80
  Parameter dictionary
71
81
  """
72
82
  params = {
73
83
  "__STYXTYPE__": "3dClipLevel",
74
84
  "dataset": dataset,
85
+ "doall": doall,
75
86
  }
87
+ if mfrac is not None:
88
+ params["mfrac"] = mfrac
89
+ if grad is not None:
90
+ params["grad"] = grad
76
91
  return params
77
92
 
78
93
 
@@ -91,8 +106,19 @@ def v_3d_clip_level_cargs(
91
106
  """
92
107
  cargs = []
93
108
  cargs.append("3dClipLevel")
94
- cargs.append("[options]")
95
109
  cargs.append(execution.input_file(params.get("dataset")))
110
+ if params.get("mfrac") is not None:
111
+ cargs.extend([
112
+ "-mfrac",
113
+ str(params.get("mfrac"))
114
+ ])
115
+ if params.get("doall"):
116
+ cargs.append("-doall")
117
+ if params.get("grad") is not None:
118
+ cargs.extend([
119
+ "-grad",
120
+ params.get("grad")
121
+ ])
96
122
  return cargs
97
123
 
98
124
 
@@ -142,6 +168,9 @@ def v_3d_clip_level_execute(
142
168
 
143
169
  def v_3d_clip_level(
144
170
  dataset: InputPathType,
171
+ mfrac: float | None = None,
172
+ doall: bool = False,
173
+ grad: str | None = None,
145
174
  runner: Runner | None = None,
146
175
  ) -> V3dClipLevelOutputs:
147
176
  """
@@ -154,6 +183,10 @@ def v_3d_clip_level(
154
183
 
155
184
  Args:
156
185
  dataset: Input dataset (e.g. dataset.nii.gz).
186
+ mfrac: Use the number ff instead of 0.50 in the algorithm.
187
+ doall: Apply the algorithm to each sub-brick separately.
188
+ grad: Compute a 'gradual' clip level as a function of voxel position\
189
+ and output to a dataset with the given prefix.
157
190
  runner: Command runner.
158
191
  Returns:
159
192
  NamedTuple of outputs (described in `V3dClipLevelOutputs`).
@@ -162,6 +195,9 @@ def v_3d_clip_level(
162
195
  execution = runner.start_execution(V_3D_CLIP_LEVEL_METADATA)
163
196
  params = v_3d_clip_level_params(
164
197
  dataset=dataset,
198
+ mfrac=mfrac,
199
+ doall=doall,
200
+ grad=grad,
165
201
  )
166
202
  return v_3d_clip_level_execute(params, execution)
167
203
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  V_3D_CLUST_SIM_METADATA = Metadata(
9
- id="493de4c7d1501714af71d386a011e1fe097ca5fb.boutiques",
9
+ id="912b449ef9b8c9bbf2596a5e62a4511be33fefad.boutiques",
10
10
  name="3dClustSim",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -15,6 +15,28 @@ V_3D_CLUST_SIM_METADATA = Metadata(
15
15
 
16
16
  V3dClustSimParameters = typing.TypedDict('V3dClustSimParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["3dClustSim"],
18
+ "nxyz": typing.NotRequired[str | None],
19
+ "dxyz": typing.NotRequired[str | None],
20
+ "ball": bool,
21
+ "mask": typing.NotRequired[InputPathType | None],
22
+ "oksmallmask": bool,
23
+ "inset": typing.NotRequired[list[InputPathType] | None],
24
+ "fwhm": typing.NotRequired[float | None],
25
+ "acf": typing.NotRequired[str | None],
26
+ "nopad": bool,
27
+ "pthr": typing.NotRequired[str | None],
28
+ "athr": typing.NotRequired[str | None],
29
+ "lots": bool,
30
+ "mega": bool,
31
+ "iter": typing.NotRequired[float | None],
32
+ "nodec": bool,
33
+ "seed": typing.NotRequired[float | None],
34
+ "niml": bool,
35
+ "both": bool,
36
+ "prefix": typing.NotRequired[str | None],
37
+ "cmd": typing.NotRequired[str | None],
38
+ "quiet": bool,
39
+ "ssave": typing.NotRequired[str | None],
18
40
  })
19
41
 
20
42
 
@@ -56,40 +78,121 @@ class V3dClustSimOutputs(typing.NamedTuple):
56
78
  """
57
79
  root: OutputPathType
58
80
  """Output root folder. This is the root folder for all outputs."""
59
- output_nn1_1sided: OutputPathType
81
+ output_nn1_1sided: OutputPathType | None
60
82
  """Output file for NN1 with 1-sided thresholding"""
61
- output_nn1_2sided: OutputPathType
83
+ output_nn1_2sided: OutputPathType | None
62
84
  """Output file for NN1 with 2-sided thresholding"""
63
- output_nn1_bisided: OutputPathType
85
+ output_nn1_bisided: OutputPathType | None
64
86
  """Output file for NN1 with bi-sided thresholding"""
65
- output_nn2_1sided: OutputPathType
87
+ output_nn2_1sided: OutputPathType | None
66
88
  """Output file for NN2 with 1-sided thresholding"""
67
- output_nn2_2sided: OutputPathType
89
+ output_nn2_2sided: OutputPathType | None
68
90
  """Output file for NN2 with 2-sided thresholding"""
69
- output_nn2_bisided: OutputPathType
91
+ output_nn2_bisided: OutputPathType | None
70
92
  """Output file for NN2 with bi-sided thresholding"""
71
- output_nn3_1sided: OutputPathType
93
+ output_nn3_1sided: OutputPathType | None
72
94
  """Output file for NN3 with 1-sided thresholding"""
73
- output_nn3_2sided: OutputPathType
95
+ output_nn3_2sided: OutputPathType | None
74
96
  """Output file for NN3 with 2-sided thresholding"""
75
- output_nn3_bisided: OutputPathType
97
+ output_nn3_bisided: OutputPathType | None
76
98
  """Output file for NN3 with bi-sided thresholding"""
77
- mask_compressed: OutputPathType
99
+ mask_compressed: OutputPathType | None
78
100
  """Compressed ASCII encoding of the mask volume"""
79
101
 
80
102
 
81
103
  def v_3d_clust_sim_params(
104
+ nxyz: str | None = None,
105
+ dxyz: str | None = None,
106
+ ball: bool = False,
107
+ mask: InputPathType | None = None,
108
+ oksmallmask: bool = False,
109
+ inset: list[InputPathType] | None = None,
110
+ fwhm: float | None = None,
111
+ acf: str | None = None,
112
+ nopad: bool = False,
113
+ pthr: str | None = None,
114
+ athr: str | None = None,
115
+ lots: bool = False,
116
+ mega: bool = False,
117
+ iter_: float | None = None,
118
+ nodec: bool = False,
119
+ seed: float | None = None,
120
+ niml: bool = False,
121
+ both: bool = False,
122
+ prefix: str | None = None,
123
+ cmd_: str | None = None,
124
+ quiet: bool = False,
125
+ ssave: str | None = None,
82
126
  ) -> V3dClustSimParameters:
83
127
  """
84
128
  Build parameters.
85
129
 
86
130
  Args:
131
+ nxyz: Size of 3D grid to use for simulation.
132
+ dxyz: Voxel sizes along each dimension.
133
+ ball: Mask off points outside a ball at the center of the grid.
134
+ mask: Use the 0 sub-brick of this dataset as a mask.
135
+ oksmallmask: Allow small masks with less than 128 nonzero voxels.
136
+ inset: Use these dataset(s) as the simulations to threshold and\
137
+ clusterize.
138
+ fwhm: Gaussian filter width in mm (use -fwhmxyz for different values\
139
+ per axis).
140
+ acf: Parameters a, b, c for the autocorrelation function.
141
+ nopad: Turn off padding slices added for edge effects.
142
+ pthr: List of uncorrected per voxel p-values.
143
+ athr: List of corrected whole volume alpha-values.
144
+ lots: Use a longer list of values for pthr and athr.
145
+ mega: Add even more values to the pthr and athr grids.
146
+ iter_: Number of Monte Carlo simulations.
147
+ nodec: Print the cluster size threshold as an integer.
148
+ seed: Random number seed.
149
+ niml: Output the table in XML/NIML format.
150
+ both: Output the table in both XML/NIML format and in .1D format.
151
+ prefix: Specify prefix for the output files.
152
+ cmd_: Write command for putting results into a file's header.
153
+ quiet: Don't print out progress reports.
154
+ ssave: Save un-thresholded generated random volumes.
87
155
  Returns:
88
156
  Parameter dictionary
89
157
  """
90
158
  params = {
91
159
  "__STYXTYPE__": "3dClustSim",
160
+ "ball": ball,
161
+ "oksmallmask": oksmallmask,
162
+ "nopad": nopad,
163
+ "lots": lots,
164
+ "mega": mega,
165
+ "nodec": nodec,
166
+ "niml": niml,
167
+ "both": both,
168
+ "quiet": quiet,
92
169
  }
170
+ if nxyz is not None:
171
+ params["nxyz"] = nxyz
172
+ if dxyz is not None:
173
+ params["dxyz"] = dxyz
174
+ if mask is not None:
175
+ params["mask"] = mask
176
+ if inset is not None:
177
+ params["inset"] = inset
178
+ if fwhm is not None:
179
+ params["fwhm"] = fwhm
180
+ if acf is not None:
181
+ params["acf"] = acf
182
+ if pthr is not None:
183
+ params["pthr"] = pthr
184
+ if athr is not None:
185
+ params["athr"] = athr
186
+ if iter_ is not None:
187
+ params["iter"] = iter_
188
+ if seed is not None:
189
+ params["seed"] = seed
190
+ if prefix is not None:
191
+ params["prefix"] = prefix
192
+ if cmd_ is not None:
193
+ params["cmd"] = cmd_
194
+ if ssave is not None:
195
+ params["ssave"] = ssave
93
196
  return params
94
197
 
95
198
 
@@ -108,7 +211,89 @@ def v_3d_clust_sim_cargs(
108
211
  """
109
212
  cargs = []
110
213
  cargs.append("3dClustSim")
111
- cargs.append("[OPTIONS]")
214
+ if params.get("nxyz") is not None:
215
+ cargs.extend([
216
+ "-nxyz",
217
+ params.get("nxyz")
218
+ ])
219
+ if params.get("dxyz") is not None:
220
+ cargs.extend([
221
+ "-dxyz",
222
+ params.get("dxyz")
223
+ ])
224
+ if params.get("ball"):
225
+ cargs.append("-BALL")
226
+ if params.get("mask") is not None:
227
+ cargs.extend([
228
+ "-mask",
229
+ execution.input_file(params.get("mask"))
230
+ ])
231
+ if params.get("oksmallmask"):
232
+ cargs.append("-OKsmallmask")
233
+ if params.get("inset") is not None:
234
+ cargs.extend([
235
+ "-inset",
236
+ *[execution.input_file(f) for f in params.get("inset")]
237
+ ])
238
+ if params.get("fwhm") is not None:
239
+ cargs.extend([
240
+ "-fwhm",
241
+ str(params.get("fwhm"))
242
+ ])
243
+ if params.get("acf") is not None:
244
+ cargs.extend([
245
+ "-acf",
246
+ params.get("acf")
247
+ ])
248
+ if params.get("nopad"):
249
+ cargs.append("-nopad")
250
+ if params.get("pthr") is not None:
251
+ cargs.extend([
252
+ "-pthr",
253
+ params.get("pthr")
254
+ ])
255
+ if params.get("athr") is not None:
256
+ cargs.extend([
257
+ "-athr",
258
+ params.get("athr")
259
+ ])
260
+ if params.get("lots"):
261
+ cargs.append("-LOTS")
262
+ if params.get("mega"):
263
+ cargs.append("-MEGA")
264
+ if params.get("iter") is not None:
265
+ cargs.extend([
266
+ "-iter",
267
+ str(params.get("iter"))
268
+ ])
269
+ if params.get("nodec"):
270
+ cargs.append("-nodec")
271
+ if params.get("seed") is not None:
272
+ cargs.extend([
273
+ "-seed",
274
+ str(params.get("seed"))
275
+ ])
276
+ if params.get("niml"):
277
+ cargs.append("-niml")
278
+ if params.get("both"):
279
+ cargs.append("-both")
280
+ if params.get("prefix") is not None:
281
+ cargs.extend([
282
+ "-prefix",
283
+ params.get("prefix")
284
+ ])
285
+ if params.get("cmd") is not None:
286
+ cargs.extend([
287
+ "-cmd",
288
+ params.get("cmd")
289
+ ])
290
+ if params.get("quiet"):
291
+ cargs.append("-quiet")
292
+ if params.get("ssave") is not None:
293
+ cargs.extend([
294
+ "-ssave",
295
+ params.get("ssave")
296
+ ])
112
297
  return cargs
113
298
 
114
299
 
@@ -127,16 +312,16 @@ def v_3d_clust_sim_outputs(
127
312
  """
128
313
  ret = V3dClustSimOutputs(
129
314
  root=execution.output_file("."),
130
- output_nn1_1sided=execution.output_file("[PREFIX].NN1_1sided.1D"),
131
- output_nn1_2sided=execution.output_file("[PREFIX].NN1_2sided.1D"),
132
- output_nn1_bisided=execution.output_file("[PREFIX].NN1_bisided.1D"),
133
- output_nn2_1sided=execution.output_file("[PREFIX].NN2_1sided.1D"),
134
- output_nn2_2sided=execution.output_file("[PREFIX].NN2_2sided.1D"),
135
- output_nn2_bisided=execution.output_file("[PREFIX].NN2_bisided.1D"),
136
- output_nn3_1sided=execution.output_file("[PREFIX].NN3_1sided.1D"),
137
- output_nn3_2sided=execution.output_file("[PREFIX].NN3_2sided.1D"),
138
- output_nn3_bisided=execution.output_file("[PREFIX].NN3_bisided.1D"),
139
- mask_compressed=execution.output_file("[PREFIX].mask"),
315
+ output_nn1_1sided=execution.output_file(params.get("prefix") + ".NN1_1sided.1D") if (params.get("prefix") is not None) else None,
316
+ output_nn1_2sided=execution.output_file(params.get("prefix") + ".NN1_2sided.1D") if (params.get("prefix") is not None) else None,
317
+ output_nn1_bisided=execution.output_file(params.get("prefix") + ".NN1_bisided.1D") if (params.get("prefix") is not None) else None,
318
+ output_nn2_1sided=execution.output_file(params.get("prefix") + ".NN2_1sided.1D") if (params.get("prefix") is not None) else None,
319
+ output_nn2_2sided=execution.output_file(params.get("prefix") + ".NN2_2sided.1D") if (params.get("prefix") is not None) else None,
320
+ output_nn2_bisided=execution.output_file(params.get("prefix") + ".NN2_bisided.1D") if (params.get("prefix") is not None) else None,
321
+ output_nn3_1sided=execution.output_file(params.get("prefix") + ".NN3_1sided.1D") if (params.get("prefix") is not None) else None,
322
+ output_nn3_2sided=execution.output_file(params.get("prefix") + ".NN3_2sided.1D") if (params.get("prefix") is not None) else None,
323
+ output_nn3_bisided=execution.output_file(params.get("prefix") + ".NN3_bisided.1D") if (params.get("prefix") is not None) else None,
324
+ mask_compressed=execution.output_file(params.get("prefix") + ".mask") if (params.get("prefix") is not None) else None,
140
325
  )
141
326
  return ret
142
327
 
@@ -166,6 +351,28 @@ def v_3d_clust_sim_execute(
166
351
 
167
352
 
168
353
  def v_3d_clust_sim(
354
+ nxyz: str | None = None,
355
+ dxyz: str | None = None,
356
+ ball: bool = False,
357
+ mask: InputPathType | None = None,
358
+ oksmallmask: bool = False,
359
+ inset: list[InputPathType] | None = None,
360
+ fwhm: float | None = None,
361
+ acf: str | None = None,
362
+ nopad: bool = False,
363
+ pthr: str | None = None,
364
+ athr: str | None = None,
365
+ lots: bool = False,
366
+ mega: bool = False,
367
+ iter_: float | None = None,
368
+ nodec: bool = False,
369
+ seed: float | None = None,
370
+ niml: bool = False,
371
+ both: bool = False,
372
+ prefix: str | None = None,
373
+ cmd_: str | None = None,
374
+ quiet: bool = False,
375
+ ssave: str | None = None,
169
376
  runner: Runner | None = None,
170
377
  ) -> V3dClustSimOutputs:
171
378
  """
@@ -176,6 +383,30 @@ def v_3d_clust_sim(
176
383
  URL: https://afni.nimh.nih.gov/
177
384
 
178
385
  Args:
386
+ nxyz: Size of 3D grid to use for simulation.
387
+ dxyz: Voxel sizes along each dimension.
388
+ ball: Mask off points outside a ball at the center of the grid.
389
+ mask: Use the 0 sub-brick of this dataset as a mask.
390
+ oksmallmask: Allow small masks with less than 128 nonzero voxels.
391
+ inset: Use these dataset(s) as the simulations to threshold and\
392
+ clusterize.
393
+ fwhm: Gaussian filter width in mm (use -fwhmxyz for different values\
394
+ per axis).
395
+ acf: Parameters a, b, c for the autocorrelation function.
396
+ nopad: Turn off padding slices added for edge effects.
397
+ pthr: List of uncorrected per voxel p-values.
398
+ athr: List of corrected whole volume alpha-values.
399
+ lots: Use a longer list of values for pthr and athr.
400
+ mega: Add even more values to the pthr and athr grids.
401
+ iter_: Number of Monte Carlo simulations.
402
+ nodec: Print the cluster size threshold as an integer.
403
+ seed: Random number seed.
404
+ niml: Output the table in XML/NIML format.
405
+ both: Output the table in both XML/NIML format and in .1D format.
406
+ prefix: Specify prefix for the output files.
407
+ cmd_: Write command for putting results into a file's header.
408
+ quiet: Don't print out progress reports.
409
+ ssave: Save un-thresholded generated random volumes.
179
410
  runner: Command runner.
180
411
  Returns:
181
412
  NamedTuple of outputs (described in `V3dClustSimOutputs`).
@@ -183,6 +414,28 @@ def v_3d_clust_sim(
183
414
  runner = runner or get_global_runner()
184
415
  execution = runner.start_execution(V_3D_CLUST_SIM_METADATA)
185
416
  params = v_3d_clust_sim_params(
417
+ nxyz=nxyz,
418
+ dxyz=dxyz,
419
+ ball=ball,
420
+ mask=mask,
421
+ oksmallmask=oksmallmask,
422
+ inset=inset,
423
+ fwhm=fwhm,
424
+ acf=acf,
425
+ nopad=nopad,
426
+ pthr=pthr,
427
+ athr=athr,
428
+ lots=lots,
429
+ mega=mega,
430
+ iter_=iter_,
431
+ nodec=nodec,
432
+ seed=seed,
433
+ niml=niml,
434
+ both=both,
435
+ prefix=prefix,
436
+ cmd_=cmd_,
437
+ quiet=quiet,
438
+ ssave=ssave,
186
439
  )
187
440
  return v_3d_clust_sim_execute(params, execution)
188
441
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  V_3D_CM_METADATA = Metadata(
9
- id="b067b12b1032c8b1f441c220e6f5349f1cfe1370.boutiques",
9
+ id="63ca74289af452584f6dd9b272bc4b15b6ffb8b0.boutiques",
10
10
  name="3dCM",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -16,6 +16,14 @@ V_3D_CM_METADATA = Metadata(
16
16
  V3dCmParameters = typing.TypedDict('V3dCmParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["3dCM"],
18
18
  "dset": InputPathType,
19
+ "mask": typing.NotRequired[InputPathType | None],
20
+ "automask": bool,
21
+ "set_origin": typing.NotRequired[list[float] | None],
22
+ "local_ijk": bool,
23
+ "roi_vals": typing.NotRequired[list[float] | None],
24
+ "all_rois": bool,
25
+ "icent": bool,
26
+ "dcent": bool,
19
27
  })
20
28
 
21
29
 
@@ -63,19 +71,55 @@ class V3dCmOutputs(typing.NamedTuple):
63
71
 
64
72
  def v_3d_cm_params(
65
73
  dset: InputPathType,
74
+ mask: InputPathType | None = None,
75
+ automask: bool = False,
76
+ set_origin: list[float] | None = None,
77
+ local_ijk: bool = False,
78
+ roi_vals: list[float] | None = None,
79
+ all_rois: bool = False,
80
+ icent: bool = False,
81
+ dcent: bool = False,
66
82
  ) -> V3dCmParameters:
67
83
  """
68
84
  Build parameters.
69
85
 
70
86
  Args:
71
87
  dset: Input dataset.
88
+ mask: Use the specified dataset as a mask. Only voxels with nonzero\
89
+ values in 'mset' will be averaged from 'dataset'. Both datasets must\
90
+ have the same number of voxels.
91
+ automask: Generate the mask automatically.
92
+ set_origin: After computing the CM of the dataset, set the origin\
93
+ fields in the header so that the CM will be at (x,y,z) in DICOM\
94
+ coordinates.
95
+ local_ijk: Output values as (i,j,k) in local orientation.
96
+ roi_vals: Compute center of mass for each blob with specified voxel\
97
+ values.
98
+ all_rois: Automatically find all ROI values and compute their centers\
99
+ of mass.
100
+ icent: Compute Internal Center, which finds the center voxel closest to\
101
+ the center of mass.
102
+ dcent: Compute Distance Center, the center voxel with the shortest\
103
+ average distance to all other voxels. This is computationally\
104
+ expensive.
72
105
  Returns:
73
106
  Parameter dictionary
74
107
  """
75
108
  params = {
76
109
  "__STYXTYPE__": "3dCM",
77
110
  "dset": dset,
111
+ "automask": automask,
112
+ "local_ijk": local_ijk,
113
+ "all_rois": all_rois,
114
+ "icent": icent,
115
+ "dcent": dcent,
78
116
  }
117
+ if mask is not None:
118
+ params["mask"] = mask
119
+ if set_origin is not None:
120
+ params["set_origin"] = set_origin
121
+ if roi_vals is not None:
122
+ params["roi_vals"] = roi_vals
79
123
  return params
80
124
 
81
125
 
@@ -94,8 +138,32 @@ def v_3d_cm_cargs(
94
138
  """
95
139
  cargs = []
96
140
  cargs.append("3dCM")
97
- cargs.append("[OPTIONS]")
98
141
  cargs.append(execution.input_file(params.get("dset")))
142
+ if params.get("mask") is not None:
143
+ cargs.extend([
144
+ "-mask",
145
+ execution.input_file(params.get("mask"))
146
+ ])
147
+ if params.get("automask"):
148
+ cargs.append("-automask")
149
+ if params.get("set_origin") is not None:
150
+ cargs.extend([
151
+ "-set",
152
+ *map(str, params.get("set_origin"))
153
+ ])
154
+ if params.get("local_ijk"):
155
+ cargs.append("-local_ijk")
156
+ if params.get("roi_vals") is not None:
157
+ cargs.extend([
158
+ "-roi_vals",
159
+ *map(str, params.get("roi_vals"))
160
+ ])
161
+ if params.get("all_rois"):
162
+ cargs.append("-all_rois")
163
+ if params.get("icent"):
164
+ cargs.append("-Icent")
165
+ if params.get("dcent"):
166
+ cargs.append("-Dcent")
99
167
  return cargs
100
168
 
101
169
 
@@ -145,6 +213,14 @@ def v_3d_cm_execute(
145
213
 
146
214
  def v_3d_cm(
147
215
  dset: InputPathType,
216
+ mask: InputPathType | None = None,
217
+ automask: bool = False,
218
+ set_origin: list[float] | None = None,
219
+ local_ijk: bool = False,
220
+ roi_vals: list[float] | None = None,
221
+ all_rois: bool = False,
222
+ icent: bool = False,
223
+ dcent: bool = False,
148
224
  runner: Runner | None = None,
149
225
  ) -> V3dCmOutputs:
150
226
  """
@@ -156,6 +232,23 @@ def v_3d_cm(
156
232
 
157
233
  Args:
158
234
  dset: Input dataset.
235
+ mask: Use the specified dataset as a mask. Only voxels with nonzero\
236
+ values in 'mset' will be averaged from 'dataset'. Both datasets must\
237
+ have the same number of voxels.
238
+ automask: Generate the mask automatically.
239
+ set_origin: After computing the CM of the dataset, set the origin\
240
+ fields in the header so that the CM will be at (x,y,z) in DICOM\
241
+ coordinates.
242
+ local_ijk: Output values as (i,j,k) in local orientation.
243
+ roi_vals: Compute center of mass for each blob with specified voxel\
244
+ values.
245
+ all_rois: Automatically find all ROI values and compute their centers\
246
+ of mass.
247
+ icent: Compute Internal Center, which finds the center voxel closest to\
248
+ the center of mass.
249
+ dcent: Compute Distance Center, the center voxel with the shortest\
250
+ average distance to all other voxels. This is computationally\
251
+ expensive.
159
252
  runner: Command runner.
160
253
  Returns:
161
254
  NamedTuple of outputs (described in `V3dCmOutputs`).
@@ -164,6 +257,14 @@ def v_3d_cm(
164
257
  execution = runner.start_execution(V_3D_CM_METADATA)
165
258
  params = v_3d_cm_params(
166
259
  dset=dset,
260
+ mask=mask,
261
+ automask=automask,
262
+ set_origin=set_origin,
263
+ local_ijk=local_ijk,
264
+ roi_vals=roi_vals,
265
+ all_rois=all_rois,
266
+ icent=icent,
267
+ dcent=dcent,
167
268
  )
168
269
  return v_3d_cm_execute(params, execution)
169
270