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

import typing
import pathlib
from styxdefs import *
import dataclasses

SURFACE_NORMALS_METADATA = Metadata(
    id="bf741b89964614d5dda2065678e1ec762984a361.boutiques",
    name="surface-normals",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


class SurfaceNormalsOutputs(typing.NamedTuple):
    """
    Output object returned when calling `surface_normals(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    metric_out: OutputPathType
    """the normal vectors"""


def surface_normals(
    surface: InputPathType,
    metric_out: str,
    runner: Runner | None = None,
) -> SurfaceNormalsOutputs:
    """
    Output vertex normals as metric file.
    
    Computes the normal vectors of the surface file, and outputs them as a 3
    column metric file.
    
    Author: Connectome Workbench Developers
    
    URL: https://github.com/Washington-University/workbench
    
    Args:
        surface: the surface to output the normals of.
        metric_out: the normal vectors.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SurfaceNormalsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SURFACE_NORMALS_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-surface-normals")
    cargs.append(execution.input_file(surface))
    cargs.append(metric_out)
    ret = SurfaceNormalsOutputs(
        root=execution.output_file("."),
        metric_out=execution.output_file(metric_out),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SURFACE_NORMALS_METADATA",
    "SurfaceNormalsOutputs",
    "surface_normals",
]
