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

import typing
import pathlib
from styxdefs import *
import dataclasses

TKSURFERFV_METADATA = Metadata(
    id="5f6c49af2e657ea2532d217b90ff0a44fe817bc6.boutiques",
    name="tksurferfv",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def tksurferfv(
    subject: str,
    hemi: str,
    surface: str,
    tksurfer: bool = False,
    all_surfaces: bool = False,
    vgl: bool = False,
    no_vgl: bool = False,
    no_outline: bool = False,
    neuro_orientation: bool = False,
    rotate_around_cursor: bool = False,
    heat_scale: str | None = "min_to_max",
    runner: Runner | None = None,
) -> TksurferfvOutputs:
    """
    A script that runs freeview with arguments similar to tksurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject: Subject identifier.
        hemi: Hemisphere (e.g., lh or rh).
        surface: Surface type.
        tksurfer: Use tksurfer instead of freeview.
        all_surfaces: Load white, pial, and inflated surfaces.
        vgl: Run freeview with /usr/pubsw/bin/vglrun.
        no_vgl: Do not run freeview with /usr/pubsw/bin/vglrun.
        no_outline: Do not show annotations as outlines.
        neuro_orientation: Use neurological orientation instead of\
            radiological.
        rotate_around_cursor: Rotate around cursor in 3D view.
        heat_scale: Overlay heat scale (options: linear, linearopaque,\
            piecewise, min_to_max).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `TksurferfvOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(TKSURFERFV_METADATA)
    cargs = []
    cargs.append("tksurferfv")
    cargs.append(subject)
    cargs.append(hemi)
    cargs.append(surface)
    if tksurfer:
        cargs.append("-tksurfer")
    if all_surfaces:
        cargs.append("-all")
    if vgl:
        cargs.append("-vgl")
    if no_vgl:
        cargs.append("-no-vgl")
    if no_outline:
        cargs.append("-no-outline")
    if neuro_orientation:
        cargs.append("-neuro")
    if rotate_around_cursor:
        cargs.append("-rca")
    if heat_scale is not None:
        cargs.append(heat_scale)
    ret = TksurferfvOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "TKSURFERFV_METADATA",
    "TksurferfvOutputs",
    "tksurferfv",
]
