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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_CLIP_LEVEL_METADATA = Metadata(
    id="d74c5cd045e053e286d1b5c8e3587d88d871f128.boutiques",
    name="3dClipLevel",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def v_3d_clip_level(
    dataset: InputPathType,
    runner: Runner | None = None,
) -> V3dClipLevelOutputs:
    """
    Estimates the value at which to clip the anatomical dataset so that background
    regions are set to zero.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        dataset: Input dataset (e.g. dataset.nii.gz).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dClipLevelOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_CLIP_LEVEL_METADATA)
    cargs = []
    cargs.append("3dClipLevel")
    cargs.append("[options]")
    cargs.append(execution.input_file(dataset))
    ret = V3dClipLevelOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dClipLevelOutputs",
    "V_3D_CLIP_LEVEL_METADATA",
    "v_3d_clip_level",
]
