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

import typing
import pathlib
from styxdefs import *
import dataclasses

FSLMATHS_METADATA = Metadata(
    id="1a225d72bab397cfbf6f9e8837981a20bb223bbd.boutiques",
    name="fslmaths",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class FslmathsOutputs(typing.NamedTuple):
    """
    Output object returned when calling `fslmaths(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    outfile: OutputPathType
    """Output image"""


def fslmaths(
    infile: InputPathType,
    runner: Runner | None = None,
) -> FslmathsOutputs:
    """
    General command for mathematical manipulation of image intensities and
    generation of statistical data from given images.
    
    Author: FMRIB Analysis Group, Oxford University, UK
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Fslutils
    
    Args:
        infile: Input image.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FslmathsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FSLMATHS_METADATA)
    cargs = []
    cargs.append("fslmaths")
    cargs.append(execution.input_file(infile))
    cargs.append("[OPERATIONS]")
    cargs.append("[OUTPUT_FILE]")
    ret = FslmathsOutputs(
        root=execution.output_file("."),
        outfile=execution.output_file("[OUTPUT_FILE]"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FSLMATHS_METADATA",
    "FslmathsOutputs",
    "fslmaths",
]
