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

import typing
import pathlib
from styxdefs import *
import dataclasses

MAP_ALL_LABELS_METADATA = Metadata(
    id="7e86c136e5dca86f55d15560397ec44a7f6e3348.boutiques",
    name="map_all_labels",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MapAllLabelsOutputs(typing.NamedTuple):
    """
    Output object returned when calling `map_all_labels(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """The output of the mapping process"""


def map_all_labels(
    which: str,
    fname: str,
    hemi: str,
    spherical_surf: str,
    subjects: list[str],
    output: str,
    runner: Runner | None = None,
) -> MapAllLabelsOutputs:
    """
    Tool for mapping labels onto subject surfaces.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        which: Select what to map (e.g. coords, label, vals, curv, area).
        fname: Filename related to the mapping.
        hemi: Hemisphere to process (e.g. lh, rh).
        spherical_surf: Spherical surface to use.
        subjects: List of subject identifiers.
        output: Output path.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MapAllLabelsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MAP_ALL_LABELS_METADATA)
    cargs = []
    cargs.append("map_all_labels")
    cargs.append(which)
    cargs.append(fname)
    cargs.append(hemi)
    cargs.append(spherical_surf)
    cargs.extend(subjects)
    cargs.append(output)
    ret = MapAllLabelsOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MAP_ALL_LABELS_METADATA",
    "MapAllLabelsOutputs",
    "map_all_labels",
]
