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

import typing
import pathlib
from styxdefs import *
import dataclasses

AFNI_METADATA = Metadata(
    id="9989cbf73506dc9d9cd5697407857e647cc015cd.boutiques",
    name="afni",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class AfniOutputs(typing.NamedTuple):
    """
    Output object returned when calling `afni_(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    session_output: OutputPathType
    """Output file for the session data"""


def afni_(
    session_directories: str | None = None,
    runner: Runner | None = None,
) -> AfniOutputs:
    """
    Tool for reading in sessions of 3D datasets and visualizing them.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/afni.html
    
    Args:
        session_directories: Input session directories containing the datasets.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `AfniOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(AFNI_METADATA)
    cargs = []
    cargs.append("afni")
    cargs.append("[OPTIONS]")
    if session_directories is not None:
        cargs.append(session_directories)
    ret = AfniOutputs(
        root=execution.output_file("."),
        session_output=execution.output_file("output_session.nii.gz"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "AFNI_METADATA",
    "AfniOutputs",
    "afni_",
]
