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

import typing
import pathlib
from styxdefs import *
import dataclasses

PLOT_STRUCTURE_STATS_TCL_METADATA = Metadata(
    id="a74a29bbca7b8c304af58dc63af9e2298f4ac223.boutiques",
    name="plot_structure_stats.tcl",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class PlotStructureStatsTclOutputs(typing.NamedTuple):
    """
    Output object returned when calling `plot_structure_stats_tcl(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    plot_file: OutputPathType
    """Generated plot"""


def plot_structure_stats_tcl(
    input_file: InputPathType,
    output_file: str,
    runner: Runner | None = None,
) -> PlotStructureStatsTclOutputs:
    """
    Script to plot structural statistics.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input stats file.
        output_file: Output plot file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `PlotStructureStatsTclOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(PLOT_STRUCTURE_STATS_TCL_METADATA)
    cargs = []
    cargs.append("plot_structure_stats")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_file)
    ret = PlotStructureStatsTclOutputs(
        root=execution.output_file("."),
        plot_file=execution.output_file(output_file + ".png"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "PLOT_STRUCTURE_STATS_TCL_METADATA",
    "PlotStructureStatsTclOutputs",
    "plot_structure_stats_tcl",
]
