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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_LEFT_RIGHT_REGISTER_METADATA = Metadata(
    id="a4c6b07b104f5a2cf15152261803ae81014407e6.boutiques",
    name="mris_left_right_register",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisLeftRightRegisterOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_left_right_register(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    out_lh_sphere_left_right: OutputPathType
    """Registered left hemisphere spherical surface output file"""
    out_rh_sphere_left_right: OutputPathType
    """Registered right hemisphere spherical surface output file"""


def mris_left_right_register(
    lh_sphere: InputPathType,
    rh_sphere: InputPathType,
    lh_sphere_left_right: str,
    rh_sphere_left_right: str,
    runner: Runner | None = None,
) -> MrisLeftRightRegisterOutputs:
    """
    Register left and right hemisphere spherical surfaces.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        lh_sphere: Left hemisphere spherical surface input file.
        rh_sphere: Right hemisphere spherical surface input file.
        lh_sphere_left_right: Output file for left hemisphere with left-right\
            registration.
        rh_sphere_left_right: Output file for right hemisphere with left-right\
            registration.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisLeftRightRegisterOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_LEFT_RIGHT_REGISTER_METADATA)
    cargs = []
    cargs.append("mris_left_right_register")
    cargs.append(execution.input_file(lh_sphere))
    cargs.append(execution.input_file(rh_sphere))
    cargs.append(lh_sphere_left_right)
    cargs.append(rh_sphere_left_right)
    ret = MrisLeftRightRegisterOutputs(
        root=execution.output_file("."),
        out_lh_sphere_left_right=execution.output_file(lh_sphere_left_right),
        out_rh_sphere_left_right=execution.output_file(rh_sphere_left_right),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_LEFT_RIGHT_REGISTER_METADATA",
    "MrisLeftRightRegisterOutputs",
    "mris_left_right_register",
]
