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

import typing
import pathlib
from styxdefs import *
import dataclasses

IS_SURFACE_METADATA = Metadata(
    id="6cb9d1446618fbf43c51093ee6543e6c01436b21.boutiques",
    name="is-surface",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def is_surface(
    infile: InputPathType,
    runner: Runner | None = None,
) -> IsSurfaceOutputs:
    """
    Determines whether a file is a volume-encoded surface file by examining its
    dimensions.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        infile: Input file to check if it's a surface.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `IsSurfaceOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(IS_SURFACE_METADATA)
    cargs = []
    cargs.extend([
        "-surface",
        "is" + execution.input_file(infile)
    ])
    ret = IsSurfaceOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "IS_SURFACE_METADATA",
    "IsSurfaceOutputs",
    "is_surface",
]
