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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3DVOLREG_AFNI_METADATA = Metadata(
    id="80aae3856a13a6dd770babdd60fe4d17ad449c07.boutiques",
    name="3dvolreg.afni",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class V3dvolregAfniOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3dvolreg_afni(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    registered_output: OutputPathType
    """Output of the registered dataset"""


def v_3dvolreg_afni(
    input_file: InputPathType,
    output_file: str,
    options: str | None = None,
    runner: Runner | None = None,
) -> V3dvolregAfniOutputs:
    """
    AFNI program for volume registration.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input dataset to be registered.
        output_file: Output dataset with applied registration.
        options: Options for 3dvolreg (consult AFNI documentation for details).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dvolregAfniOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3DVOLREG_AFNI_METADATA)
    cargs = []
    cargs.append("3dvolreg.afni")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_file)
    if options is not None:
        cargs.append(options)
    ret = V3dvolregAfniOutputs(
        root=execution.output_file("."),
        registered_output=execution.output_file(output_file + ".nii"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dvolregAfniOutputs",
    "V_3DVOLREG_AFNI_METADATA",
    "v_3dvolreg_afni",
]
