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

import typing
import pathlib
from styxdefs import *
import dataclasses

RUN_SEGMENT_THALAMIC_NUCLEI_SH_METADATA = Metadata(
    id="58c7623548d514cfc3a6445924c9c49471329b52.boutiques",
    name="run_SegmentThalamicNuclei.sh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class RunSegmentThalamicNucleiShOutputs(typing.NamedTuple):
    """
    Output object returned when calling `run_segment_thalamic_nuclei_sh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def run_segment_thalamic_nuclei_sh(
    mcr_root: str,
    args: list[str] | None = None,
    runner: Runner | None = None,
) -> RunSegmentThalamicNucleiShOutputs:
    """
    Script for segmenting thalamic nuclei using FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        mcr_root: The root directory of the deployed MATLAB Compiler Runtime\
            (MCR).
        args: Additional arguments for the script.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `RunSegmentThalamicNucleiShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(RUN_SEGMENT_THALAMIC_NUCLEI_SH_METADATA)
    cargs = []
    cargs.append("run_SegmentThalamicNuclei.sh")
    cargs.append(mcr_root)
    if args is not None:
        cargs.extend(args)
    ret = RunSegmentThalamicNucleiShOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "RUN_SEGMENT_THALAMIC_NUCLEI_SH_METADATA",
    "RunSegmentThalamicNucleiShOutputs",
    "run_segment_thalamic_nuclei_sh",
]
