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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__DICE_METRIC_METADATA = Metadata(
    id="1e8709949dd1f81bc9b0adf1a50b0355570f9576.boutiques",
    name="@DiceMetric",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def v__dice_metric(
    keep_tmp: bool = False,
    runner: Runner | None = None,
) -> VDiceMetricOutputs:
    """
    Computes Dice Metric between BASE and each of the DSET volumes.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/@DiceMetric.html
    
    Args:
        keep_tmp: Keep temporary files for debugging. Note that you should\
            delete temporary files before rerunning the script.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VDiceMetricOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__DICE_METRIC_METADATA)
    cargs = []
    cargs.append("@DiceMetric")
    cargs.append("<-base")
    cargs.append("BASE>")
    cargs.append("<-dsets")
    cargs.append("DSET1")
    cargs.append("[DSET2")
    cargs.append("...]>")
    cargs.append("[max_N_roi")
    cargs.append("MAX_ROI]")
    if keep_tmp:
        cargs.append("-keep_tmp")
    cargs.append("[OPTIONS...]")
    ret = VDiceMetricOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VDiceMetricOutputs",
    "V__DICE_METRIC_METADATA",
    "v__dice_metric",
]
