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

import typing
import pathlib
from styxdefs import *
import dataclasses

RUN_SEGMENT_SUBJECT_SH_METADATA = Metadata(
    id="3bee4c6b7ffa07b5a4e27cd0261d6a71efb4387a.boutiques",
    name="run_SegmentSubject.sh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class RunSegmentSubjectShOutputs(typing.NamedTuple):
    """
    Output object returned when calling `run_segment_subject_sh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output: OutputPathType
    """The generated output file from the segmentation process."""


def run_segment_subject_sh(
    deployed_mcrroot: str,
    arguments: str | None = None,
    runner: Runner | None = None,
) -> RunSegmentSubjectShOutputs:
    """
    A command-line tool for subject segmentation in Freesurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        deployed_mcrroot: The root directory of the deployed MATLAB Compiler\
            Runtime.
        arguments: Additional arguments to be passed to the SegmentSubject\
            script.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `RunSegmentSubjectShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(RUN_SEGMENT_SUBJECT_SH_METADATA)
    cargs = []
    cargs.append("run_SegmentSubject.sh")
    cargs.append(deployed_mcrroot)
    if arguments is not None:
        cargs.append(arguments)
    ret = RunSegmentSubjectShOutputs(
        root=execution.output_file("."),
        output=execution.output_file("outputFileName"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "RUN_SEGMENT_SUBJECT_SH_METADATA",
    "RunSegmentSubjectShOutputs",
    "run_segment_subject_sh",
]
