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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_CONCAT_METADATA = Metadata(
    id="b68d73854cbf83c677458b019f3c0ed9f44f0998.boutiques",
    name="mri_concat",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriConcatOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_concat(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def mri_concat(
    input_files: list[InputPathType],
    output_file: str,
    runner: Runner | None = None,
) -> MriConcatOutputs:
    """
    Concatenates input data sets.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_files: Input image files (e.g. file1.mgh file2.mgh ...).
        output_file: Output file name (e.g. output.mgh).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriConcatOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_CONCAT_METADATA)
    cargs = []
    cargs.append("mri_concat")
    cargs.extend([execution.input_file(f) for f in input_files])
    cargs.append("--o")
    cargs.extend([
        "--o",
        output_file
    ])
    cargs.append("[ADDITIONAL_OPTIONS]")
    ret = MriConcatOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_CONCAT_METADATA",
    "MriConcatOutputs",
    "mri_concat",
]
