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

import typing
import pathlib
from styxdefs import *
import dataclasses

DRIVE_SUMA_METADATA = Metadata(
    id="926f692f4116a5424cd5bd01a3b09ea3e0539288.boutiques",
    name="DriveSuma",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def drive_suma(
    command: str,
    surf_label: str | None = None,
    surface_file: InputPathType | None = None,
    surf_state: str | None = None,
    surf_winding: str | None = None,
    coordinates: InputPathType | None = None,
    autorecord: str | None = None,
    background_color: str | None = None,
    view_file: InputPathType | None = None,
    do_file: InputPathType | None = None,
    do_draw_mask: str | None = None,
    fixed_do: str | None = None,
    mobile_do: str | None = None,
    key_press: str | None = None,
    viewer: str | None = None,
    anim_dup: float | None = None,
    save_as: str | None = None,
    save_index: float | None = None,
    save_range: str | None = None,
    save_last: bool = False,
    save_last_n: float | None = None,
    save_all: bool = False,
    echo_edu: bool = False,
    echo_nel_stdout: bool = False,
    echo_nel_stderr: bool = False,
    examples: bool = False,
    help_: bool = False,
    h: bool = False,
    help_nido: bool = False,
    c_demo: bool = False,
    viewer_cont: bool = False,
    runner: Runner | None = None,
) -> DriveSumaOutputs:
    """
    A program to drive suma from the command line.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        command: Command to be sent to SUMA.
        surf_label: A label (identifier) to assign to the surface.
        surface_file: Name of surface file.
        surf_state: Name the state of that surface.
        surf_winding: Winding of triangles (ccw or cw).
        coordinates: A 1D formatted file containing new coordinates for nodes.
        autorecord: Set the autorecord prefix.
        background_color: Set the background color (R G B).
        view_file: Load a previously saved view file.
        do_file: Load a displayable object file.
        do_draw_mask: Restrict where DO node-based objects are displayed.
        fixed_do: Load a fixed coordinate type NIML DO.
        mobile_do: Mobile version of fixed_do.
        key_press: Act as if a key press was applied in the viewer.
        viewer: Specify which viewer should be acted upon.
        anim_dup: Save DUP copies of each frame into movie.
        save_as: Save image(s) in recorder in specified format.
        save_index: Save one image indexed IND.
        save_range: Save images from FROM to TO.
        save_last: Save last image.
        save_last_n: Save last N images.
        save_all: Save all images.
        echo_edu: Echoes the entire command line for edification purposes.
        echo_nel_stdout: Spit out the NIML object being sent to SUMA to stdout.
        echo_nel_stderr: Spit out the NIML object being sent to SUMA to stderr.
        examples: Show all the sample commands and exit.
        help_: Show the help in detail.
        h: Show help with slightly less detail.
        help_nido: Show the help for NIML Displayable Objects and exit.
        c_demo: Execute a preset number of commands to illustrate how one can\
            communicate with SUMA from one's own C code.
        viewer_cont: Apply settings to viewer or viewer controller.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `DriveSumaOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(DRIVE_SUMA_METADATA)
    cargs = []
    cargs.append("DriveSuma")
    cargs.append(command)
    if surf_label is not None:
        cargs.extend([
            "-surf_label",
            surf_label
        ])
    if surface_file is not None:
        cargs.extend([
            "-i_TYPE",
            execution.input_file(surface_file)
        ])
    if surf_state is not None:
        cargs.extend([
            "-surf_state",
            surf_state
        ])
    if surf_winding is not None:
        cargs.extend([
            "-surf_winding",
            surf_winding
        ])
    if coordinates is not None:
        cargs.extend([
            "-xyz_1D",
            execution.input_file(coordinates)
        ])
    if autorecord is not None:
        cargs.extend([
            "-autorecord",
            autorecord
        ])
    if background_color is not None:
        cargs.extend([
            "-bkg_col",
            background_color
        ])
    if view_file is not None:
        cargs.extend([
            "-load_view",
            execution.input_file(view_file)
        ])
    if do_file is not None:
        cargs.extend([
            "-load_do",
            execution.input_file(do_file)
        ])
    if do_draw_mask is not None:
        cargs.extend([
            "-do_draw_mask",
            do_draw_mask
        ])
    if fixed_do is not None:
        cargs.extend([
            "-fixed_do",
            fixed_do
        ])
    if mobile_do is not None:
        cargs.extend([
            "-mobile_do",
            mobile_do
        ])
    if key_press is not None:
        cargs.extend([
            "-key",
            key_press
        ])
    if viewer is not None:
        cargs.extend([
            "-viewer",
            viewer
        ])
    if anim_dup is not None:
        cargs.extend([
            "-anim_dup",
            str(anim_dup)
        ])
    if save_as is not None:
        cargs.extend([
            "-save_as",
            save_as
        ])
    if save_index is not None:
        cargs.extend([
            "-save_index",
            str(save_index)
        ])
    if save_range is not None:
        cargs.extend([
            "-save_range",
            save_range
        ])
    if save_last:
        cargs.append("-save_last")
    if save_last_n is not None:
        cargs.extend([
            "-save_last_n",
            str(save_last_n)
        ])
    if save_all:
        cargs.append("-save_all")
    if echo_edu:
        cargs.append("-echo_edu")
    if echo_nel_stdout:
        cargs.append("-echo_nel_stdout")
    if echo_nel_stderr:
        cargs.append("-echo_nel_stderr")
    if examples:
        cargs.append("-examples")
    if help_:
        cargs.append("-help")
    if h:
        cargs.append("-h")
    if help_nido:
        cargs.append("-help_nido")
    if c_demo:
        cargs.append("-C_demo")
    if viewer_cont:
        cargs.append("-com viewer_cont")
    ret = DriveSumaOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "DRIVE_SUMA_METADATA",
    "DriveSumaOutputs",
    "drive_suma",
]
