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

import typing
import pathlib
from styxdefs import *
import dataclasses

SEGMENT_BS_SH_METADATA = Metadata(
    id="ea5de6d87d6861bdf790a471d88443f6b20986d7.boutiques",
    name="segmentBS.sh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def segment_bs_sh(
    matlab_runtime: str | None = "/usr/local/freesurfer/MCRv97",
    runner: Runner | None = None,
) -> SegmentBsShOutputs:
    """
    Segmentation tool for hippocampal/amygdala and brainstem modules.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        matlab_runtime: Path to the Matlab 2019b runtime environment; necessary\
            for running the segmentation tool.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SegmentBsShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SEGMENT_BS_SH_METADATA)
    cargs = []
    cargs.append("segmentBS.sh")
    if matlab_runtime is not None:
        cargs.append(matlab_runtime)
    ret = SegmentBsShOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SEGMENT_BS_SH_METADATA",
    "SegmentBsShOutputs",
    "segment_bs_sh",
]
