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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_AUTO_TCORRELATE_METADATA = Metadata(
    id="b8f27abcfc527642a9e359df2a44024f6a072cb5.boutiques",
    name="3dAutoTcorrelate",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dAutoTcorrelateOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_auto_tcorrelate(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_brick: OutputPathType
    """Main output dataset"""
    output_head: OutputPathType
    """Header information for main output dataset"""
    out1d_file: OutputPathType
    """Output in 1D text format"""


def v_3d_auto_tcorrelate(
    input_dataset: InputPathType,
    runner: Runner | None = None,
) -> V3dAutoTcorrelateOutputs:
    """
    Computes the correlation coefficient between the time series of each pair of
    voxels in the input dataset.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dAutoTcorrelate.html
    
    Args:
        input_dataset: Input dataset.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dAutoTcorrelateOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_AUTO_TCORRELATE_METADATA)
    cargs = []
    cargs.append("3dAutoTcorrelate")
    cargs.append("[OPTIONS]")
    cargs.append(execution.input_file(input_dataset))
    ret = V3dAutoTcorrelateOutputs(
        root=execution.output_file("."),
        output_brick=execution.output_file("[PREFIX].BRIK"),
        output_head=execution.output_file("[PREFIX].HEAD"),
        out1d_file=execution.output_file("[OUT1D_FILE]"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dAutoTcorrelateOutputs",
    "V_3D_AUTO_TCORRELATE_METADATA",
    "v_3d_auto_tcorrelate",
]
