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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_RPROG_DEMO_METADATA = Metadata(
    id="9ea0856bd790ad5ea87b3e458b8bf8d36950ad92.boutiques",
    name="3dRprogDemo",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dRprogDemoOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_rprog_demo(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file with the specified prefix."""


def v_3d_rprog_demo(
    input_dsets: list[InputPathType],
    scale: float,
    prefix: str,
    mask: InputPathType | None = None,
    help_aspx: bool = False,
    help_raw: bool = False,
    help_spx: bool = False,
    help_txt: bool = False,
    help_: bool = False,
    show_allowed_options: bool = False,
    verbosity_level: float | None = None,
    runner: Runner | None = None,
) -> V3dRprogDemoOutputs:
    """
    Template program to help users write their own R processing routines on MRI
    volumes.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        input_dsets: Input dataset(s) to be scaled.
        scale: Multiply each voxel by SS.
        prefix: Output prefix (just prefix, no view+suffix needed).
        mask: Process voxels inside this mask only. Default is no masking.
        help_aspx: Display help message with autolabeling.
        help_raw: Display raw help message as in the code.
        help_spx: Display help message in sphinx format.
        help_txt: Display help message in simple text.
        help_: Display help message in simple text.
        show_allowed_options: List of allowed options.
        verbosity_level: Verbosity level. 0 for quiet (Default). 1 or more:\
            talkative.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dRprogDemoOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_RPROG_DEMO_METADATA)
    cargs = []
    cargs.append("3dRprogDemo")
    cargs.extend([execution.input_file(f) for f in input_dsets])
    if mask is not None:
        cargs.extend([
            "-mask",
            execution.input_file(mask)
        ])
    cargs.extend([
        "-scale",
        str(scale)
    ])
    cargs.extend([
        "-prefix",
        prefix
    ])
    if help_aspx:
        cargs.append("-h_aspx")
    if help_raw:
        cargs.append("-h_raw")
    if help_spx:
        cargs.append("-h_spx")
    if help_txt:
        cargs.append("-h_txt")
    if help_:
        cargs.append("-help")
    if show_allowed_options:
        cargs.append("-show_allowed_options")
    if verbosity_level is not None:
        cargs.extend([
            "-verb",
            str(verbosity_level)
        ])
    ret = V3dRprogDemoOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(prefix + ".nii"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dRprogDemoOutputs",
    "V_3D_RPROG_DEMO_METADATA",
    "v_3d_rprog_demo",
]
