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

import typing
import pathlib
from styxdefs import *
import dataclasses

RUN_MRIS_PREPROC_METADATA = Metadata(
    id="3629333e45a8eb1987148cec6b9546163e9cda0d.boutiques",
    name="run_mris_preproc",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def run_mris_preproc(
    qdec_table: InputPathType,
    target_average: str | None = None,
    runner: Runner | None = None,
) -> RunMrisPreprocOutputs:
    """
    Utility to create pre-smoothed surface data on a target average subject for Qdec
    application.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        qdec_table: Text file of subject data used by qdec.
        target_average: Specify a target average, default is fsaverage.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `RunMrisPreprocOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(RUN_MRIS_PREPROC_METADATA)
    cargs = []
    cargs.append("run_mris_preproc")
    cargs.append(execution.input_file(qdec_table))
    if target_average is not None:
        cargs.append(target_average)
    ret = RunMrisPreprocOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "RUN_MRIS_PREPROC_METADATA",
    "RunMrisPreprocOutputs",
    "run_mris_preproc",
]
