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

import typing
import pathlib
from styxdefs import *
import dataclasses

TRIDEC_METADATA = Metadata(
    id="8f7bd0a6993abb2339230891eb8c52ffadaa9441.boutiques",
    name="tridec",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class TridecOutputs(typing.NamedTuple):
    """
    Output object returned when calling `tridec(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file from tridec processing."""


def tridec(
    subject_name: str,
    fine_file: InputPathType,
    ico_file: InputPathType,
    out_file: str,
    runner: Runner | None = None,
) -> TridecOutputs:
    """
    Tridec tool for processing brain images.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject_name: Name of the subject being processed.
        fine_file: Fine file input for tridec.
        ico_file: ICO file input for tridec.
        out_file: Output file for tridec processing result.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `TridecOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(TRIDEC_METADATA)
    cargs = []
    cargs.append("tridec")
    cargs.append(subject_name)
    cargs.append(execution.input_file(fine_file))
    cargs.append(execution.input_file(ico_file))
    cargs.append(out_file)
    ret = TridecOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(out_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "TRIDEC_METADATA",
    "TridecOutputs",
    "tridec",
]
