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

import typing
import pathlib
from styxdefs import *
import dataclasses

UNIQ_IMAGES_METADATA = Metadata(
    id="670d22d3017ad96917743645ee4b5352db443373.boutiques",
    name="uniq_images",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class UniqImagesOutputs(typing.NamedTuple):
    """
    Output object returned when calling `uniq_images(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    unique_files_list: OutputPathType
    """Generated list of filenames with unique images"""


def uniq_images(
    input_files: list[InputPathType],
    runner: Runner | None = None,
) -> UniqImagesOutputs:
    """
    Simple program to read in a list of image filenames, determine which files have
    unique images inside, and echo out only a list of the filenames with unique
    images.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/uniq_images.html
    
    Args:
        input_files: List of image filenames to be processed.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `UniqImagesOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(UNIQ_IMAGES_METADATA)
    cargs = []
    cargs.append("uniq_images")
    cargs.extend([execution.input_file(f) for f in input_files])
    ret = UniqImagesOutputs(
        root=execution.output_file("."),
        unique_files_list=execution.output_file("unique_images_list.txt"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "UNIQ_IMAGES_METADATA",
    "UniqImagesOutputs",
    "uniq_images",
]
