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

import typing
import pathlib
from styxdefs import *
import dataclasses

FSCALC_FSL_METADATA = Metadata(
    id="a318448c0ae9ee2486a72de6136c2f2bdab8a57e.boutiques",
    name="fscalc.fsl",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class FscalcFslOutputs(typing.NamedTuple):
    """
    Output object returned when calling `fscalc_fsl(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file"""


def fscalc_fsl(
    input_file: InputPathType,
    output_file: str,
    additional_options: str | None = None,
    runner: Runner | None = None,
) -> FscalcFslOutputs:
    """
    A Freesurfer wrapper around fslmaths, allowing input and output formats
    compatible with Freesurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input image file readable by Freesurfer.
        output_file: Output image file writable by Freesurfer.
        additional_options: Additional fslmaths-specific options.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FscalcFslOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FSCALC_FSL_METADATA)
    cargs = []
    cargs.append("fscalc.fsl")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_file)
    if additional_options is not None:
        cargs.append(additional_options)
    ret = FscalcFslOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FSCALC_FSL_METADATA",
    "FscalcFslOutputs",
    "fscalc_fsl",
]
