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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_TRANSLATE_ANNOTATION_METADATA = Metadata(
    id="d032fa992bc89b8d397cfa5c1c3735e9bf0447e6.boutiques",
    name="mris_translate_annotation",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisTranslateAnnotationOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_translate_annotation(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_annotation: OutputPathType
    """The output file with the translated annotation."""


def mris_translate_annotation(
    subject: str,
    hemi: str,
    in_annot: InputPathType,
    translation_file: InputPathType,
    out_annot: str,
    runner: Runner | None = None,
) -> MrisTranslateAnnotationOutputs:
    """
    This program applies a translation table to an annotation file.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject: The subject identifier.
        hemi: Hemisphere identifier (e.g., lh or rh).
        in_annot: Input annotation file.
        translation_file: Translation table file.
        out_annot: Output annotation file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisTranslateAnnotationOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_TRANSLATE_ANNOTATION_METADATA)
    cargs = []
    cargs.append("mris_translate_annotation")
    cargs.append(subject)
    cargs.append(hemi)
    cargs.append(execution.input_file(in_annot))
    cargs.append(execution.input_file(translation_file))
    cargs.append(out_annot)
    ret = MrisTranslateAnnotationOutputs(
        root=execution.output_file("."),
        output_annotation=execution.output_file(out_annot),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_TRANSLATE_ANNOTATION_METADATA",
    "MrisTranslateAnnotationOutputs",
    "mris_translate_annotation",
]
