# 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_T2_AUTO_ESTIMATE_ALVEUS_ML_SH_METADATA = Metadata(
    id="2a8c1490dc550d5a8ebdcd5a722be9a6d0cb534c.boutiques",
    name="run_segmentSubjectT2_autoEstimateAlveusML.sh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def run_segment_subject_t2_auto_estimate_alveus_ml_sh(
    deployed_mcr_root: str,
    arguments: list[str] | None = None,
    runner: Runner | None = None,
) -> RunSegmentSubjectT2AutoEstimateAlveusMlShOutputs:
    """
    Script to run segmentSubjectT2_autoEstimateAlveusML operation. This script
    requires a MATLAB Compiler Runtime (MCR) root directory as input, but help
    output indicates missing library reference for operation.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        deployed_mcr_root: Path to the deployed MATLAB Compiler Runtime (MCR)\
            root directory.
        arguments: Arguments for segmenting subject T2 and automatically\
            estimating Alveus using Machine Learning.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `RunSegmentSubjectT2AutoEstimateAlveusMlShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(RUN_SEGMENT_SUBJECT_T2_AUTO_ESTIMATE_ALVEUS_ML_SH_METADATA)
    cargs = []
    cargs.append("run_segmentSubjectT2_autoEstimateAlveusML.sh")
    cargs.append(deployed_mcr_root)
    if arguments is not None:
        cargs.extend(arguments)
    ret = RunSegmentSubjectT2AutoEstimateAlveusMlShOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "RUN_SEGMENT_SUBJECT_T2_AUTO_ESTIMATE_ALVEUS_ML_SH_METADATA",
    "RunSegmentSubjectT2AutoEstimateAlveusMlShOutputs",
    "run_segment_subject_t2_auto_estimate_alveus_ml_sh",
]
