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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_DISTANCE_MAP_METADATA = Metadata(
    id="3d8e889c4b656344736f94614b767e1d77d78242.boutiques",
    name="mris_distance_map",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisDistanceMapOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_distance_map(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output scalar field file"""


def mris_distance_map(
    input_surface_file: InputPathType,
    output_scalar_field: str,
    runner: Runner | None = None,
) -> MrisDistanceMapOutputs:
    """
    Tool to compute a distance map of each point on the surface to a reference
    point.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_surface_file: Input surface file.
        output_scalar_field: Output scalar field (.mgz).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisDistanceMapOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_DISTANCE_MAP_METADATA)
    cargs = []
    cargs.append("mris_distance_map")
    cargs.append("[OPTIONS]")
    cargs.append(execution.input_file(input_surface_file))
    cargs.append(output_scalar_field)
    ret = MrisDistanceMapOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_scalar_field + ".mgz"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_DISTANCE_MAP_METADATA",
    "MrisDistanceMapOutputs",
    "mris_distance_map",
]
