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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_NL_ALIGN_BINARY_METADATA = Metadata(
    id="ef5528a0517700c40ec5c8c97d382ea8956dfbf8.boutiques",
    name="mri_nl_align_binary",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriNlAlignBinaryOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_nl_align_binary(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_warp: OutputPathType
    """Output warp from the alignment process"""


def mri_nl_align_binary(
    source_file: InputPathType,
    target_file: InputPathType,
    warp_file: str,
    runner: Runner | None = None,
) -> MriNlAlignBinaryOutputs:
    """
    Non-linear alignment tool for MRI data.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        source_file: Source image file for alignment.
        target_file: Target image file for alignment.
        warp_file: Output warp file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriNlAlignBinaryOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_NL_ALIGN_BINARY_METADATA)
    cargs = []
    cargs.append("mri_nl_align_binary")
    cargs.append(execution.input_file(source_file))
    cargs.append(execution.input_file(target_file))
    cargs.append(warp_file)
    ret = MriNlAlignBinaryOutputs(
        root=execution.output_file("."),
        output_warp=execution.output_file(warp_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_NL_ALIGN_BINARY_METADATA",
    "MriNlAlignBinaryOutputs",
    "mri_nl_align_binary",
]
