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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3DROTATE_METADATA = Metadata(
    id="1e89e84da477d0e0cc5664a7752ca7af732ad786.boutiques",
    name="3drotate",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3drotateOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3drotate(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    out_head: OutputPathType
    """Output dataset header file"""
    out_brick: OutputPathType
    """Output dataset brick file"""


def v_3drotate(
    dataset: InputPathType,
    runner: Runner | None = None,
) -> V3drotateOutputs:
    """
    Rotates and/or translates all bricks from an AFNI dataset.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/3drotate.html
    
    Args:
        dataset: Input AFNI dataset, may contain a sub-brick selector list.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3drotateOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3DROTATE_METADATA)
    cargs = []
    cargs.append("3drotate")
    cargs.append("[OPTIONS]")
    cargs.append(execution.input_file(dataset))
    ret = V3drotateOutputs(
        root=execution.output_file("."),
        out_head=execution.output_file("[PREFIX]+orig.HEAD"),
        out_brick=execution.output_file("[PREFIX]+orig.BRIK"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3drotateOutputs",
    "V_3DROTATE_METADATA",
    "v_3drotate",
]
