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

import typing
import pathlib
from styxdefs import *
import dataclasses

SURFACE_FLIP_LR_METADATA = Metadata(
    id="be7ac8c956bb50120ee359df4df51ce488e5b406.boutiques",
    name="surface-flip-lr",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


class SurfaceFlipLrOutputs(typing.NamedTuple):
    """
    Output object returned when calling `surface_flip_lr(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    surface_out: OutputPathType
    """the output flipped surface"""


def surface_flip_lr(
    surface: InputPathType,
    surface_out: str,
    runner: Runner | None = None,
) -> SurfaceFlipLrOutputs:
    """
    Mirror a surface through the yz plane.
    
    This command negates the x coordinate of each vertex, and flips the surface
    normals, so that you have a surface of opposite handedness with the same
    features and vertex correspondence, with normals consistent with the
    original surface. That is, if the input surface has normals facing outward,
    the output surface will also have normals facing outward.
    
    Author: Washington University School of Medicin
    
    Args:
        surface: the surface to flip.
        surface_out: the output flipped surface.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SurfaceFlipLrOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SURFACE_FLIP_LR_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-surface-flip-lr")
    cargs.append(execution.input_file(surface))
    cargs.append(surface_out)
    ret = SurfaceFlipLrOutputs(
        root=execution.output_file("."),
        surface_out=execution.output_file(surface_out),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SURFACE_FLIP_LR_METADATA",
    "SurfaceFlipLrOutputs",
    "surface_flip_lr",
]
