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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__AUTO_TLRC_METADATA = Metadata(
    id="f82082ae0a2d8a6159b5e2fd4df475fad6592653.boutiques",
    name="@auto_tlrc",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VAutoTlrcOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__auto_tlrc(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_dataset: OutputPathType
    """Transformed anatomical volume dataset in TLRC space."""
    transform_file: OutputPathType
    """Transform used to align the anatomical dataset to the template."""


def v__auto_tlrc(
    runner: Runner | None = None,
) -> VAutoTlrcOutputs:
    """
    A script to transform an anatomical dataset to align with some standard space
    template and to apply the same TLRC transform obtained with @auto_tlrc in Usage
    1 mode to other datasets.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/@auto_tlrc.html
    
    Args:
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VAutoTlrcOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__AUTO_TLRC_METADATA)
    cargs = []
    cargs.append("@auto_tlrc")
    cargs.append("[OPTIONS]")
    cargs.append("<-base")
    cargs.append("template>")
    cargs.append("<-input")
    cargs.append("anat>")
    ret = VAutoTlrcOutputs(
        root=execution.output_file("."),
        output_dataset=execution.output_file("[PREFIX].nii.gz"),
        transform_file=execution.output_file("[PREFIX].Xat.1D"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VAutoTlrcOutputs",
    "V__AUTO_TLRC_METADATA",
    "v__auto_tlrc",
]
