# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

VECWARP_METADATA = Metadata(
    id="6c6580748aa2429883f7174bbcdc1a5eed33de73.boutiques",
    name="Vecwarp",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VecwarpOutputs(typing.NamedTuple):
    """
    Output object returned when calling `vecwarp(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType | None
    """The output file containing the transformed 3-vectors."""


def vecwarp(
    input_: InputPathType | None = None,
    output: str | None = None,
    force: bool = False,
    runner: Runner | None = None,
) -> VecwarpOutputs:
    """
    Transforms (warps) a list of 3-vectors into another list of 3-vectors according
    to the specified options.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/Vecwarp.html
    
    Args:
        input_: Read input 3-vectors from the file 'iii' (from stdin if 'iii'\
            is '-' or the -input option is missing).
        output: Write the output to file 'ooo' (to stdout if 'ooo' is '-', or\
            if the -output option is missing).
        force: If the output file already exists, use -force to overwrite it.\
            If -force is used, it must come before -output on the command line.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VecwarpOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(VECWARP_METADATA)
    cargs = []
    cargs.append("Vecwarp")
    cargs.append("[APAR")
    cargs.append("|")
    cargs.append("MATVEC]")
    cargs.append("[FORWARD_FLAG")
    cargs.append("|")
    cargs.append("BACKWARD_FLAG]")
    if input_ is not None:
        cargs.extend([
            "-input",
            execution.input_file(input_)
        ])
    if output is not None:
        cargs.extend([
            "-output",
            output
        ])
    if force:
        cargs.append("-force")
    ret = VecwarpOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output) if (output is not None) else None,
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VECWARP_METADATA",
    "VecwarpOutputs",
    "vecwarp",
]
