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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_TRAIN_METADATA = Metadata(
    id="18e33eff7b8f70bf5d7c40cd7762266812d2728b.boutiques",
    name="mri_train",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriTrainOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_train(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file_generated: OutputPathType
    """Output file generated by mri_train."""


def mri_train(
    training_file: InputPathType,
    output_file: str,
    runner: Runner | None = None,
) -> MriTrainOutputs:
    """
    Tool for training with MRI data in FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        training_file: Input training file name.
        output_file: Output file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriTrainOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_TRAIN_METADATA)
    cargs = []
    cargs.append("mri_train")
    cargs.append(execution.input_file(training_file))
    cargs.append(output_file)
    ret = MriTrainOutputs(
        root=execution.output_file("."),
        output_file_generated=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_TRAIN_METADATA",
    "MriTrainOutputs",
    "mri_train",
]
