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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_MERGE_PARCELLATIONS_METADATA = Metadata(
    id="59eb13227975afaa7a05e9947ae25c61de64b8ec.boutiques",
    name="mris_merge_parcellations",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mris_merge_parcellations(
    surface: InputPathType,
    label1: InputPathType,
    label2: InputPathType,
    annot_name: str | None = None,
    runner: Runner | None = None,
) -> MrisMergeParcellationsOutputs:
    """
    This program computes the Hausdorff distance between two labels on the surface.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        surface: Surface file to analyze.
        label1: First label file.
        label2: Second label file.
        annot_name: Compute pairwise Hausdorff distance between all annotations.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisMergeParcellationsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_MERGE_PARCELLATIONS_METADATA)
    cargs = []
    cargs.append("mris_merge_parcellations")
    cargs.append(execution.input_file(surface))
    cargs.append(execution.input_file(label1))
    cargs.append(execution.input_file(label2))
    if annot_name is not None:
        cargs.extend([
            "-a",
            annot_name
        ])
    ret = MrisMergeParcellationsOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_MERGE_PARCELLATIONS_METADATA",
    "MrisMergeParcellationsOutputs",
    "mris_merge_parcellations",
]
