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

import typing
import pathlib
from styxdefs import *
import dataclasses

SLICESMASK_METADATA = Metadata(
    id="640ba5ea73920106e5860ec2243290d406631e43.boutiques",
    name="slicesmask",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class SlicesmaskOutputs(typing.NamedTuple):
    """
    Output object returned when calling `slicesmask(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    masked_output: OutputPathType
    """The output file resulting from applying the mask"""


def slicesmask(
    image: InputPathType,
    mask: InputPathType,
    output: str,
    runner: Runner | None = None,
) -> SlicesmaskOutputs:
    """
    Tool for masking slices from an image using a mask.
    
    Author: Unknown
    
    Args:
        image: Input image file.
        mask: Mask file.
        output: Output file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SlicesmaskOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SLICESMASK_METADATA)
    cargs = []
    cargs.append("slicesmask")
    cargs.append(execution.input_file(image))
    cargs.append(execution.input_file(mask))
    cargs.append(output)
    ret = SlicesmaskOutputs(
        root=execution.output_file("."),
        masked_output=execution.output_file(output),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SLICESMASK_METADATA",
    "SlicesmaskOutputs",
    "slicesmask",
]
