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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_HAUSDORFF_DIST_METADATA = Metadata(
    id="c8c6f8e737d084817096cd5c6491a8218fa2f1ee.boutiques",
    name="mris_hausdorff_dist",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisHausdorffDistOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_hausdorff_dist(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file containing the Hausdorff distance computation results"""


def mris_hausdorff_dist(
    surface: InputPathType,
    label1: InputPathType,
    label2: InputPathType,
    annot_name: str | None = None,
    runner: Runner | None = None,
) -> MrisHausdorffDistOutputs:
    """
    This program computes the Hausdorff distance between two labels on a surface.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        surface: Surface file on which the labels exist.
        label1: First label file.
        label2: Second label file.
        annot_name: Compute pairwise Hausdorff Distance (HD) between all\
            annotations with the given name.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisHausdorffDistOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_HAUSDORFF_DIST_METADATA)
    cargs = []
    cargs.append("mris_hausdorff_dist")
    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 = MrisHausdorffDistOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file("hausdorff_output.txt"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_HAUSDORFF_DIST_METADATA",
    "MrisHausdorffDistOutputs",
    "mris_hausdorff_dist",
]
