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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_RF_TRAIN_METADATA = Metadata(
    id="ed47732236da2816714345ea0516a2a3309483a8.boutiques",
    name="mris_rf_train",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mris_rf_train(
    subjects: list[str],
    output_name: str,
    hemi: str | None = None,
    surf: str | None = None,
    runner: Runner | None = None,
) -> MrisRfTrainOutputs:
    """
    Tool for training a random forest classifier using MRIS surface data.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subjects: List of subjects to process.
        output_name: Output name for the trained model.
        hemi: Process specified hemisphere instead of the default 'lh'.
        surf: Change the default surface name from 'white' to the specified\
            surface.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisRfTrainOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_RF_TRAIN_METADATA)
    cargs = []
    cargs.append("mris_rf_train")
    cargs.extend(subjects)
    cargs.append(output_name)
    if hemi is not None:
        cargs.extend([
            "--hemi",
            hemi
        ])
    if surf is not None:
        cargs.extend([
            "--surf",
            surf
        ])
    ret = MrisRfTrainOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_RF_TRAIN_METADATA",
    "MrisRfTrainOutputs",
    "mris_rf_train",
]
