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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_NUDGE_METADATA = Metadata(
    id="6f298ed7d045a2ce709015d0cecce0980607d9d6.boutiques",
    name="mris_nudge",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisNudgeOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_nudge(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_surface: OutputPathType
    """Output surface file after nudging"""


def mris_nudge(
    input_surface: InputPathType,
    input_volume: InputPathType,
    vertex: int,
    target_val: float,
    nbhd: int,
    runner: Runner | None = None,
) -> MrisNudgeOutputs:
    """
    A tool to nudge vertex positions on a surface using a volume.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_surface: Input surface file for nudging.
        input_volume: Input volume file.
        vertex: Vertex to nudge.
        target_val: Target value for nudging.
        nbhd: Neighborhood size for nudge operation.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisNudgeOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_NUDGE_METADATA)
    cargs = []
    cargs.append("mris_nudge")
    cargs.append(execution.input_file(input_surface))
    cargs.append(execution.input_file(input_volume))
    cargs.append(str(vertex))
    cargs.append(str(target_val))
    cargs.append(str(nbhd))
    cargs.append("[OUTPUT_SURF]")
    ret = MrisNudgeOutputs(
        root=execution.output_file("."),
        output_surface=execution.output_file("[OUTPUT_SURF]"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_NUDGE_METADATA",
    "MrisNudgeOutputs",
    "mris_nudge",
]
