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.
- niwrap_afni/afni/abids_json_tool_py.py +104 -1
- niwrap_afni/afni/abids_tool.py +43 -1
- niwrap_afni/afni/adjunct_make_script_and_rst_py.py +2 -2
- niwrap_afni/afni/afni_batch_r.py +1 -2
- niwrap_afni/afni/balloon.py +25 -1
- niwrap_afni/afni/brain_skin.py +16 -1
- niwrap_afni/afni/build_afni_py.py +28 -1
- niwrap_afni/afni/cat_matvec.py +23 -1
- niwrap_afni/afni/convert_surface.py +38 -1
- niwrap_afni/afni/dicom_hinfo.py +9 -2
- niwrap_afni/afni/dsetstat2p.py +19 -1
- niwrap_afni/afni/fat_proc_align_anat_pair.py +10 -1
- niwrap_afni/afni/fat_proc_convert_dcm_anat.py +16 -1
- niwrap_afni/afni/fat_roi_row.py +1 -4
- niwrap_afni/afni/fsread_annot.py +2 -2
- niwrap_afni/afni/imrotate.py +10 -1
- niwrap_afni/afni/myget.py +16 -3
- niwrap_afni/afni/nifti_tool.py +3 -2
- niwrap_afni/afni/p2dsetstat.py +19 -1
- niwrap_afni/afni/plugout_drive.py +93 -1
- niwrap_afni/afni/prompt_popup.py +46 -1
- niwrap_afni/afni/prompt_user.py +16 -1
- niwrap_afni/afni/rbox.py +170 -9
- niwrap_afni/afni/samp_bias.py +16 -1
- niwrap_afni/afni/sfim.py +9 -2
- niwrap_afni/afni/stimband.py +22 -3
- niwrap_afni/afni/surf_dist.py +47 -1
- niwrap_afni/afni/surf_fwhm.py +1 -5
- niwrap_afni/afni/surf_info.py +99 -2
- niwrap_afni/afni/surface_metrics.py +179 -172
- niwrap_afni/afni/tedana_wrapper_py.py +19 -1
- niwrap_afni/afni/v_1d_bport.py +12 -1
- niwrap_afni/afni/v_1d_correlate.py +39 -1
- niwrap_afni/afni/v_1d_marry.py +1 -2
- niwrap_afni/afni/v_1d_rplot.py +233 -4
- niwrap_afni/afni/v_1d_sem.py +157 -2
- niwrap_afni/afni/v_1d_tsort.py +10 -1
- niwrap_afni/afni/v_1ddot.py +5 -4
- niwrap_afni/afni/v_1deval.py +16 -1
- niwrap_afni/afni/v_1dgen_arma11.py +16 -1
- niwrap_afni/afni/v_3_droimaker.py +16 -1
- niwrap_afni/afni/v_3d_afnito3_d.py +34 -4
- niwrap_afni/afni/v_3d_afnito_niml.py +34 -2
- niwrap_afni/afni/v_3d_amp_to_rsfc.py +10 -9
- niwrap_afni/afni/v_3d_anova3.py +323 -20
- niwrap_afni/afni/v_3d_clip_level.py +38 -2
- niwrap_afni/afni/v_3d_clust_sim.py +275 -22
- niwrap_afni/afni/v_3d_cm.py +103 -2
- niwrap_afni/afni/v_3d_dtto_dwi.py +58 -4
- niwrap_afni/afni/v_3d_dwito_dt.py +299 -2
- niwrap_afni/afni/v_3d_ecm.py +24 -2
- niwrap_afni/afni/v_3d_fdr.py +14 -1
- niwrap_afni/afni/v_3d_gen_feature_dist.py +53 -1
- niwrap_afni/afni/v_3d_hist.py +14 -1
- niwrap_afni/afni/v_3d_icc.py +137 -2
- niwrap_afni/afni/v_3d_lfcd.py +24 -5
- niwrap_afni/afni/v_3d_lme.py +1 -3
- niwrap_afni/afni/v_3d_local_histog.py +32 -1
- niwrap_afni/afni/v_3d_lrflip.py +46 -1
- niwrap_afni/afni/v_3d_lss.py +107 -4
- niwrap_afni/afni/v_3d_mask_to_ascii.py +12 -4
- niwrap_afni/afni/v_3d_mema.py +301 -3
- niwrap_afni/afni/v_3d_mepfm.py +1 -2
- niwrap_afni/afni/v_3d_nlfim.py +487 -30
- niwrap_afni/afni/v_3d_nwarp_xyz.py +27 -14
- niwrap_afni/afni/v_3d_overlap.py +20 -6
- niwrap_afni/afni/v_3d_par2_afni.py +32 -1
- niwrap_afni/afni/v_3d_pfm.py +200 -2
- niwrap_afni/afni/v_3d_remlfit.py +41 -1
- niwrap_afni/afni/v_3d_roistats.py +1 -2
- niwrap_afni/afni/v_3d_rsfc.py +240 -6
- niwrap_afni/afni/v_3d_stat_clust.py +19 -1
- niwrap_afni/afni/v_3d_tcat.py +24 -5
- niwrap_afni/afni/v_3d_threeto_rgb.py +1 -2
- niwrap_afni/afni/v_3d_toy_prog.py +111 -1
- niwrap_afni/afni/v_3d_tsgen.py +18 -1
- niwrap_afni/afni/v_3d_tsort.py +10 -1
- niwrap_afni/afni/v_3d_tstat.py +25 -15
- niwrap_afni/afni/v_3d_undump.py +10 -1
- niwrap_afni/afni/v_3d_warp.py +236 -2
- niwrap_afni/afni/v_3d_wilcoxon.py +9 -7
- niwrap_afni/afni/v_3dbucket.py +14 -1
- niwrap_afni/afni/v_3dcalc.py +1 -1
- niwrap_afni/afni/v_3dcopy.py +31 -3
- niwrap_afni/afni/v_3dmask_svd.py +99 -2
- niwrap_afni/afni/v__4_daverage.py +11 -2
- niwrap_afni/afni/v__afni_env.py +19 -1
- niwrap_afni/afni/v__afni_refacer_run.py +36 -1
- niwrap_afni/afni/v__build_afni_xlib.py +21 -1
- niwrap_afni/afni/v__chauffeur_afni.py +184 -2
- niwrap_afni/afni/v__command_globb.py +13 -7
- niwrap_afni/afni/v__compute_oc_weights.py +16 -1
- niwrap_afni/afni/v__deblank_file_names.py +13 -2
- niwrap_afni/afni/v__dice_metric.py +18 -14
- niwrap_afni/afni/v__djunct_edgy_align_check.py +82 -10
- niwrap_afni/afni/v__djunct_montage_coordinator.py +10 -1
- niwrap_afni/afni/v__get_afni_res.py +3 -2
- niwrap_afni/afni/v__grad_flip_test.py +38 -42
- niwrap_afni/afni/v__grayplot.py +34 -1
- niwrap_afni/afni/v__help_afni.py +63 -2
- niwrap_afni/afni/v__make_label_table.py +14 -1
- niwrap_afni/afni/v__no_ext.py +9 -2
- niwrap_afni/afni/v__reorder.py +10 -1
- niwrap_afni/afni/v__skull_strip_touch_up.py +10 -1
- niwrap_afni/afni/v__suma_make_spec_caret.py +62 -2
- niwrap_afni/afni/v__suma_make_spec_fs.py +180 -2
- niwrap_afni/afni/v__to_mni_qwarpar.py +21 -1
- niwrap_afni/afni/v__to_rai.py +23 -7
- {niwrap_afni-0.5.0.dist-info → niwrap_afni-0.5.2.dist-info}/METADATA +1 -1
- {niwrap_afni-0.5.0.dist-info → niwrap_afni-0.5.2.dist-info}/RECORD +111 -111
- {niwrap_afni-0.5.0.dist-info → niwrap_afni-0.5.2.dist-info}/WHEEL +0 -0
niwrap_afni/afni/v_3d_lrflip.py
CHANGED
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
V_3D_LRFLIP_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="cccfbbdb6c5cece891a86f81aefb3b59ea32fe70.boutiques",
|
|
10
10
|
name="3dLRflip",
|
|
11
11
|
package="afni",
|
|
12
12
|
container_image_tag="afni/afni_make_build:AFNI_24.2.06",
|
|
@@ -15,6 +15,11 @@ V_3D_LRFLIP_METADATA = Metadata(
|
|
|
15
15
|
|
|
16
16
|
V3dLrflipParameters = typing.TypedDict('V3dLrflipParameters', {
|
|
17
17
|
"__STYX_TYPE__": typing.Literal["3dLRflip"],
|
|
18
|
+
"flip_lr": bool,
|
|
19
|
+
"flip_ap": bool,
|
|
20
|
+
"flip_is": bool,
|
|
21
|
+
"flip_x": bool,
|
|
22
|
+
"flip_y": bool,
|
|
18
23
|
"flip_z": bool,
|
|
19
24
|
"output_prefix": typing.NotRequired[str | None],
|
|
20
25
|
"datasets": list[InputPathType],
|
|
@@ -65,6 +70,11 @@ class V3dLrflipOutputs(typing.NamedTuple):
|
|
|
65
70
|
|
|
66
71
|
def v_3d_lrflip_params(
|
|
67
72
|
datasets: list[InputPathType],
|
|
73
|
+
flip_lr: bool = False,
|
|
74
|
+
flip_ap: bool = False,
|
|
75
|
+
flip_is: bool = False,
|
|
76
|
+
flip_x: bool = False,
|
|
77
|
+
flip_y: bool = False,
|
|
68
78
|
flip_z: bool = False,
|
|
69
79
|
output_prefix: str | None = None,
|
|
70
80
|
) -> V3dLrflipParameters:
|
|
@@ -73,6 +83,11 @@ def v_3d_lrflip_params(
|
|
|
73
83
|
|
|
74
84
|
Args:
|
|
75
85
|
datasets: Datasets to flip.
|
|
86
|
+
flip_lr: Flip about Left-Right axis.
|
|
87
|
+
flip_ap: Flip about Anterior-Posterior axis.
|
|
88
|
+
flip_is: Flip about Inferior-Superior axis.
|
|
89
|
+
flip_x: Flip about the 1st direction.
|
|
90
|
+
flip_y: Flip about the 2nd direction.
|
|
76
91
|
flip_z: Flip about the 3rd direction.
|
|
77
92
|
output_prefix: Prefix to use for output. If multiple datasets are\
|
|
78
93
|
input, the program will choose a prefix for each output.
|
|
@@ -81,6 +96,11 @@ def v_3d_lrflip_params(
|
|
|
81
96
|
"""
|
|
82
97
|
params = {
|
|
83
98
|
"__STYXTYPE__": "3dLRflip",
|
|
99
|
+
"flip_lr": flip_lr,
|
|
100
|
+
"flip_ap": flip_ap,
|
|
101
|
+
"flip_is": flip_is,
|
|
102
|
+
"flip_x": flip_x,
|
|
103
|
+
"flip_y": flip_y,
|
|
84
104
|
"flip_z": flip_z,
|
|
85
105
|
"datasets": datasets,
|
|
86
106
|
}
|
|
@@ -104,6 +124,16 @@ def v_3d_lrflip_cargs(
|
|
|
104
124
|
"""
|
|
105
125
|
cargs = []
|
|
106
126
|
cargs.append("3dLRflip")
|
|
127
|
+
if params.get("flip_lr"):
|
|
128
|
+
cargs.append("-LR")
|
|
129
|
+
if params.get("flip_ap"):
|
|
130
|
+
cargs.append("-AP")
|
|
131
|
+
if params.get("flip_is"):
|
|
132
|
+
cargs.append("-IS")
|
|
133
|
+
if params.get("flip_x"):
|
|
134
|
+
cargs.append("-X")
|
|
135
|
+
if params.get("flip_y"):
|
|
136
|
+
cargs.append("-Y")
|
|
107
137
|
if params.get("flip_z"):
|
|
108
138
|
cargs.append("-Z")
|
|
109
139
|
if params.get("output_prefix") is not None:
|
|
@@ -162,6 +192,11 @@ def v_3d_lrflip_execute(
|
|
|
162
192
|
|
|
163
193
|
def v_3d_lrflip(
|
|
164
194
|
datasets: list[InputPathType],
|
|
195
|
+
flip_lr: bool = False,
|
|
196
|
+
flip_ap: bool = False,
|
|
197
|
+
flip_is: bool = False,
|
|
198
|
+
flip_x: bool = False,
|
|
199
|
+
flip_y: bool = False,
|
|
165
200
|
flip_z: bool = False,
|
|
166
201
|
output_prefix: str | None = None,
|
|
167
202
|
runner: Runner | None = None,
|
|
@@ -176,6 +211,11 @@ def v_3d_lrflip(
|
|
|
176
211
|
|
|
177
212
|
Args:
|
|
178
213
|
datasets: Datasets to flip.
|
|
214
|
+
flip_lr: Flip about Left-Right axis.
|
|
215
|
+
flip_ap: Flip about Anterior-Posterior axis.
|
|
216
|
+
flip_is: Flip about Inferior-Superior axis.
|
|
217
|
+
flip_x: Flip about the 1st direction.
|
|
218
|
+
flip_y: Flip about the 2nd direction.
|
|
179
219
|
flip_z: Flip about the 3rd direction.
|
|
180
220
|
output_prefix: Prefix to use for output. If multiple datasets are\
|
|
181
221
|
input, the program will choose a prefix for each output.
|
|
@@ -186,6 +226,11 @@ def v_3d_lrflip(
|
|
|
186
226
|
runner = runner or get_global_runner()
|
|
187
227
|
execution = runner.start_execution(V_3D_LRFLIP_METADATA)
|
|
188
228
|
params = v_3d_lrflip_params(
|
|
229
|
+
flip_lr=flip_lr,
|
|
230
|
+
flip_ap=flip_ap,
|
|
231
|
+
flip_is=flip_is,
|
|
232
|
+
flip_x=flip_x,
|
|
233
|
+
flip_y=flip_y,
|
|
189
234
|
flip_z=flip_z,
|
|
190
235
|
output_prefix=output_prefix,
|
|
191
236
|
datasets=datasets,
|
niwrap_afni/afni/v_3d_lss.py
CHANGED
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
V_3D_LSS_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="d4c111d4b5225efa7f8cd3f4642fd461a7ab156b.boutiques",
|
|
10
10
|
name="3dLSS",
|
|
11
11
|
package="afni",
|
|
12
12
|
container_image_tag="afni/afni_make_build:AFNI_24.2.06",
|
|
@@ -15,6 +15,14 @@ V_3D_LSS_METADATA = Metadata(
|
|
|
15
15
|
|
|
16
16
|
V3dLssParameters = typing.TypedDict('V3dLssParameters', {
|
|
17
17
|
"__STYX_TYPE__": typing.Literal["3dLSS"],
|
|
18
|
+
"matrix": InputPathType,
|
|
19
|
+
"input": typing.NotRequired[InputPathType | None],
|
|
20
|
+
"nodata": bool,
|
|
21
|
+
"mask": typing.NotRequired[InputPathType | None],
|
|
22
|
+
"automask": bool,
|
|
23
|
+
"prefix": typing.NotRequired[str | None],
|
|
24
|
+
"save1D": typing.NotRequired[str | None],
|
|
25
|
+
"verbose": bool,
|
|
18
26
|
})
|
|
19
27
|
|
|
20
28
|
|
|
@@ -59,22 +67,57 @@ class V3dLssOutputs(typing.NamedTuple):
|
|
|
59
67
|
output_dataset: OutputPathType
|
|
60
68
|
"""Output dataset containing the LSS estimates of the beta weights for the
|
|
61
69
|
'-stim_times_IM' stimuli."""
|
|
62
|
-
save1_d_output: OutputPathType
|
|
70
|
+
save1_d_output: OutputPathType | None
|
|
63
71
|
"""Estimator vectors saved in a 1D formatted file."""
|
|
64
72
|
|
|
65
73
|
|
|
66
74
|
def v_3d_lss_params(
|
|
75
|
+
matrix: InputPathType,
|
|
76
|
+
input_: InputPathType | None = None,
|
|
77
|
+
nodata: bool = False,
|
|
78
|
+
mask: InputPathType | None = None,
|
|
79
|
+
automask: bool = False,
|
|
80
|
+
prefix: str | None = None,
|
|
81
|
+
save1_d: str | None = None,
|
|
82
|
+
verbose: bool = False,
|
|
67
83
|
) -> V3dLssParameters:
|
|
68
84
|
"""
|
|
69
85
|
Build parameters.
|
|
70
86
|
|
|
71
87
|
Args:
|
|
88
|
+
matrix: Read the matrix 'mmm', which should have been output from\
|
|
89
|
+
3dDeconvolve via the '-x1D' option. It should have included exactly one\
|
|
90
|
+
'-stim_times_IM' option.
|
|
91
|
+
input_: Read time series dataset 'ddd'.
|
|
92
|
+
nodata: Just compute the estimator matrix -- to be saved with\
|
|
93
|
+
'-save1D'.
|
|
94
|
+
mask: Dataset 'MMM' will be used as a mask for the input; voxels\
|
|
95
|
+
outside the mask will not be fit by the regression model.
|
|
96
|
+
automask: If you don't know what this does by now, please don't use\
|
|
97
|
+
this program.
|
|
98
|
+
prefix: Prefix name for the output dataset; this dataset will contain\
|
|
99
|
+
ONLY the LSS estimates of the beta weights for the '-stim_times_IM'\
|
|
100
|
+
stimuli.
|
|
101
|
+
save1_d: Save the estimator vectors to a 1D formatted file named 'qqq'.
|
|
102
|
+
verbose: Write out progress reports.
|
|
72
103
|
Returns:
|
|
73
104
|
Parameter dictionary
|
|
74
105
|
"""
|
|
75
106
|
params = {
|
|
76
107
|
"__STYXTYPE__": "3dLSS",
|
|
108
|
+
"matrix": matrix,
|
|
109
|
+
"nodata": nodata,
|
|
110
|
+
"automask": automask,
|
|
111
|
+
"verbose": verbose,
|
|
77
112
|
}
|
|
113
|
+
if input_ is not None:
|
|
114
|
+
params["input"] = input_
|
|
115
|
+
if mask is not None:
|
|
116
|
+
params["mask"] = mask
|
|
117
|
+
if prefix is not None:
|
|
118
|
+
params["prefix"] = prefix
|
|
119
|
+
if save1_d is not None:
|
|
120
|
+
params["save1D"] = save1_d
|
|
78
121
|
return params
|
|
79
122
|
|
|
80
123
|
|
|
@@ -93,7 +136,36 @@ def v_3d_lss_cargs(
|
|
|
93
136
|
"""
|
|
94
137
|
cargs = []
|
|
95
138
|
cargs.append("3dLSS")
|
|
96
|
-
cargs.
|
|
139
|
+
cargs.extend([
|
|
140
|
+
"-matrix",
|
|
141
|
+
execution.input_file(params.get("matrix"))
|
|
142
|
+
])
|
|
143
|
+
if params.get("input") is not None:
|
|
144
|
+
cargs.extend([
|
|
145
|
+
"-input",
|
|
146
|
+
execution.input_file(params.get("input"))
|
|
147
|
+
])
|
|
148
|
+
if params.get("nodata"):
|
|
149
|
+
cargs.append("-nodata")
|
|
150
|
+
if params.get("mask") is not None:
|
|
151
|
+
cargs.extend([
|
|
152
|
+
"-mask",
|
|
153
|
+
execution.input_file(params.get("mask"))
|
|
154
|
+
])
|
|
155
|
+
if params.get("automask"):
|
|
156
|
+
cargs.append("-automask")
|
|
157
|
+
if params.get("prefix") is not None:
|
|
158
|
+
cargs.extend([
|
|
159
|
+
"-prefix",
|
|
160
|
+
params.get("prefix")
|
|
161
|
+
])
|
|
162
|
+
if params.get("save1D") is not None:
|
|
163
|
+
cargs.extend([
|
|
164
|
+
"-save1D",
|
|
165
|
+
params.get("save1D")
|
|
166
|
+
])
|
|
167
|
+
if params.get("verbose"):
|
|
168
|
+
cargs.append("-verb")
|
|
97
169
|
return cargs
|
|
98
170
|
|
|
99
171
|
|
|
@@ -113,7 +185,7 @@ def v_3d_lss_outputs(
|
|
|
113
185
|
ret = V3dLssOutputs(
|
|
114
186
|
root=execution.output_file("."),
|
|
115
187
|
output_dataset=execution.output_file("LSSout+orig.HEAD"),
|
|
116
|
-
save1_d_output=execution.output_file("
|
|
188
|
+
save1_d_output=execution.output_file(params.get("save1D")) if (params.get("save1D") is not None) else None,
|
|
117
189
|
)
|
|
118
190
|
return ret
|
|
119
191
|
|
|
@@ -144,6 +216,14 @@ def v_3d_lss_execute(
|
|
|
144
216
|
|
|
145
217
|
|
|
146
218
|
def v_3d_lss(
|
|
219
|
+
matrix: InputPathType,
|
|
220
|
+
input_: InputPathType | None = None,
|
|
221
|
+
nodata: bool = False,
|
|
222
|
+
mask: InputPathType | None = None,
|
|
223
|
+
automask: bool = False,
|
|
224
|
+
prefix: str | None = None,
|
|
225
|
+
save1_d: str | None = None,
|
|
226
|
+
verbose: bool = False,
|
|
147
227
|
runner: Runner | None = None,
|
|
148
228
|
) -> V3dLssOutputs:
|
|
149
229
|
"""
|
|
@@ -155,6 +235,21 @@ def v_3d_lss(
|
|
|
155
235
|
URL: https://afni.nimh.nih.gov/
|
|
156
236
|
|
|
157
237
|
Args:
|
|
238
|
+
matrix: Read the matrix 'mmm', which should have been output from\
|
|
239
|
+
3dDeconvolve via the '-x1D' option. It should have included exactly one\
|
|
240
|
+
'-stim_times_IM' option.
|
|
241
|
+
input_: Read time series dataset 'ddd'.
|
|
242
|
+
nodata: Just compute the estimator matrix -- to be saved with\
|
|
243
|
+
'-save1D'.
|
|
244
|
+
mask: Dataset 'MMM' will be used as a mask for the input; voxels\
|
|
245
|
+
outside the mask will not be fit by the regression model.
|
|
246
|
+
automask: If you don't know what this does by now, please don't use\
|
|
247
|
+
this program.
|
|
248
|
+
prefix: Prefix name for the output dataset; this dataset will contain\
|
|
249
|
+
ONLY the LSS estimates of the beta weights for the '-stim_times_IM'\
|
|
250
|
+
stimuli.
|
|
251
|
+
save1_d: Save the estimator vectors to a 1D formatted file named 'qqq'.
|
|
252
|
+
verbose: Write out progress reports.
|
|
158
253
|
runner: Command runner.
|
|
159
254
|
Returns:
|
|
160
255
|
NamedTuple of outputs (described in `V3dLssOutputs`).
|
|
@@ -162,6 +257,14 @@ def v_3d_lss(
|
|
|
162
257
|
runner = runner or get_global_runner()
|
|
163
258
|
execution = runner.start_execution(V_3D_LSS_METADATA)
|
|
164
259
|
params = v_3d_lss_params(
|
|
260
|
+
matrix=matrix,
|
|
261
|
+
input_=input_,
|
|
262
|
+
nodata=nodata,
|
|
263
|
+
mask=mask,
|
|
264
|
+
automask=automask,
|
|
265
|
+
prefix=prefix,
|
|
266
|
+
save1_d=save1_d,
|
|
267
|
+
verbose=verbose,
|
|
165
268
|
)
|
|
166
269
|
return v_3d_lss_execute(params, execution)
|
|
167
270
|
|
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
V_3D_MASK_TO_ASCII_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="20970426ca6ec9c84b1d7625189cb189cffb0a2f.boutiques",
|
|
10
10
|
name="3dMaskToASCII",
|
|
11
11
|
package="afni",
|
|
12
12
|
container_image_tag="afni/afni_make_build:AFNI_24.2.06",
|
|
@@ -17,6 +17,7 @@ V3dMaskToAsciiParameters = typing.TypedDict('V3dMaskToAsciiParameters', {
|
|
|
17
17
|
"__STYX_TYPE__": typing.Literal["3dMaskToASCII"],
|
|
18
18
|
"tobin_flag": bool,
|
|
19
19
|
"dataset": InputPathType,
|
|
20
|
+
"outputfile": str,
|
|
20
21
|
})
|
|
21
22
|
|
|
22
23
|
|
|
@@ -64,6 +65,7 @@ class V3dMaskToAsciiOutputs(typing.NamedTuple):
|
|
|
64
65
|
|
|
65
66
|
def v_3d_mask_to_ascii_params(
|
|
66
67
|
dataset: InputPathType,
|
|
68
|
+
outputfile: str,
|
|
67
69
|
tobin_flag: bool = False,
|
|
68
70
|
) -> V3dMaskToAsciiParameters:
|
|
69
71
|
"""
|
|
@@ -71,6 +73,8 @@ def v_3d_mask_to_ascii_params(
|
|
|
71
73
|
|
|
72
74
|
Args:
|
|
73
75
|
dataset: Input dataset (e.g. mask.nii.gz).
|
|
76
|
+
outputfile: Output file where ASCII string mask or binary mask will be\
|
|
77
|
+
written.
|
|
74
78
|
tobin_flag: Read ASCII mask, expand it to byte-valued dataset, and\
|
|
75
79
|
write to stdout.
|
|
76
80
|
Returns:
|
|
@@ -80,6 +84,7 @@ def v_3d_mask_to_ascii_params(
|
|
|
80
84
|
"__STYXTYPE__": "3dMaskToASCII",
|
|
81
85
|
"tobin_flag": tobin_flag,
|
|
82
86
|
"dataset": dataset,
|
|
87
|
+
"outputfile": outputfile,
|
|
83
88
|
}
|
|
84
89
|
return params
|
|
85
90
|
|
|
@@ -102,8 +107,7 @@ def v_3d_mask_to_ascii_cargs(
|
|
|
102
107
|
if params.get("tobin_flag"):
|
|
103
108
|
cargs.append("-tobin")
|
|
104
109
|
cargs.append(execution.input_file(params.get("dataset")))
|
|
105
|
-
cargs.append(">")
|
|
106
|
-
cargs.append("[OUTPUTFILE]")
|
|
110
|
+
cargs.append("> " + params.get("outputfile"))
|
|
107
111
|
return cargs
|
|
108
112
|
|
|
109
113
|
|
|
@@ -122,7 +126,7 @@ def v_3d_mask_to_ascii_outputs(
|
|
|
122
126
|
"""
|
|
123
127
|
ret = V3dMaskToAsciiOutputs(
|
|
124
128
|
root=execution.output_file("."),
|
|
125
|
-
outputfile=execution.output_file("
|
|
129
|
+
outputfile=execution.output_file(params.get("outputfile")),
|
|
126
130
|
)
|
|
127
131
|
return ret
|
|
128
132
|
|
|
@@ -153,6 +157,7 @@ def v_3d_mask_to_ascii_execute(
|
|
|
153
157
|
|
|
154
158
|
def v_3d_mask_to_ascii(
|
|
155
159
|
dataset: InputPathType,
|
|
160
|
+
outputfile: str,
|
|
156
161
|
tobin_flag: bool = False,
|
|
157
162
|
runner: Runner | None = None,
|
|
158
163
|
) -> V3dMaskToAsciiOutputs:
|
|
@@ -165,6 +170,8 @@ def v_3d_mask_to_ascii(
|
|
|
165
170
|
|
|
166
171
|
Args:
|
|
167
172
|
dataset: Input dataset (e.g. mask.nii.gz).
|
|
173
|
+
outputfile: Output file where ASCII string mask or binary mask will be\
|
|
174
|
+
written.
|
|
168
175
|
tobin_flag: Read ASCII mask, expand it to byte-valued dataset, and\
|
|
169
176
|
write to stdout.
|
|
170
177
|
runner: Command runner.
|
|
@@ -176,6 +183,7 @@ def v_3d_mask_to_ascii(
|
|
|
176
183
|
params = v_3d_mask_to_ascii_params(
|
|
177
184
|
tobin_flag=tobin_flag,
|
|
178
185
|
dataset=dataset,
|
|
186
|
+
outputfile=outputfile,
|
|
179
187
|
)
|
|
180
188
|
return v_3d_mask_to_ascii_execute(params, execution)
|
|
181
189
|
|