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

import typing
import pathlib
from styxdefs import *
import dataclasses

PROJ_THRESH_METADATA = Metadata(
    id="2118a504958e3891bd47708738d41c67d1537eb5.boutiques",
    name="proj_thresh",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


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


def proj_thresh(
    input_paths: list[InputPathType],
    threshold: float,
    runner: Runner | None = None,
) -> ProjThreshOutputs:
    """
    A tool to apply a threshold to either volumes or surfaces.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        input_paths: Paths to volume or surface files. Please use either\
            volumes or surfaces but not both.
        threshold: Threshold value to be applied.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `ProjThreshOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(PROJ_THRESH_METADATA)
    cargs = []
    cargs.append("proj_thresh")
    cargs.extend([execution.input_file(f) for f in input_paths])
    cargs.append(str(threshold))
    ret = ProjThreshOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "PROJ_THRESH_METADATA",
    "ProjThreshOutputs",
    "proj_thresh",
]
