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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_REGISTER_LABEL_MAP_METADATA = Metadata(
    id="da7f5799fccbaa00ae28b92114de5d6ef1a4db4f.boutiques",
    name="mris_register_label_map",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mris_register_label_map(
    subjects_list: str,
    target_subject: str,
    prior: str,
    label: str,
    template_volume: InputPathType,
    debug: bool = False,
    check_opts: bool = False,
    help_: bool = False,
    subjects_dir: str | None = None,
    version: bool = False,
    vno: float | None = None,
    runner: Runner | None = None,
) -> MrisRegisterLabelMapOutputs:
    """
    Tool for registering label maps in Freesurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subjects_list: List of training subjects.
        target_subject: Name of target subject.
        prior: Name of prior surface overlay.
        label: Name of label for each subject.
        template_volume: Template volume file.
        debug: Turn on debugging.
        check_opts: Don't run anything, just check options and exit.
        help_: Print out information on how to use this program.
        subjects_dir: SUBJECTS_DIR.
        version: Print out version and exit.
        vno: Debug this vertex.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisRegisterLabelMapOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_REGISTER_LABEL_MAP_METADATA)
    cargs = []
    cargs.append("mris_register_label_map")
    cargs.extend([
        "--subjects",
        subjects_list
    ])
    cargs.extend([
        "--trgsubject",
        target_subject
    ])
    cargs.extend([
        "--prior",
        prior
    ])
    cargs.extend([
        "--label",
        label
    ])
    cargs.extend([
        "--temp-vol",
        execution.input_file(template_volume)
    ])
    if debug:
        cargs.append("--debug")
    if check_opts:
        cargs.append("--checkopts")
    if help_:
        cargs.append("--help")
    if subjects_dir is not None:
        cargs.extend([
            "--sdir",
            subjects_dir
        ])
    if version:
        cargs.append("--version")
    if vno is not None:
        cargs.extend([
            "--v",
            str(vno)
        ])
    ret = MrisRegisterLabelMapOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_REGISTER_LABEL_MAP_METADATA",
    "MrisRegisterLabelMapOutputs",
    "mris_register_label_map",
]
