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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_COPY_HEADER_METADATA = Metadata(
    id="50aaea9bf37b8cf2e2b611b945681126287cbd83.boutiques",
    name="mris_copy_header",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisCopyHeaderOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_copy_header(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    out_surface: OutputPathType
    """Output surface file with copied header."""


def mris_copy_header(
    input_surface: InputPathType,
    template_surface: InputPathType,
    output_surface: str,
    runner: Runner | None = None,
) -> MrisCopyHeaderOutputs:
    """
    Tool to copy the header from a template surface to an input surface and save as
    the output surface.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_surface: Input surface file whose header will be replaced.
        template_surface: Template surface file from which the header will be\
            copied.
        output_surface: Output surface file with the updated header.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisCopyHeaderOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_COPY_HEADER_METADATA)
    cargs = []
    cargs.append("mris_copy_header")
    cargs.append(execution.input_file(input_surface))
    cargs.append(execution.input_file(template_surface))
    cargs.append(output_surface)
    ret = MrisCopyHeaderOutputs(
        root=execution.output_file("."),
        out_surface=execution.output_file(output_surface),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_COPY_HEADER_METADATA",
    "MrisCopyHeaderOutputs",
    "mris_copy_header",
]
