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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_TQUAL_METADATA = Metadata(
    id="051d67f70aafe97588824602cd1ef05d741f17f4.boutiques",
    name="3dTqual",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dTqualOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_tqual(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    time_series: OutputPathType
    """The 1D time series with the quality index for each sub-brick"""


def v_3d_tqual(
    dataset: InputPathType,
    runner: Runner | None = None,
) -> V3dTqualOutputs:
    """
    Computes a quality index for each sub-brick in a 3D+time dataset.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dTqual.html
    
    Args:
        dataset: Input 3D+time dataset.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dTqualOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_TQUAL_METADATA)
    cargs = []
    cargs.append("3dTqual")
    cargs.append("[OPTIONS]")
    cargs.append(execution.input_file(dataset))
    ret = V3dTqualOutputs(
        root=execution.output_file("."),
        time_series=execution.output_file("stdout"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dTqualOutputs",
    "V_3D_TQUAL_METADATA",
    "v_3d_tqual",
]
