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

import typing
import pathlib
from styxdefs import *
import dataclasses

OLD_BETALL_METADATA = Metadata(
    id="0d125dc9864a4d2198c262c8290fdf39973062f4.boutiques",
    name="old_betall",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class OldBetallOutputs(typing.NamedTuple):
    """
    Output object returned when calling `old_betall(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_t1: OutputPathType
    """Output file root for T1 image"""
    output_t2: OutputPathType
    """Output file root for T2 image"""


def old_betall(
    t1_filerout: str,
    t2_filerout: str,
    runner: Runner | None = None,
) -> OldBetallOutputs:
    """
    Automated brain extraction tool for FSL involving both T1 and T2 images.
    
    Author: Oxford Centre for Functional MRI of the Brain (FMRIB)
    
    Args:
        t1_filerout: Input T1 image file root (e.g. img_t1.nii.gz).
        t2_filerout: Input T2 image file root (e.g. img_t2.nii.gz).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `OldBetallOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(OLD_BETALL_METADATA)
    cargs = []
    cargs.append("betall")
    cargs.append(t1_filerout)
    cargs.append(t2_filerout)
    ret = OldBetallOutputs(
        root=execution.output_file("."),
        output_t1=execution.output_file(t1_filerout),
        output_t2=execution.output_file(t2_filerout),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "OLD_BETALL_METADATA",
    "OldBetallOutputs",
    "old_betall",
]
