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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_ACOST_METADATA = Metadata(
    id="a26f72fc3f30ed24d5404341c23d8a193b525fda.boutiques",
    name="3dAcost",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dAcostOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_acost(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_head: OutputPathType
    """Output aligned dataset (HEAD file)"""
    output_brik: OutputPathType
    """Output aligned dataset (BRIK file)"""


def v_3d_acost(
    infile: InputPathType,
    basefile: InputPathType,
    outfile: str,
    runner: Runner | None = None,
) -> V3dAcostOutputs:
    """
    Allineate dataset to a base dataset.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dAcost.html
    
    Args:
        infile: Input dataset for allineation.
        basefile: Base dataset for allineation.
        outfile: Prefix for the output dataset.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dAcostOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_ACOST_METADATA)
    cargs = []
    cargs.append("3dAllineate")
    cargs.append(execution.input_file(infile))
    cargs.append("-base")
    cargs.extend([
        "-base",
        execution.input_file(basefile)
    ])
    cargs.append("-prefix")
    cargs.extend([
        "-prefix",
        outfile
    ])
    cargs.append("[OTHER_OPTIONS]")
    ret = V3dAcostOutputs(
        root=execution.output_file("."),
        output_head=execution.output_file(outfile + "+orig.HEAD"),
        output_brik=execution.output_file(outfile + "+orig.BRIK"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dAcostOutputs",
    "V_3D_ACOST_METADATA",
    "v_3d_acost",
]
