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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_CRUISETO_AFNI_METADATA = Metadata(
    id="4b72eb1971f7fa8dc1755dacfa39929795432071.boutiques",
    name="3dCRUISEtoAFNI",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def v_3d_cruiseto_afni(
    input_: InputPathType,
    novolreg: bool = False,
    noxform: bool = False,
    setenv: str | None = None,
    trace_: bool = False,
    trace_2: bool = False,
    nomall: bool = False,
    yesmall: bool = False,
    help_: bool = False,
    h: bool = False,
    runner: Runner | None = None,
) -> V3dCruisetoAfniOutputs:
    """
    Converts a CRUISE dataset defined by a header in OpenDX format.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        input_: Input CRUISE header file in OpenDX format.
        novolreg: Ignore any Rotate, Volreg, Tagalign, or WarpDrive\
            transformations present in the Surface Volume.
        noxform: Same as -novolreg.
        setenv: Set environment variable ENVname to be ENVvalue. Quotes are\
            necessary. Example: suma -setenv "'SUMA_BackgroundColor = 1 0 1'".
        trace_: Turns on extreme tracing.
        trace_2: Turns on extreme tracing.
        nomall: Turn off memory tracing.
        yesmall: Turn on memory tracing (default).
        help_: The entire help output.
        h: Displays mini help; in many cases, it's the same as -help.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dCruisetoAfniOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_CRUISETO_AFNI_METADATA)
    cargs = []
    cargs.append("3dCRUISEtoAFNI")
    cargs.extend([
        "-input",
        execution.input_file(input_)
    ])
    if novolreg:
        cargs.append("-novolreg")
    if noxform:
        cargs.append("-noxform")
    if setenv is not None:
        cargs.extend([
            "-setenv",
            setenv
        ])
    if trace_:
        cargs.append("-TRACE")
    if trace_2:
        cargs.append("-TRACE")
    if nomall:
        cargs.append("-nomall")
    if yesmall:
        cargs.append("-yesmall")
    if help_:
        cargs.append("-help")
    if h:
        cargs.append("-h")
    ret = V3dCruisetoAfniOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dCruisetoAfniOutputs",
    "V_3D_CRUISETO_AFNI_METADATA",
    "v_3d_cruiseto_afni",
]
