diff --git a/descriptors/afni/3dcalc.json b/descriptors/afni/3dcalc.json index e521452a6..8b47730bd 100644 --- a/descriptors/afni/3dcalc.json +++ b/descriptors/afni/3dcalc.json @@ -1,6 +1,6 @@ { "name": "3dcalc", - "command-line": "3dcalc [EXPR] [IN_FILE_A] [IN_FILE_B] [IN_FILE_C] [OTHER] [OVERWRITE] [SINGLE_IDX] [START_IDX] [STOP_IDX]", + "command-line": "3dcalc [IN_FILE_A] [IN_FILE_B] [IN_FILE_C] [OTHER] [OVERWRITE] [SINGLE_IDX] [START_IDX] [STOP_IDX] [EXPR] [PREFIX]", "author": "AFNI Developers", "description": "AFNI's calculator program.", "url": "https://afni.nimh.nih.gov/", @@ -11,7 +11,8 @@ "type": "String", "value-key": "[EXPR]", "description": "Expr.", - "optional": false + "optional": false, + "command-line-flag": "-expr" }, { "id": "in_file_a", @@ -85,6 +86,15 @@ "description": "Stop index for in_file_a.", "optional": true, "requires-inputs": ["start_idx"] + }, + { + "id": "prefix", + "name": "Prefix", + "type": "String", + "value-key": "[PREFIX]", + "description": "Output image file name.", + "optional": true, + "command-line-flag": "-prefix" } ], "output-files": [ @@ -93,9 +103,8 @@ "id": "out_file", "optional": true, "description": "Output image file name.", - "path-template": "[IN_FILE_A]", - "value-key": "[OUT_FILE]", - "command-line-flag": "-prefix" + "path-template": "[PREFIX]", + "value-key": "[PREFIX]" } ], "tool-version": "24.2.06", diff --git a/python/src/niwrap/afni/v_3dcalc.py b/python/src/niwrap/afni/v_3dcalc.py index eec41e7a4..ed839ae48 100644 --- a/python/src/niwrap/afni/v_3dcalc.py +++ b/python/src/niwrap/afni/v_3dcalc.py @@ -7,7 +7,7 @@ import dataclasses V_3DCALC_METADATA = Metadata( - id="66f28a66a111cc3612e13fb86d7e368e7be0a5a2.boutiques", + id="f5920a7aeb8d11c3fc7da3fd2f8b59f05d574b09.boutiques", name="3dcalc", package="afni", container_image_tag="afni/afni_make_build:AFNI_24.2.06", @@ -20,13 +20,13 @@ class V3dcalcOutputs(typing.NamedTuple): """ root: OutputPathType """Output root folder. This is the root folder for all outputs.""" - out_file: OutputPathType + out_file: OutputPathType | None """Output image file name.""" def v_3dcalc( - expr: str, in_file_a: InputPathType, + expr: str, in_file_b: InputPathType | None = None, in_file_c: InputPathType | None = None, other: InputPathType | None = None, @@ -34,6 +34,7 @@ def v_3dcalc( single_idx: int | None = None, start_idx: int | None = None, stop_idx: int | None = None, + prefix: str | None = None, runner: Runner | None = None, ) -> V3dcalcOutputs: """ @@ -44,8 +45,8 @@ def v_3dcalc( URL: https://afni.nimh.nih.gov/ Args: - expr: Expr. in_file_a: Input file to 3dcalc. + expr: Expr. in_file_b: Operand file to 3dcalc. in_file_c: Operand file to 3dcalc. other: Other options. @@ -53,6 +54,7 @@ def v_3dcalc( single_idx: Volume index for in_file_a. start_idx: Start index for in_file_a. stop_idx: Stop index for in_file_a. + prefix: Output image file name. runner: Command runner. Returns: NamedTuple of outputs (described in `V3dcalcOutputs`). @@ -61,7 +63,6 @@ def v_3dcalc( execution = runner.start_execution(V_3DCALC_METADATA) cargs = [] cargs.append("3dcalc") - cargs.append(expr) cargs.extend([ "-a", execution.input_file(in_file_a) @@ -86,9 +87,18 @@ def v_3dcalc( cargs.append(str(start_idx)) if stop_idx is not None: cargs.append(str(stop_idx)) + cargs.extend([ + "-expr", + expr + ]) + if prefix is not None: + cargs.extend([ + "-prefix", + prefix + ]) ret = V3dcalcOutputs( root=execution.output_file("."), - out_file=execution.output_file(pathlib.Path(in_file_a).name), + out_file=execution.output_file(prefix) if (prefix is not None) else None, ) execution.run(cargs) return ret diff --git a/python/src/niwrap/ants/ants_apply_transforms.py b/python/src/niwrap/ants/ants_apply_transforms.py index 8c8566171..9faafc6b3 100644 --- a/python/src/niwrap/ants/ants_apply_transforms.py +++ b/python/src/niwrap/ants/ants_apply_transforms.py @@ -7,7 +7,7 @@ import dataclasses ANTS_APPLY_TRANSFORMS_METADATA = Metadata( - id="84800d70a4619489f4cd962873674d0233d3976b.boutiques", + id="51e7058afdec76cc8dda4686e9c908617a912917.boutiques", name="antsApplyTransforms", package="ants", container_image_tag="antsx/ants:v2.5.3", @@ -227,6 +227,29 @@ def run( return cargs +@dataclasses.dataclass +class AntsApplyTransformsMultiLabelnoparams: + """ + Multi label interpolation. + """ + + def run( + self, + execution: Execution, + ) -> list[str]: + """ + Build command line arguments. This method is called by the main command. + + Args: + execution: The execution object. + Returns: + Command line arguments + """ + cargs = [] + cargs.append("MultiLabel") + return cargs + + @dataclasses.dataclass class AntsApplyTransformsSigma: """ @@ -562,7 +585,7 @@ def ants_apply_transforms( output: typing.Union[AntsApplyTransformsWarpedOutput, AntsApplyTransformsCompositeDisplacementFieldOutput, AntsApplyTransformsGenericAffineTransformOutput], dimensionality: typing.Literal[2, 3, 4] | None = None, input_image_type: typing.Literal[0, 1, 2, 3, 4, 5] | None = None, - interpolation: typing.Union[AntsApplyTransformsLinear, AntsApplyTransformsNearestNeighbor, AntsApplyTransformsMultiLabel, AntsApplyTransformsGaussian, AntsApplyTransformsBspline, AntsApplyTransformsCosineWindowedSinc, AntsApplyTransformsWelchWindowedSinc, AntsApplyTransformsHammingWindowedSinc, AntsApplyTransformsLanczosWindowedSinc, AntsApplyTransformsGenericLabel] | None = None, + interpolation: typing.Union[AntsApplyTransformsLinear, AntsApplyTransformsNearestNeighbor, AntsApplyTransformsMultiLabelnoparams, AntsApplyTransformsMultiLabel, AntsApplyTransformsGaussian, AntsApplyTransformsBspline, AntsApplyTransformsCosineWindowedSinc, AntsApplyTransformsWelchWindowedSinc, AntsApplyTransformsHammingWindowedSinc, AntsApplyTransformsLanczosWindowedSinc, AntsApplyTransformsGenericLabel] | None = None, output_data_type: typing.Literal["char", "uchar", "short", "int", "float", "double", "default"] | None = None, transform: list[typing.Union[AntsApplyTransformsTransformFileName, AntsApplyTransformsUseInverse]] | None = None, default_value: float | None = None, @@ -713,6 +736,7 @@ def ants_apply_transforms( "AntsApplyTransformsLanczosWindowedSinc", "AntsApplyTransformsLinear", "AntsApplyTransformsMultiLabel", + "AntsApplyTransformsMultiLabelnoparams", "AntsApplyTransformsNearestNeighbor", "AntsApplyTransformsOutputs", "AntsApplyTransformsParam",