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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_TSMOOTH_METADATA = Metadata(
    id="13bf91f18e7446955f1c082671ec122a2283b13e.boutiques",
    name="3dTsmooth",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dTsmoothOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_tsmooth(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_dataset: OutputPathType
    """Smoothed 3D+time dataset"""


def v_3d_tsmooth(
    input_dataset: InputPathType,
    runner: Runner | None = None,
) -> V3dTsmoothOutputs:
    """
    Smooths each voxel time series in a 3D+time dataset and produces as output a new
    3D+time dataset (e.g., lowpass filter in time).
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dTsmooth.html
    
    Args:
        input_dataset: The input 3D+time dataset.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dTsmoothOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_TSMOOTH_METADATA)
    cargs = []
    cargs.append("3dTsmooth")
    cargs.append("[OPTIONS]")
    cargs.append(execution.input_file(input_dataset))
    ret = V3dTsmoothOutputs(
        root=execution.output_file("."),
        output_dataset=execution.output_file("[PREFIX].nii.gz"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dTsmoothOutputs",
    "V_3D_TSMOOTH_METADATA",
    "v_3d_tsmooth",
]
