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

import typing
import pathlib
from styxdefs import *
import dataclasses

AVI2TALXFM_METADATA = Metadata(
    id="8aeaf0bd3a7339f6d2f2be8c9e4153a86e47e03a.boutiques",
    name="avi2talxfm",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class Avi2talxfmOutputs(typing.NamedTuple):
    """
    Output object returned when calling `avi2talxfm(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_xfm_file: OutputPathType
    """Resulting MNI transform file"""


def avi2talxfm(
    input_volume: InputPathType,
    target_volume: InputPathType,
    vox2vox_transform: InputPathType,
    output_xfm: str,
    runner: Runner | None = None,
) -> Avi2talxfmOutputs:
    """
    Convert voxel-to-voxel transform to MNI transform.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_volume: Input volume file.
        target_volume: Target volume file.
        vox2vox_transform: Voxel-to-voxel transform file.
        output_xfm: Output MNI transform file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `Avi2talxfmOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(AVI2TALXFM_METADATA)
    cargs = []
    cargs.append("avi2talxfm")
    cargs.append(execution.input_file(input_volume))
    cargs.append(execution.input_file(target_volume))
    cargs.append(execution.input_file(vox2vox_transform))
    cargs.append(output_xfm)
    ret = Avi2talxfmOutputs(
        root=execution.output_file("."),
        output_xfm_file=execution.output_file(output_xfm),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "AVI2TALXFM_METADATA",
    "Avi2talxfmOutputs",
    "avi2talxfm",
]
