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

import typing
import pathlib
from styxdefs import *
import dataclasses

TKSURFER_METADATA = Metadata(
    id="603cb4c673862d6704782330c4df67ab125e67dd.boutiques",
    name="tksurfer",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def tksurfer(
    subject_id: str,
    hemisphere: str,
    surface_name: str,
    options: str | None = None,
    runner: Runner | None = None,
) -> TksurferOutputs:
    """
    3D visualization tool for cortical surface models (part of FreeSurfer).
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject_id: Subject identifier.
        hemisphere: Cortical hemisphere (e.g., lh or rh).
        surface_name: Surface name (e.g., inflated, sphere, white).
        options: Optional flags and parameters.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `TksurferOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(TKSURFER_METADATA)
    cargs = []
    cargs.append("tksurfer")
    cargs.append(subject_id)
    cargs.append(hemisphere)
    cargs.append(surface_name)
    if options is not None:
        cargs.append(options)
    ret = TksurferOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "TKSURFER_METADATA",
    "TksurferOutputs",
    "tksurfer",
]
