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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__CENTER_DISTANCE_METADATA = Metadata(
    id="b83f2a2ca9fa497ea99ff4923cf2b21f95c3dee6.boutiques",
    name="@Center_Distance",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VCenterDistanceOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__center_distance(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    distance_output: OutputPathType
    """The calculated distance between the centers of DSET_1 and DSET_2"""


def v__center_distance(
    dset1: InputPathType,
    dset2: InputPathType,
    runner: Runner | None = None,
) -> VCenterDistanceOutputs:
    """
    Tool to calculate the distance between the centers of two datasets.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/@Center_Distance.html
    
    Args:
        dset1: First dataset file (e.g. file1.nii.gz).
        dset2: Second dataset file (e.g. file2.nii.gz).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VCenterDistanceOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__CENTER_DISTANCE_METADATA)
    cargs = []
    cargs.append("@Center_Distance")
    cargs.append("-dset")
    cargs.append(execution.input_file(dset1))
    cargs.append(execution.input_file(dset2))
    ret = VCenterDistanceOutputs(
        root=execution.output_file("."),
        distance_output=execution.output_file("distance.txt"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VCenterDistanceOutputs",
    "V__CENTER_DISTANCE_METADATA",
    "v__center_distance",
]
