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

import typing
import pathlib
from styxdefs import *
import dataclasses

TBSS_1_PREPROC_METADATA = Metadata(
    id="4f04562a7b05be2549dde3df1b1c7f328fc44461.boutiques",
    name="tbss_1_preproc",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


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


def tbss_1_preproc(
    images: list[InputPathType],
    runner: Runner | None = None,
) -> Tbss1PreprocOutputs:
    """
    TBSS (Tract-Based Spatial Statistics) - Step 1: Preprocessing.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        images: List of input images (e.g. subj1_FA.nii.gz subj2_FA.nii.gz ...).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `Tbss1PreprocOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(TBSS_1_PREPROC_METADATA)
    cargs = []
    cargs.append("tbss_1_preproc")
    cargs.extend([execution.input_file(f) for f in images])
    ret = Tbss1PreprocOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "TBSS_1_PREPROC_METADATA",
    "Tbss1PreprocOutputs",
    "tbss_1_preproc",
]
