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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_COMPUTE_DISTANCES_METADATA = Metadata(
    id="eb2a170cca460d6725165d5ac72cc0e8e165909c.boutiques",
    name="mri_compute_distances",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriComputeDistancesOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_compute_distances(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_xform_file: OutputPathType
    """Output transformation file"""


def mri_compute_distances(
    source: InputPathType,
    target: InputPathType,
    output_xform: str,
    runner: Runner | None = None,
) -> MriComputeDistancesOutputs:
    """
    A tool to compute distances between source and target images.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        source: Input source image file.
        target: Input target image file.
        output_xform: Output transformation file containing the computed\
            distances.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriComputeDistancesOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_COMPUTE_DISTANCES_METADATA)
    cargs = []
    cargs.append("mri_compute_distances")
    cargs.append(execution.input_file(source))
    cargs.append(execution.input_file(target))
    cargs.append(output_xform)
    ret = MriComputeDistancesOutputs(
        root=execution.output_file("."),
        output_xform_file=execution.output_file(output_xform),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_COMPUTE_DISTANCES_METADATA",
    "MriComputeDistancesOutputs",
    "mri_compute_distances",
]
