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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_DIST_SURF_LABEL_METADATA = Metadata(
    id="72b4cdbb35a27d1559099cff0310255f2417fec4.boutiques",
    name="mri_dist_surf_label",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriDistSurfLabelOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_dist_surf_label(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output: OutputPathType
    """Output file containing computed distances."""


def mri_dist_surf_label(
    surface: InputPathType,
    label_file: InputPathType,
    output: str,
    runner: Runner | None = None,
) -> MriDistSurfLabelOutputs:
    """
    Computes distances from input surface to label points or waypoints.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        surface: Input surface file.
        label_file: Input label file.
        output: Output file for distances.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriDistSurfLabelOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_DIST_SURF_LABEL_METADATA)
    cargs = []
    cargs.append("mri_dist_surf_label")
    cargs.append(execution.input_file(surface))
    cargs.append(execution.input_file(label_file))
    cargs.append(output)
    ret = MriDistSurfLabelOutputs(
        root=execution.output_file("."),
        output=execution.output_file(output),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_DIST_SURF_LABEL_METADATA",
    "MriDistSurfLabelOutputs",
    "mri_dist_surf_label",
]
