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

import typing
import pathlib
from styxdefs import *
import dataclasses

MASKDYADS_METADATA = Metadata(
    id="7202ebf9fac4f093011a592184e5ec67cfb619d5.boutiques",
    name="maskdyads",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


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


def maskdyads(
    dyads: InputPathType,
    fsamples: InputPathType,
    threshold: float | None = 0.05,
    runner: Runner | None = None,
) -> MaskdyadsOutputs:
    """
    Tool to mask dyads with threshold.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        dyads: Input dyads file.
        fsamples: Input fsamples file.
        threshold: Threshold (default is 0.05).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MaskdyadsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MASKDYADS_METADATA)
    cargs = []
    cargs.append("maskdyads")
    cargs.append(execution.input_file(dyads))
    cargs.append(execution.input_file(fsamples))
    if threshold is not None:
        cargs.extend([
            "[THR]",
            str(threshold)
        ])
    ret = MaskdyadsOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MASKDYADS_METADATA",
    "MaskdyadsOutputs",
    "maskdyads",
]
