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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__ADD_EDGE_METADATA = Metadata(
    id="e1c15db21c7ca3b4679541ce445b80838292b240.boutiques",
    name="@AddEdge",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VAddEdgeOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__add_edge(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    dset_nn_ec: OutputPathType
    """Edge composite image of dataset with its own edges"""
    base_dset_dset_nn_ec: OutputPathType
    """Edge composite image of base dataset together with the edges of the input
    dset_nn dataset"""
    base_dset_e3: OutputPathType
    """Edge-only datasets - used in single edge display option"""
    dset_nn_e3: OutputPathType
    """Edge-only input datasets - used in single edge display option"""


def v__add_edge(
    input_files: list[InputPathType],
    examine_list: str | None = None,
    ax_mont: str | None = None,
    ax_geom: str | None = None,
    sag_geom: str | None = None,
    layout_file: str | None = None,
    no_layout: bool = False,
    edge_percentile: int | None = None,
    single_edge: bool = False,
    opacity: int | None = None,
    keep_temp: bool = False,
    no_deoblique: bool = False,
    auto_record: bool = False,
    auto: bool = False,
    no_auto: bool = False,
    runner: Runner | None = None,
) -> VAddEdgeOutputs:
    """
    A script to create composite edge-enhanced datasets and drive the AFNI interface
    to display the results.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        input_files: Input datasets.
        examine_list: Use list of paired datasets from file.
        ax_mont: Axial montage string (default='2x2:24').
        ax_geom: Axial image window geometry (default='777x702+433+334').
        sag_geom: Sagittal image window geometry (default='540x360+4+436').
        layout_file: Use AFNI layout file for display.
        no_layout: Do not use layout. Use AFNI as it is open.
        edge_percentile: Specify edge threshold value (default=30%).
        single_edge: Show only a single edge in composite image.
        opacity: Set opacity of overlay (default=9 opaque).
        keep_temp: Do not remove temporary files.
        no_deoblique: Do not deoblique any data to show overlap.
        auto_record: Save JPEG files of current slices without prompting.
        auto: Closes old AFNI sessions and relaunches a new one ready to listen\
            to @AddEdge in review mode.
        no_auto: Opposite of -auto.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VAddEdgeOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__ADD_EDGE_METADATA)
    cargs = []
    cargs.append("@AddEdge")
    cargs.extend([execution.input_file(f) for f in input_files])
    if examine_list is not None:
        cargs.extend([
            "-examinelist",
            examine_list
        ])
    if ax_mont is not None:
        cargs.extend([
            "-ax_mont",
            ax_mont
        ])
    if ax_geom is not None:
        cargs.extend([
            "-ax_geom",
            ax_geom
        ])
    if sag_geom is not None:
        cargs.extend([
            "-sag_geom",
            sag_geom
        ])
    if layout_file is not None:
        cargs.extend([
            "-layout",
            layout_file
        ])
    if no_layout:
        cargs.append("-no_layout")
    if edge_percentile is not None:
        cargs.extend([
            "-edge_percentile",
            str(edge_percentile)
        ])
    if single_edge:
        cargs.append("-single_edge")
    if opacity is not None:
        cargs.extend([
            "-opa",
            str(opacity)
        ])
    if keep_temp:
        cargs.append("-keep_temp")
    if no_deoblique:
        cargs.append("-no_deoblique")
    if auto_record:
        cargs.append("-auto_record")
    if auto:
        cargs.append("-auto")
    if no_auto:
        cargs.append("-no_auto")
    ret = VAddEdgeOutputs(
        root=execution.output_file("."),
        dset_nn_ec=execution.output_file("dset_nn_ec"),
        base_dset_dset_nn_ec=execution.output_file("base_dset_dset_nn_ec"),
        base_dset_e3=execution.output_file("base_dset_e3"),
        dset_nn_e3=execution.output_file("dset_nn_e3"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VAddEdgeOutputs",
    "V__ADD_EDGE_METADATA",
    "v__add_edge",
]
