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

import typing
import pathlib
from styxdefs import *
import dataclasses

SEGMENT_MONKEY_METADATA = Metadata(
    id="4dccc2f58e68c24781760f51b33e78d977f7eaa8.boutiques",
    name="segment_monkey",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def segment_monkey(
    control_points: list[str],
    runner: Runner | None = None,
) -> SegmentMonkeyOutputs:
    """
    A tool for segmenting images using specified control points.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        control_points: List of control points required for segmentation.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SegmentMonkeyOutputs`).
    """
    if not (1 <= len(control_points)): 
        raise ValueError(f"Length of 'control_points' must be greater than 1 but was {len(control_points)}")
    runner = runner or get_global_runner()
    execution = runner.start_execution(SEGMENT_MONKEY_METADATA)
    cargs = []
    cargs.append("segment_monkey")
    cargs.extend(control_points)
    ret = SegmentMonkeyOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SEGMENT_MONKEY_METADATA",
    "SegmentMonkeyOutputs",
    "segment_monkey",
]
