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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_SEGMENT_METADATA = Metadata(
    id="874f399dc8d69d96d209aceed20b75e4de0707c9.boutiques",
    name="mris_segment",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisSegmentOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_segment(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    segmented_output: OutputPathType
    """Segmented surfaces output file"""


def mris_segment(
    subjects: list[str],
    output_subject: str,
    output_file: str,
    runner: Runner | None = None,
) -> MrisSegmentOutputs:
    """
    A command-line tool for segmenting surfaces in FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subjects: A list of input subjects.
        output_subject: Output subject name.
        output_file: Output file path.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisSegmentOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_SEGMENT_METADATA)
    cargs = []
    cargs.append("mris_segment")
    cargs.extend(subjects)
    cargs.append(output_subject)
    cargs.append(output_file)
    ret = MrisSegmentOutputs(
        root=execution.output_file("."),
        segmented_output=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_SEGMENT_METADATA",
    "MrisSegmentOutputs",
    "mris_segment",
]
