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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_TOY_PROG_METADATA = Metadata(
    id="1311a81e171aae35dd519b54379bb3bfad692a46.boutiques",
    name="3dToyProg",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dToyProgOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_toy_prog(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def v_3d_toy_prog(
    input_dataset: InputPathType,
    output_prefix: str | None = None,
    mask_dataset: InputPathType | None = None,
    output_datum: typing.Literal["float", "short"] | None = None,
    runner: Runner | None = None,
) -> V3dToyProgOutputs:
    """
    A program to illustrate dataset creation and manipulation in C using AFNI's API.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        input_dataset: Reference dataset.
        output_prefix: Prefix of the output datasets.
        mask_dataset: Restrict analysis to non-zero voxels in the mask dataset.
        output_datum: Output datum type for one of the datasets. Choose from\
            'float' or 'short'. Default is 'float'.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dToyProgOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_TOY_PROG_METADATA)
    cargs = []
    cargs.append("3dToyProg")
    cargs.extend([
        "-input",
        execution.input_file(input_dataset)
    ])
    if output_prefix is not None:
        cargs.extend([
            "-prefix",
            output_prefix
        ])
    if mask_dataset is not None:
        cargs.extend([
            "-mask",
            execution.input_file(mask_dataset)
        ])
    if output_datum is not None:
        cargs.extend([
            "-datum",
            output_datum
        ])
    ret = V3dToyProgOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dToyProgOutputs",
    "V_3D_TOY_PROG_METADATA",
    "v_3d_toy_prog",
]
