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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_TFILTER_METADATA = Metadata(
    id="4735e83a23f97826ec3c39f708b0bfaeaff9f5e9.boutiques",
    name="3dTfilter",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dTfilterOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_tfilter(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_dataset: OutputPathType
    """Filtered output dataset"""


def v_3d_tfilter(
    inputdataset: InputPathType,
    outputdataset: str,
    filters: list[str],
    runner: Runner | None = None,
) -> V3dTfilterOutputs:
    """
    3dTfilter filters the time series in each voxel according to the user-specified
    filter functions.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        inputdataset: Input dataset.
        outputdataset: Output dataset.
        filters: Filter function(s) to apply.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dTfilterOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_TFILTER_METADATA)
    cargs = []
    cargs.append("3dTfilter")
    cargs.extend([
        "-input",
        execution.input_file(inputdataset)
    ])
    cargs.extend([
        "-prefix",
        outputdataset
    ])
    cargs.extend([
        "-filter",
        *filters
    ])
    ret = V3dTfilterOutputs(
        root=execution.output_file("."),
        output_dataset=execution.output_file(outputdataset),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dTfilterOutputs",
    "V_3D_TFILTER_METADATA",
    "v_3d_tfilter",
]
