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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_LINEAR_ALIGN_METADATA = Metadata(
    id="e21ce25c91e684ff7b180749c2270d4bd42ef69b.boutiques",
    name="mri_linear_align",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mri_linear_align(
    source: InputPathType,
    target: InputPathType,
    output_xform: str,
    runner: Runner | None = None,
) -> MriLinearAlignOutputs:
    """
    MRI Linear Alignment Tool for Freesurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        source: Source image file for alignment.
        target: Target image file for alignment.
        output_xform: Output transformation file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriLinearAlignOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_LINEAR_ALIGN_METADATA)
    cargs = []
    cargs.append("mri_linear_align")
    cargs.append(execution.input_file(source))
    cargs.append(execution.input_file(target))
    cargs.append(output_xform)
    ret = MriLinearAlignOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_LINEAR_ALIGN_METADATA",
    "MriLinearAlignOutputs",
    "mri_linear_align",
]
