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

import typing
import pathlib
from styxdefs import *
import dataclasses

CLUSTER2HTML_METADATA = Metadata(
    id="b70bb6520b5d33f9d586ec00acad339b7b15f08c.boutiques",
    name="cluster2html",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


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


def cluster2html(
    featdir: str,
    inroot: str,
    std_flag: bool = False,
    runner: Runner | None = None,
) -> Cluster2htmlOutputs:
    """
    Generates an HTML report from cluster-based FEAT analysis.
    
    Author: Oxford Centre for Functional MRI of the Brain (FMRIB)
    
    Args:
        featdir: Directory containing the FEAT analysis results.
        inroot: Root name for cluster files (should not contain the _std\
            extension).
        std_flag: Indicate that the input files contain the _std extension.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `Cluster2htmlOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(CLUSTER2HTML_METADATA)
    cargs = []
    cargs.append("cluster2html")
    cargs.append(featdir)
    cargs.append(inroot)
    if std_flag:
        cargs.append("-std")
    ret = Cluster2htmlOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "CLUSTER2HTML_METADATA",
    "Cluster2htmlOutputs",
    "cluster2html",
]
