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_DTTO_DWI_METADATA = Metadata(
9
- id="0f0fbb0dc2b7d522416ef673b66be8d6a5895cef.boutiques",
9
+ id="3ce4d55f82946de86dac4267e097694ede4e7771.boutiques",
10
10
  name="3dDTtoDWI",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -18,6 +18,11 @@ V3dDttoDwiParameters = typing.TypedDict('V3dDttoDwiParameters', {
18
18
  "gradient_file": InputPathType,
19
19
  "i0_dataset": InputPathType,
20
20
  "dt_dataset": InputPathType,
21
+ "prefix": typing.NotRequired[str | None],
22
+ "automask": bool,
23
+ "datum_type": typing.NotRequired[str | None],
24
+ "scale_out_1000": bool,
25
+ "help": bool,
21
26
  })
22
27
 
23
28
 
@@ -59,7 +64,7 @@ class V3dDttoDwiOutputs(typing.NamedTuple):
59
64
  """
60
65
  root: OutputPathType
61
66
  """Output root folder. This is the root folder for all outputs."""
62
- output_dwi: OutputPathType
67
+ output_dwi: OutputPathType | None
63
68
  """Computed DWI images including sub-brick for each gradient vector."""
64
69
 
65
70
 
@@ -67,6 +72,11 @@ def v_3d_dtto_dwi_params(
67
72
  gradient_file: InputPathType,
68
73
  i0_dataset: InputPathType,
69
74
  dt_dataset: InputPathType,
75
+ prefix: str | None = None,
76
+ automask: bool = False,
77
+ datum_type: str | None = None,
78
+ scale_out_1000: bool = False,
79
+ help_: bool = False,
70
80
  ) -> V3dDttoDwiParameters:
71
81
  """
72
82
  Build parameters.
@@ -77,6 +87,12 @@ def v_3d_dtto_dwi_params(
77
87
  i0_dataset: Volume without any gradient applied.
78
88
  dt_dataset: 6-sub-brick dataset containing the diffusion tensor data\
79
89
  (Dxx, Dxy, Dyy, Dxz, Dyz, Dzz).
90
+ prefix: Prefix for the output dataset name.
91
+ automask: Compute gradient images only for high-intensity (brain)\
92
+ voxels.
93
+ datum_type: Type of the output dataset (float, short, or byte).
94
+ scale_out_1000: Match with 3dDWItoDT's '-scale_out_1000' functionality.
95
+ help_: Show help message.
80
96
  Returns:
81
97
  Parameter dictionary
82
98
  """
@@ -85,7 +101,14 @@ def v_3d_dtto_dwi_params(
85
101
  "gradient_file": gradient_file,
86
102
  "i0_dataset": i0_dataset,
87
103
  "dt_dataset": dt_dataset,
104
+ "automask": automask,
105
+ "scale_out_1000": scale_out_1000,
106
+ "help": help_,
88
107
  }
108
+ if prefix is not None:
109
+ params["prefix"] = prefix
110
+ if datum_type is not None:
111
+ params["datum_type"] = datum_type
89
112
  return params
90
113
 
91
114
 
@@ -104,10 +127,25 @@ def v_3d_dtto_dwi_cargs(
104
127
  """
105
128
  cargs = []
106
129
  cargs.append("3dDTtoDWI")
107
- cargs.append("[OPTIONS]")
108
130
  cargs.append(execution.input_file(params.get("gradient_file")))
109
131
  cargs.append(execution.input_file(params.get("i0_dataset")))
110
132
  cargs.append(execution.input_file(params.get("dt_dataset")))
133
+ if params.get("prefix") is not None:
134
+ cargs.extend([
135
+ "-prefix",
136
+ params.get("prefix")
137
+ ])
138
+ if params.get("automask"):
139
+ cargs.append("-automask")
140
+ if params.get("datum_type") is not None:
141
+ cargs.extend([
142
+ "-datum",
143
+ params.get("datum_type")
144
+ ])
145
+ if params.get("scale_out_1000"):
146
+ cargs.append("-scale_out_1000")
147
+ if params.get("help"):
148
+ cargs.append("-help")
111
149
  return cargs
112
150
 
113
151
 
@@ -126,7 +164,7 @@ def v_3d_dtto_dwi_outputs(
126
164
  """
127
165
  ret = V3dDttoDwiOutputs(
128
166
  root=execution.output_file("."),
129
- output_dwi=execution.output_file("[PREFIX]*.HEAD"),
167
+ output_dwi=execution.output_file(params.get("prefix") + "*.HEAD") if (params.get("prefix") is not None) else None,
130
168
  )
131
169
  return ret
132
170
 
@@ -160,6 +198,11 @@ def v_3d_dtto_dwi(
160
198
  gradient_file: InputPathType,
161
199
  i0_dataset: InputPathType,
162
200
  dt_dataset: InputPathType,
201
+ prefix: str | None = None,
202
+ automask: bool = False,
203
+ datum_type: str | None = None,
204
+ scale_out_1000: bool = False,
205
+ help_: bool = False,
163
206
  runner: Runner | None = None,
164
207
  ) -> V3dDttoDwiOutputs:
165
208
  """
@@ -176,6 +219,12 @@ def v_3d_dtto_dwi(
176
219
  i0_dataset: Volume without any gradient applied.
177
220
  dt_dataset: 6-sub-brick dataset containing the diffusion tensor data\
178
221
  (Dxx, Dxy, Dyy, Dxz, Dyz, Dzz).
222
+ prefix: Prefix for the output dataset name.
223
+ automask: Compute gradient images only for high-intensity (brain)\
224
+ voxels.
225
+ datum_type: Type of the output dataset (float, short, or byte).
226
+ scale_out_1000: Match with 3dDWItoDT's '-scale_out_1000' functionality.
227
+ help_: Show help message.
179
228
  runner: Command runner.
180
229
  Returns:
181
230
  NamedTuple of outputs (described in `V3dDttoDwiOutputs`).
@@ -186,6 +235,11 @@ def v_3d_dtto_dwi(
186
235
  gradient_file=gradient_file,
187
236
  i0_dataset=i0_dataset,
188
237
  dt_dataset=dt_dataset,
238
+ prefix=prefix,
239
+ automask=automask,
240
+ datum_type=datum_type,
241
+ scale_out_1000=scale_out_1000,
242
+ help_=help_,
189
243
  )
190
244
  return v_3d_dtto_dwi_execute(params, execution)
191
245
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  V_3D_DWITO_DT_METADATA = Metadata(
9
- id="edef0edb2012159a76d51a09912a5bd6c5660ab2.boutiques",
9
+ id="09d06c55d013b2bd12bb78a05cda82297b034024.boutiques",
10
10
  name="3dDWItoDT",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -17,6 +17,30 @@ V3dDwitoDtParameters = typing.TypedDict('V3dDwitoDtParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["3dDWItoDT"],
18
18
  "gradient_file": InputPathType,
19
19
  "dataset": InputPathType,
20
+ "prefix": typing.NotRequired[str | None],
21
+ "automask": bool,
22
+ "mask": typing.NotRequired[InputPathType | None],
23
+ "bmatrix_NZ": typing.NotRequired[InputPathType | None],
24
+ "bmatrix_Z": typing.NotRequired[InputPathType | None],
25
+ "bmatrix_FULL": typing.NotRequired[InputPathType | None],
26
+ "scale_out_1000": bool,
27
+ "bmax_ref": typing.NotRequired[float | None],
28
+ "nonlinear": bool,
29
+ "linear": bool,
30
+ "reweight": bool,
31
+ "max_iter": typing.NotRequired[int | None],
32
+ "max_iter_rw": typing.NotRequired[int | None],
33
+ "eigs": bool,
34
+ "debug_briks": bool,
35
+ "cumulative_wts": bool,
36
+ "verbose": typing.NotRequired[int | None],
37
+ "drive_afni": typing.NotRequired[int | None],
38
+ "sep_dsets": bool,
39
+ "csf_val": typing.NotRequired[float | None],
40
+ "min_bad_md": typing.NotRequired[int | None],
41
+ "csf_fa": typing.NotRequired[float | None],
42
+ "opt": typing.NotRequired[str | None],
43
+ "mean_b0": bool,
20
44
  })
21
45
 
22
46
 
@@ -65,6 +89,30 @@ class V3dDwitoDtOutputs(typing.NamedTuple):
65
89
  def v_3d_dwito_dt_params(
66
90
  gradient_file: InputPathType,
67
91
  dataset: InputPathType,
92
+ prefix: str | None = None,
93
+ automask: bool = False,
94
+ mask: InputPathType | None = None,
95
+ bmatrix_nz: InputPathType | None = None,
96
+ bmatrix_z: InputPathType | None = None,
97
+ bmatrix_full: InputPathType | None = None,
98
+ scale_out_1000: bool = False,
99
+ bmax_ref: float | None = None,
100
+ nonlinear: bool = False,
101
+ linear: bool = False,
102
+ reweight: bool = False,
103
+ max_iter: int | None = None,
104
+ max_iter_rw: int | None = None,
105
+ eigs: bool = False,
106
+ debug_briks: bool = False,
107
+ cumulative_wts: bool = False,
108
+ verbose: int | None = None,
109
+ drive_afni: int | None = None,
110
+ sep_dsets: bool = False,
111
+ csf_val: float | None = None,
112
+ min_bad_md: int | None = None,
113
+ csf_fa: float | None = None,
114
+ opt: str | None = None,
115
+ mean_b0: bool = False,
68
116
  ) -> V3dDwitoDtParameters:
69
117
  """
70
118
  Build parameters.
@@ -74,6 +122,43 @@ def v_3d_dwito_dt_params(
74
122
  floats (Gxi, Gyi, Gzi) or a 1D file of b-matrix elements.
75
123
  dataset: A 3D bucket dataset with Np+1 sub-briks where the first\
76
124
  sub-brik is the volume acquired with no diffusion weighting.
125
+ prefix: Output dataset prefix name. Default is 'DT'.
126
+ automask: Mask dataset so that tensors are computed only for\
127
+ high-intensity (presumably brain) voxels.
128
+ mask: Use this dataset as mask to include/exclude voxels.
129
+ bmatrix_nz: Input dataset is b-matrix, not gradient directions, and\
130
+ there is no row of zeros at the top of the file.
131
+ bmatrix_z: Similar to '-bmatrix_NZ' but first row of the file is all\
132
+ zeros.
133
+ bmatrix_full: Same as '-bmatrix_Z' but with a more intuitive name.
134
+ scale_out_1000: Increase output parameters with physical units by\
135
+ multiplying them by 1000.
136
+ bmax_ref: Flag the reference b-value if it is greater than zero.
137
+ nonlinear: Compute iterative solution to avoid negative eigenvalues.\
138
+ This is the default method.
139
+ linear: Compute simple linear solution.
140
+ reweight: Recompute weight factors at end of iterations and restart.
141
+ max_iter: Maximum number of iterations for convergence. Default is 10.
142
+ max_iter_rw: Max number of iterations after reweighting. Default is 5.
143
+ eigs: Compute eigenvalues, eigenvectors, fractional anisotropy, and\
144
+ mean diffusivity in sub-briks 6-19.
145
+ debug_briks: Add sub-briks with error functional, original error,\
146
+ number of steps to convergence, and modeled B0 volume.
147
+ cumulative_wts: Show overall weight factors for each gradient level.
148
+ verbose: Print convergence steps every nnnnn voxels.
149
+ drive_afni: Show convergence graphs every nnnnn voxels. AFNI must have\
150
+ NIML communications on.
151
+ sep_dsets: Save tensor, eigenvalues, vectors, FA, MD in separate\
152
+ datasets.
153
+ csf_val: Assign diffusivity value to DWI data where the mean values for\
154
+ b=0 volumes is less than the mean of the remaining volumes at each\
155
+ voxel.
156
+ min_bad_md: Change the min MD value used as a 'badness check' for\
157
+ tensor fits.
158
+ csf_fa: Assign a specific FA value to CSF voxels.
159
+ opt: Optimization method: 'powell', 'gradient', or 'hybrid'.
160
+ mean_b0: Use mean of all b=0 volumes for linear computation and initial\
161
+ linear for nonlinear method.
77
162
  Returns:
78
163
  Parameter dictionary
79
164
  """
@@ -81,7 +166,45 @@ def v_3d_dwito_dt_params(
81
166
  "__STYXTYPE__": "3dDWItoDT",
82
167
  "gradient_file": gradient_file,
83
168
  "dataset": dataset,
169
+ "automask": automask,
170
+ "scale_out_1000": scale_out_1000,
171
+ "nonlinear": nonlinear,
172
+ "linear": linear,
173
+ "reweight": reweight,
174
+ "eigs": eigs,
175
+ "debug_briks": debug_briks,
176
+ "cumulative_wts": cumulative_wts,
177
+ "sep_dsets": sep_dsets,
178
+ "mean_b0": mean_b0,
84
179
  }
180
+ if prefix is not None:
181
+ params["prefix"] = prefix
182
+ if mask is not None:
183
+ params["mask"] = mask
184
+ if bmatrix_nz is not None:
185
+ params["bmatrix_NZ"] = bmatrix_nz
186
+ if bmatrix_z is not None:
187
+ params["bmatrix_Z"] = bmatrix_z
188
+ if bmatrix_full is not None:
189
+ params["bmatrix_FULL"] = bmatrix_full
190
+ if bmax_ref is not None:
191
+ params["bmax_ref"] = bmax_ref
192
+ if max_iter is not None:
193
+ params["max_iter"] = max_iter
194
+ if max_iter_rw is not None:
195
+ params["max_iter_rw"] = max_iter_rw
196
+ if verbose is not None:
197
+ params["verbose"] = verbose
198
+ if drive_afni is not None:
199
+ params["drive_afni"] = drive_afni
200
+ if csf_val is not None:
201
+ params["csf_val"] = csf_val
202
+ if min_bad_md is not None:
203
+ params["min_bad_md"] = min_bad_md
204
+ if csf_fa is not None:
205
+ params["csf_fa"] = csf_fa
206
+ if opt is not None:
207
+ params["opt"] = opt
85
208
  return params
86
209
 
87
210
 
@@ -100,9 +223,98 @@ def v_3d_dwito_dt_cargs(
100
223
  """
101
224
  cargs = []
102
225
  cargs.append("3dDWItoDT")
103
- cargs.append("[OPTIONS]")
104
226
  cargs.append(execution.input_file(params.get("gradient_file")))
105
227
  cargs.append(execution.input_file(params.get("dataset")))
228
+ if params.get("prefix") is not None:
229
+ cargs.extend([
230
+ "-prefix",
231
+ params.get("prefix")
232
+ ])
233
+ if params.get("automask"):
234
+ cargs.append("-automask")
235
+ if params.get("mask") is not None:
236
+ cargs.extend([
237
+ "-mask",
238
+ execution.input_file(params.get("mask"))
239
+ ])
240
+ if params.get("bmatrix_NZ") is not None:
241
+ cargs.extend([
242
+ "-bmatrix_NZ",
243
+ execution.input_file(params.get("bmatrix_NZ"))
244
+ ])
245
+ if params.get("bmatrix_Z") is not None:
246
+ cargs.extend([
247
+ "-bmatrix_Z",
248
+ execution.input_file(params.get("bmatrix_Z"))
249
+ ])
250
+ if params.get("bmatrix_FULL") is not None:
251
+ cargs.extend([
252
+ "-bmatrix_FULL",
253
+ execution.input_file(params.get("bmatrix_FULL"))
254
+ ])
255
+ if params.get("scale_out_1000"):
256
+ cargs.append("-scale_out_1000")
257
+ if params.get("bmax_ref") is not None:
258
+ cargs.extend([
259
+ "-bmax_ref",
260
+ str(params.get("bmax_ref"))
261
+ ])
262
+ if params.get("nonlinear"):
263
+ cargs.append("-nonlinear")
264
+ if params.get("linear"):
265
+ cargs.append("-linear")
266
+ if params.get("reweight"):
267
+ cargs.append("-reweight")
268
+ if params.get("max_iter") is not None:
269
+ cargs.extend([
270
+ "-max_iter",
271
+ str(params.get("max_iter"))
272
+ ])
273
+ if params.get("max_iter_rw") is not None:
274
+ cargs.extend([
275
+ "-max_iter_rw",
276
+ str(params.get("max_iter_rw"))
277
+ ])
278
+ if params.get("eigs"):
279
+ cargs.append("-eigs")
280
+ if params.get("debug_briks"):
281
+ cargs.append("-debug_briks")
282
+ if params.get("cumulative_wts"):
283
+ cargs.append("-cumulative_wts")
284
+ if params.get("verbose") is not None:
285
+ cargs.extend([
286
+ "-verbose",
287
+ str(params.get("verbose"))
288
+ ])
289
+ if params.get("drive_afni") is not None:
290
+ cargs.extend([
291
+ "-drive_afni",
292
+ str(params.get("drive_afni"))
293
+ ])
294
+ if params.get("sep_dsets"):
295
+ cargs.append("-sep_dsets")
296
+ if params.get("csf_val") is not None:
297
+ cargs.extend([
298
+ "-csf_val",
299
+ str(params.get("csf_val"))
300
+ ])
301
+ if params.get("min_bad_md") is not None:
302
+ cargs.extend([
303
+ "-min_bad_md",
304
+ str(params.get("min_bad_md"))
305
+ ])
306
+ if params.get("csf_fa") is not None:
307
+ cargs.extend([
308
+ "-csf_fa",
309
+ str(params.get("csf_fa"))
310
+ ])
311
+ if params.get("opt") is not None:
312
+ cargs.extend([
313
+ "-opt",
314
+ params.get("opt")
315
+ ])
316
+ if params.get("mean_b0"):
317
+ cargs.append("-mean_b0")
106
318
  return cargs
107
319
 
108
320
 
@@ -154,6 +366,30 @@ def v_3d_dwito_dt_execute(
154
366
  def v_3d_dwito_dt(
155
367
  gradient_file: InputPathType,
156
368
  dataset: InputPathType,
369
+ prefix: str | None = None,
370
+ automask: bool = False,
371
+ mask: InputPathType | None = None,
372
+ bmatrix_nz: InputPathType | None = None,
373
+ bmatrix_z: InputPathType | None = None,
374
+ bmatrix_full: InputPathType | None = None,
375
+ scale_out_1000: bool = False,
376
+ bmax_ref: float | None = None,
377
+ nonlinear: bool = False,
378
+ linear: bool = False,
379
+ reweight: bool = False,
380
+ max_iter: int | None = None,
381
+ max_iter_rw: int | None = None,
382
+ eigs: bool = False,
383
+ debug_briks: bool = False,
384
+ cumulative_wts: bool = False,
385
+ verbose: int | None = None,
386
+ drive_afni: int | None = None,
387
+ sep_dsets: bool = False,
388
+ csf_val: float | None = None,
389
+ min_bad_md: int | None = None,
390
+ csf_fa: float | None = None,
391
+ opt: str | None = None,
392
+ mean_b0: bool = False,
157
393
  runner: Runner | None = None,
158
394
  ) -> V3dDwitoDtOutputs:
159
395
  """
@@ -169,6 +405,43 @@ def v_3d_dwito_dt(
169
405
  floats (Gxi, Gyi, Gzi) or a 1D file of b-matrix elements.
170
406
  dataset: A 3D bucket dataset with Np+1 sub-briks where the first\
171
407
  sub-brik is the volume acquired with no diffusion weighting.
408
+ prefix: Output dataset prefix name. Default is 'DT'.
409
+ automask: Mask dataset so that tensors are computed only for\
410
+ high-intensity (presumably brain) voxels.
411
+ mask: Use this dataset as mask to include/exclude voxels.
412
+ bmatrix_nz: Input dataset is b-matrix, not gradient directions, and\
413
+ there is no row of zeros at the top of the file.
414
+ bmatrix_z: Similar to '-bmatrix_NZ' but first row of the file is all\
415
+ zeros.
416
+ bmatrix_full: Same as '-bmatrix_Z' but with a more intuitive name.
417
+ scale_out_1000: Increase output parameters with physical units by\
418
+ multiplying them by 1000.
419
+ bmax_ref: Flag the reference b-value if it is greater than zero.
420
+ nonlinear: Compute iterative solution to avoid negative eigenvalues.\
421
+ This is the default method.
422
+ linear: Compute simple linear solution.
423
+ reweight: Recompute weight factors at end of iterations and restart.
424
+ max_iter: Maximum number of iterations for convergence. Default is 10.
425
+ max_iter_rw: Max number of iterations after reweighting. Default is 5.
426
+ eigs: Compute eigenvalues, eigenvectors, fractional anisotropy, and\
427
+ mean diffusivity in sub-briks 6-19.
428
+ debug_briks: Add sub-briks with error functional, original error,\
429
+ number of steps to convergence, and modeled B0 volume.
430
+ cumulative_wts: Show overall weight factors for each gradient level.
431
+ verbose: Print convergence steps every nnnnn voxels.
432
+ drive_afni: Show convergence graphs every nnnnn voxels. AFNI must have\
433
+ NIML communications on.
434
+ sep_dsets: Save tensor, eigenvalues, vectors, FA, MD in separate\
435
+ datasets.
436
+ csf_val: Assign diffusivity value to DWI data where the mean values for\
437
+ b=0 volumes is less than the mean of the remaining volumes at each\
438
+ voxel.
439
+ min_bad_md: Change the min MD value used as a 'badness check' for\
440
+ tensor fits.
441
+ csf_fa: Assign a specific FA value to CSF voxels.
442
+ opt: Optimization method: 'powell', 'gradient', or 'hybrid'.
443
+ mean_b0: Use mean of all b=0 volumes for linear computation and initial\
444
+ linear for nonlinear method.
172
445
  runner: Command runner.
173
446
  Returns:
174
447
  NamedTuple of outputs (described in `V3dDwitoDtOutputs`).
@@ -178,6 +451,30 @@ def v_3d_dwito_dt(
178
451
  params = v_3d_dwito_dt_params(
179
452
  gradient_file=gradient_file,
180
453
  dataset=dataset,
454
+ prefix=prefix,
455
+ automask=automask,
456
+ mask=mask,
457
+ bmatrix_nz=bmatrix_nz,
458
+ bmatrix_z=bmatrix_z,
459
+ bmatrix_full=bmatrix_full,
460
+ scale_out_1000=scale_out_1000,
461
+ bmax_ref=bmax_ref,
462
+ nonlinear=nonlinear,
463
+ linear=linear,
464
+ reweight=reweight,
465
+ max_iter=max_iter,
466
+ max_iter_rw=max_iter_rw,
467
+ eigs=eigs,
468
+ debug_briks=debug_briks,
469
+ cumulative_wts=cumulative_wts,
470
+ verbose=verbose,
471
+ drive_afni=drive_afni,
472
+ sep_dsets=sep_dsets,
473
+ csf_val=csf_val,
474
+ min_bad_md=min_bad_md,
475
+ csf_fa=csf_fa,
476
+ opt=opt,
477
+ mean_b0=mean_b0,
181
478
  )
182
479
  return v_3d_dwito_dt_execute(params, execution)
183
480
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  V_3D_ECM_METADATA = Metadata(
9
- id="c9bc0ce1e3c30699a348a07653407f3b99801a2a.boutiques",
9
+ id="fe8e455e00c15b8128839ab77ca8b9a116a3a73b.boutiques",
10
10
  name="3dECM",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -24,7 +24,9 @@ V3dEcmParameters = typing.TypedDict('V3dEcmParameters', {
24
24
  "mask": typing.NotRequired[InputPathType | None],
25
25
  "max_iter": typing.NotRequired[int | None],
26
26
  "memory": typing.NotRequired[float | None],
27
+ "num_threads": typing.NotRequired[int | None],
27
28
  "outputtype": typing.NotRequired[typing.Literal["NIFTI", "AFNI", "NIFTI_GZ"] | None],
29
+ "out_file": typing.NotRequired[str | None],
28
30
  "polort": typing.NotRequired[int | None],
29
31
  "scale": typing.NotRequired[float | None],
30
32
  "shift": typing.NotRequired[float | None],
@@ -87,7 +89,9 @@ def v_3d_ecm_params(
87
89
  mask: InputPathType | None = None,
88
90
  max_iter: int | None = None,
89
91
  memory: float | None = None,
92
+ num_threads: int | None = None,
90
93
  outputtype: typing.Literal["NIFTI", "AFNI", "NIFTI_GZ"] | None = None,
94
+ out_file: str | None = None,
91
95
  polort: int | None = None,
92
96
  scale: float | None = None,
93
97
  shift: float | None = None,
@@ -114,7 +118,9 @@ def v_3d_ecm_params(
114
118
  iteration; default = 1000.
115
119
  memory: Limit memory consumption on system by setting the amount of gb\
116
120
  to limit the algorithm to; default = 2gb.
121
+ num_threads: Set number of threads.
117
122
  outputtype: 'nifti' or 'afni' or 'nifti_gz'. Afni output filetype.
123
+ out_file: Output image file name.
118
124
  polort: No description provided.
119
125
  scale: Scale correlation coefficients in similarity matrix to after\
120
126
  shifting, x >= 0.0; default = 1.0 for -full, 0.5 for -fecm.
@@ -141,8 +147,12 @@ def v_3d_ecm_params(
141
147
  params["max_iter"] = max_iter
142
148
  if memory is not None:
143
149
  params["memory"] = memory
150
+ if num_threads is not None:
151
+ params["num_threads"] = num_threads
144
152
  if outputtype is not None:
145
153
  params["outputtype"] = outputtype
154
+ if out_file is not None:
155
+ params["out_file"] = out_file
146
156
  if polort is not None:
147
157
  params["polort"] = polort
148
158
  if scale is not None:
@@ -200,9 +210,15 @@ def v_3d_ecm_cargs(
200
210
  "-memory",
201
211
  str(params.get("memory"))
202
212
  ])
203
- cargs.append("[OUT_FILE]")
213
+ if params.get("num_threads") is not None:
214
+ cargs.append(str(params.get("num_threads")))
204
215
  if params.get("outputtype") is not None:
205
216
  cargs.append(params.get("outputtype"))
217
+ if params.get("out_file") is not None:
218
+ cargs.extend([
219
+ "-prefix",
220
+ params.get("out_file")
221
+ ])
206
222
  if params.get("polort") is not None:
207
223
  cargs.extend([
208
224
  "-polort",
@@ -287,7 +303,9 @@ def v_3d_ecm(
287
303
  mask: InputPathType | None = None,
288
304
  max_iter: int | None = None,
289
305
  memory: float | None = None,
306
+ num_threads: int | None = None,
290
307
  outputtype: typing.Literal["NIFTI", "AFNI", "NIFTI_GZ"] | None = None,
308
+ out_file: str | None = None,
291
309
  polort: int | None = None,
292
310
  scale: float | None = None,
293
311
  shift: float | None = None,
@@ -320,7 +338,9 @@ def v_3d_ecm(
320
338
  iteration; default = 1000.
321
339
  memory: Limit memory consumption on system by setting the amount of gb\
322
340
  to limit the algorithm to; default = 2gb.
341
+ num_threads: Set number of threads.
323
342
  outputtype: 'nifti' or 'afni' or 'nifti_gz'. Afni output filetype.
343
+ out_file: Output image file name.
324
344
  polort: No description provided.
325
345
  scale: Scale correlation coefficients in similarity matrix to after\
326
346
  shifting, x >= 0.0; default = 1.0 for -full, 0.5 for -fecm.
@@ -344,7 +364,9 @@ def v_3d_ecm(
344
364
  mask=mask,
345
365
  max_iter=max_iter,
346
366
  memory=memory,
367
+ num_threads=num_threads,
347
368
  outputtype=outputtype,
369
+ out_file=out_file,
348
370
  polort=polort,
349
371
  scale=scale,
350
372
  shift=shift,
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  V_3D_FDR_METADATA = Metadata(
9
- id="052b0ab8a12acc2def2e27ee40fa90c4b23263c0.boutiques",
9
+ id="bfccf66ab83c665d5eb67ddf2fb4fae7d2d9767e.boutiques",
10
10
  name="3dFDR",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -16,6 +16,7 @@ V_3D_FDR_METADATA = Metadata(
16
16
  V3dFdrParameters = typing.TypedDict('V3dFdrParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["3dFDR"],
18
18
  "input_file": InputPathType,
19
+ "input1d_file": typing.NotRequired[InputPathType | None],
19
20
  "mask_file": typing.NotRequired[InputPathType | None],
20
21
  "mask_threshold": typing.NotRequired[float | None],
21
22
  "constant_type": typing.NotRequired[typing.Literal["cind", "cdep"] | None],
@@ -80,6 +81,7 @@ class V3dFdrOutputs(typing.NamedTuple):
80
81
  def v_3d_fdr_params(
81
82
  input_file: InputPathType,
82
83
  prefix: str,
84
+ input1d_file: InputPathType | None = None,
83
85
  mask_file: InputPathType | None = None,
84
86
  mask_threshold: float | None = None,
85
87
  constant_type: typing.Literal["cind", "cdep"] | None = None,
@@ -98,6 +100,7 @@ def v_3d_fdr_params(
98
100
  Args:
99
101
  input_file: Input 3D functional dataset filename.
100
102
  prefix: Use 'pname' for the output dataset prefix name.
103
+ input1d_file: .1D file containing column of p-values.
101
104
  mask_file: Use mask values from file mname. If file mname contains more\
102
105
  than 1 sub-brick, the mask sub-brick must be specified. Generally\
103
106
  should be used to avoid counting non-brain voxels.
@@ -130,6 +133,8 @@ def v_3d_fdr_params(
130
133
  "float": float_,
131
134
  "qval": qval,
132
135
  }
136
+ if input1d_file is not None:
137
+ params["input1d_file"] = input1d_file
133
138
  if mask_file is not None:
134
139
  params["mask_file"] = mask_file
135
140
  if mask_threshold is not None:
@@ -160,6 +165,11 @@ def v_3d_fdr_cargs(
160
165
  "-input",
161
166
  execution.input_file(params.get("input_file"))
162
167
  ])
168
+ if params.get("input1d_file") is not None:
169
+ cargs.extend([
170
+ "-input1D",
171
+ execution.input_file(params.get("input1d_file"))
172
+ ])
163
173
  if params.get("mask_file") is not None:
164
174
  cargs.extend([
165
175
  "-mask_file",
@@ -251,6 +261,7 @@ def v_3d_fdr_execute(
251
261
  def v_3d_fdr(
252
262
  input_file: InputPathType,
253
263
  prefix: str,
264
+ input1d_file: InputPathType | None = None,
254
265
  mask_file: InputPathType | None = None,
255
266
  mask_threshold: float | None = None,
256
267
  constant_type: typing.Literal["cind", "cdep"] | None = None,
@@ -275,6 +286,7 @@ def v_3d_fdr(
275
286
  Args:
276
287
  input_file: Input 3D functional dataset filename.
277
288
  prefix: Use 'pname' for the output dataset prefix name.
289
+ input1d_file: .1D file containing column of p-values.
278
290
  mask_file: Use mask values from file mname. If file mname contains more\
279
291
  than 1 sub-brick, the mask sub-brick must be specified. Generally\
280
292
  should be used to avoid counting non-brain voxels.
@@ -300,6 +312,7 @@ def v_3d_fdr(
300
312
  execution = runner.start_execution(V_3D_FDR_METADATA)
301
313
  params = v_3d_fdr_params(
302
314
  input_file=input_file,
315
+ input1d_file=input1d_file,
303
316
  mask_file=mask_file,
304
317
  mask_threshold=mask_threshold,
305
318
  constant_type=constant_type,