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

import typing
import pathlib
from styxdefs import *
import dataclasses

FOCI_GET_PROJECTION_VERTEX_METADATA = Metadata(
    id="5fcf94c378c9d18a1d8f02757543cb80d6f34ebd.boutiques",
    name="foci-get-projection-vertex",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


class FociGetProjectionVertexOutputs(typing.NamedTuple):
    """
    Output object returned when calling `foci_get_projection_vertex(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    metric_out: OutputPathType
    """the output metric file"""


def foci_get_projection_vertex(
    foci: InputPathType,
    surface: InputPathType,
    metric_out: str,
    opt_name_name: str | None = None,
    runner: Runner | None = None,
) -> FociGetProjectionVertexOutputs:
    """
    Get projection vertex for foci.
    
    For each focus, a column is created in <metric-out>, and the vertex with the
    most influence on its projection is assigned a value of 1 in that column,
    with all other vertices 0. If -name is used, only one focus will be used.
    
    Author: Washington University School of Medicin
    
    Args:
        foci: the foci file.
        surface: the surface related to the foci file.
        metric_out: the output metric file.
        opt_name_name: select a focus by name: the name of the focus.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FociGetProjectionVertexOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FOCI_GET_PROJECTION_VERTEX_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-foci-get-projection-vertex")
    cargs.append(execution.input_file(foci))
    cargs.append(execution.input_file(surface))
    cargs.append(metric_out)
    if opt_name_name is not None:
        cargs.extend([
            "-name",
            opt_name_name
        ])
    ret = FociGetProjectionVertexOutputs(
        root=execution.output_file("."),
        metric_out=execution.output_file(metric_out),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FOCI_GET_PROJECTION_VERTEX_METADATA",
    "FociGetProjectionVertexOutputs",
    "foci_get_projection_vertex",
]
