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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_DEPTH_MAP_METADATA = Metadata(
    id="7dd1629cdf258c181c4153516b25cd08a25b0030.boutiques",
    name="3dDepthMap",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dDepthMapOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_depth_map(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Main output file"""


def v_3d_depth_map(
    output_prefix: str,
    input_dataset: InputPathType,
    runner: Runner | None = None,
) -> V3dDepthMapOutputs:
    """
    Calculates the Euclidean Distance Transform (EDT) for 3D volumes, allowing
    computation of ROI depth maps and applying various adjustments like masking and
    rimification.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dDepthMap.html
    
    Args:
        output_prefix: Output prefix name.
        input_dataset: Input dataset.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dDepthMapOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_DEPTH_MAP_METADATA)
    cargs = []
    cargs.append("3dDepthMap")
    cargs.append("[OPTIONS]")
    cargs.append("-prefix")
    cargs.extend([
        "-prefix",
        output_prefix
    ])
    cargs.append("-input")
    cargs.extend([
        "-input",
        execution.input_file(input_dataset)
    ])
    ret = V3dDepthMapOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_prefix + ".nii.gz"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dDepthMapOutputs",
    "V_3D_DEPTH_MAP_METADATA",
    "v_3d_depth_map",
]
