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

import typing
import pathlib
from styxdefs import *
import dataclasses

GAUSS_4DFP_METADATA = Metadata(
    id="33be7b3b1fc943cdc73ad39caf02b12c7b7d7be5.boutiques",
    name="gauss_4dfp",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class Gauss4dfpOutputs(typing.NamedTuple):
    """
    Output object returned when calling `gauss_4dfp(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType | None
    """Output file in 4dfp format."""


def gauss_4dfp(
    input_file: str,
    f_half: float,
    output_root: str | None = None,
    endian_flag: str | None = None,
    wrap_flag: bool = False,
    differentiate_flag: bool = False,
    runner: Runner | None = None,
) -> Gauss4dfpOutputs:
    """
    Applies a Gaussian filter to 4dfp or conc input files.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input 4dfp or conc file to be processed.
        f_half: Half frequency in 1/cm for the Gaussian filter application\
            (f_half is the half frequency in 1/cm).
        output_root: Root name for the output file. Default is\
            <inroot>_g<10*f_half>.
        endian_flag: Specify output endian; 'b' for big or 'l' for little\
            endian. Default is input endian.
        wrap_flag: Suppress x and y padding (wrap-around).
        differentiate_flag: Apply differentiation.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `Gauss4dfpOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(GAUSS_4DFP_METADATA)
    cargs = []
    cargs.append("gauss_4dfp")
    cargs.append(input_file)
    cargs.append(str(f_half))
    if output_root is not None:
        cargs.append(output_root)
    if endian_flag is not None:
        cargs.extend([
            "-@",
            endian_flag
        ])
    if wrap_flag:
        cargs.append("-w")
    if differentiate_flag:
        cargs.append("-d")
    ret = Gauss4dfpOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_root + ".4dfp.ifh") if (output_root is not None) else None,
    )
    execution.run(cargs)
    return ret


__all__ = [
    "GAUSS_4DFP_METADATA",
    "Gauss4dfpOutputs",
    "gauss_4dfp",
]
