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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_REMOVE_NEGATIVE_VERTICES_METADATA = Metadata(
    id="c1064a10c7344f9e696303964c7ecc7e48d65433.boutiques",
    name="mris_remove_negative_vertices",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisRemoveNegativeVerticesOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_remove_negative_vertices(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_patch_file: OutputPathType
    """The resulting output patch file"""


def mris_remove_negative_vertices(
    surface_file: InputPathType,
    patch_file: InputPathType,
    output_patch: str,
    runner: Runner | None = None,
) -> MrisRemoveNegativeVerticesOutputs:
    """
    This program adds a template into an average surface.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        surface_file: Input surface file.
        patch_file: Patch file name.
        output_patch: Output patch file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisRemoveNegativeVerticesOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_REMOVE_NEGATIVE_VERTICES_METADATA)
    cargs = []
    cargs.append("mris_remove_negative_vertices")
    cargs.append(execution.input_file(surface_file))
    cargs.append(execution.input_file(patch_file))
    cargs.append(output_patch)
    ret = MrisRemoveNegativeVerticesOutputs(
        root=execution.output_file("."),
        output_patch_file=execution.output_file(output_patch),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_REMOVE_NEGATIVE_VERTICES_METADATA",
    "MrisRemoveNegativeVerticesOutputs",
    "mris_remove_negative_vertices",
]
