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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_VOLUME_METADATA = Metadata(
    id="90a9e134e9f1f52b94a8a65439a8368906985f96.boutiques",
    name="mris_volume",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mris_volume(
    surface_file: InputPathType,
    verbose_flag: bool = False,
    runner: Runner | None = None,
) -> MrisVolumeOutputs:
    """
    A tool for computing the volume of a closed surface using a divergence formula.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        surface_file: The closed surface file whose volume is to be computed.
        verbose_flag: Output more messages for verbose output.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisVolumeOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_VOLUME_METADATA)
    cargs = []
    cargs.append("mris_volume")
    cargs.append(execution.input_file(surface_file))
    if verbose_flag:
        cargs.append("-v")
    ret = MrisVolumeOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_VOLUME_METADATA",
    "MrisVolumeOutputs",
    "mris_volume",
]
