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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_CURVATURE_STATS_METADATA = Metadata(
    id="471b147c9e4a5986d26ffc5619a8d1ade9f883a3.boutiques",
    name="mris_curvature_stats",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisCurvatureStatsOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_curvature_stats(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    scaled_curvature_file: OutputPathType
    """Scaled curvature file."""


def mris_curvature_stats(
    subject_name: str,
    hemisphere: str,
    runner: Runner | None = None,
) -> MrisCurvatureStatsOutputs:
    """
    Tool for calculating statistics on surface curvature values.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject_name: Subject name defined in the SUBJECTS_DIR.
        hemisphere: Hemisphere, can be 'lh' or 'rh'.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisCurvatureStatsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_CURVATURE_STATS_METADATA)
    cargs = []
    cargs.append("mris_curvature_stats")
    cargs.append("[OPTIONS]")
    cargs.append(subject_name)
    cargs.append(hemisphere)
    cargs.append("[CURVFILE...]")
    ret = MrisCurvatureStatsOutputs(
        root=execution.output_file("."),
        scaled_curvature_file=execution.output_file(subject_name + "/surf/" + hemisphere + ".[CURVATURE_FILES].scaled.crv"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_CURVATURE_STATS_METADATA",
    "MrisCurvatureStatsOutputs",
    "mris_curvature_stats",
]
