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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_NITERS2FWHM_METADATA = Metadata(
    id="46d8d10a4cb889cf8adeaf5acc47511663af44b8.boutiques",
    name="mris_niters2fwhm",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mris_niters2fwhm(
    subject: str,
    hemi: str,
    surf: str,
    dof: float,
    niters: float,
    debug: bool = False,
    checkopts: bool = False,
    help_: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> MrisNiters2fwhmOutputs:
    """
    Convert number of iterations to full width at half maximum (FWHM) for surface.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject: Subject identifier.
        hemi: Hemisphere (e.g., lh or rh).
        surf: Surface type (e.g., white, pial).
        dof: Degrees of Freedom.
        niters: Maximum number of iterations.
        debug: Turn on debugging.
        checkopts: Don't run anything, just check options and exit.
        help_: Print out information on how to use this program.
        version: Print out version and exit.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisNiters2fwhmOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_NITERS2FWHM_METADATA)
    cargs = []
    cargs.append("mris_niters2fwhm")
    cargs.extend([
        "--s",
        subject
    ])
    cargs.extend([
        "--h",
        hemi
    ])
    cargs.extend([
        "--surf",
        surf
    ])
    cargs.extend([
        "--dof",
        str(dof)
    ])
    cargs.extend([
        "--niters",
        str(niters)
    ])
    if debug:
        cargs.append("--debug")
    if checkopts:
        cargs.append("--checkopts")
    if help_:
        cargs.append("--help")
    if version:
        cargs.append("--version")
    ret = MrisNiters2fwhmOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_NITERS2FWHM_METADATA",
    "MrisNiters2fwhmOutputs",
    "mris_niters2fwhm",
]
