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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__FROM_RAI_METADATA = Metadata(
    id="4c4541fb95f3a90a933837e752e6809ba6b027ac.boutiques",
    name="@FromRAI",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def v__from_rai(
    rai_coordinates: list[float],
    orientation: str,
    runner: Runner | None = None,
) -> VFromRaiOutputs:
    """
    Changes the RAI coordinates to the specified orientation.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/@FromRAI.html
    
    Args:
        rai_coordinates: RAI coordinates X, Y, and Z.
        orientation: Orientation format.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VFromRaiOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__FROM_RAI_METADATA)
    cargs = []
    cargs.append("@FromRAI")
    cargs.extend([
        "-xyz",
        *map(str, rai_coordinates)
    ])
    cargs.extend([
        "-or",
        orientation
    ])
    ret = VFromRaiOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VFromRaiOutputs",
    "V__FROM_RAI_METADATA",
    "v__from_rai",
]
