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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_TARGET_POS_METADATA = Metadata(
    id="8a1f7e5c9eef8b24a14e229ba9fabf1762b4bc4f.boutiques",
    name="mris_target_pos",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mris_target_pos(
    input_volume: InputPathType,
    input_surface: InputPathType,
    output_surface: str,
    adgws_file: str,
    threshold_values: list[float] | None = None,
    label: str | None = None,
    interpolation_method: str | None = None,
    debug_vertex: float | None = None,
    cbv_flag: bool = False,
    debug_flag: bool = False,
    check_options: bool = False,
    help_flag: bool = False,
    version_flag: bool = False,
    runner: Runner | None = None,
) -> MrisTargetPosOutputs:
    """
    Tool for setting target positions of a surface using input imaging data and
    other parameters.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_volume: Input volume file.
        input_surface: Input surface file.
        output_surface: Output surface file.
        adgws_file: ADGWS file.
        threshold_values: Threshold values for inward and outward target\
            positions.
        label: Label for processing.
        interpolation_method: Interpolation method name.
        debug_vertex: Vertex number for debugging.
        cbv_flag: CBV flag.
        debug_flag: Turn on debugging.
        check_options: Check options without running the program.
        help_flag: Display help information.
        version_flag: Display version information and exit.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisTargetPosOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_TARGET_POS_METADATA)
    cargs = []
    cargs.append("mris_target_pos")
    cargs.extend([
        "--v",
        execution.input_file(input_volume)
    ])
    cargs.extend([
        "--i",
        execution.input_file(input_surface)
    ])
    cargs.extend([
        "--o",
        output_surface
    ])
    cargs.extend([
        "--adgws",
        adgws_file
    ])
    if threshold_values is not None:
        cargs.extend([
            "--thresh",
            *map(str, threshold_values)
        ])
    if label is not None:
        cargs.extend([
            "--l",
            label
        ])
    if interpolation_method is not None:
        cargs.extend([
            "--interp",
            interpolation_method
        ])
    if debug_vertex is not None:
        cargs.extend([
            "--debug-vertex",
            str(debug_vertex)
        ])
    if cbv_flag:
        cargs.append("--cbv")
    if debug_flag:
        cargs.append("--debug")
    if check_options:
        cargs.append("--checkopts")
    if help_flag:
        cargs.append("--help")
    if version_flag:
        cargs.append("--version")
    ret = MrisTargetPosOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_TARGET_POS_METADATA",
    "MrisTargetPosOutputs",
    "mris_target_pos",
]
