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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_REVERSE_METADATA = Metadata(
    id="ecda44ba479fe2843ae6e0aa5b415f74e9dbf9f9.boutiques",
    name="mris_reverse",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisReverseOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_reverse(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    reversed_surface: OutputPathType
    """Reversed cortical surface file."""


def mris_reverse(
    input_surface: InputPathType,
    output_surface: str,
    runner: Runner | None = None,
) -> MrisReverseOutputs:
    """
    This tool reverses a cortical surface.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_surface: Input cortical surface file.
        output_surface: Output cortical surface file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisReverseOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_REVERSE_METADATA)
    cargs = []
    cargs.append("mris_reverse")
    cargs.append(execution.input_file(input_surface))
    cargs.append(output_surface)
    ret = MrisReverseOutputs(
        root=execution.output_file("."),
        reversed_surface=execution.output_file(output_surface + ".surf"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_REVERSE_METADATA",
    "MrisReverseOutputs",
    "mris_reverse",
]
