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

import typing
import pathlib
from styxdefs import *
import dataclasses

LABELS_DISJOINT_METADATA = Metadata(
    id="0053bad0da3df3d89f08c41248c8b88f9f33fb32.boutiques",
    name="labels_disjoint",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class LabelsDisjointOutputs(typing.NamedTuple):
    """
    Output object returned when calling `labels_disjoint(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Resulting output label file after subtraction."""


def labels_disjoint(
    label1: InputPathType,
    label2: InputPathType,
    outputname: str,
    runner: Runner | None = None,
) -> LabelsDisjointOutputs:
    """
    Subtracts one label file from another, effectively creating a label that
    represents label1 minus label2.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        label1: First label file (e.g., rh.Occ.label).
        label2: Second label file to subtract from the first (e.g.,\
            rh.V1.label).
        outputname: Output label file name where the result will be saved\
            (e.g., rh.Occ_V1.label).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `LabelsDisjointOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(LABELS_DISJOINT_METADATA)
    cargs = []
    cargs.append("labels_disjoint")
    cargs.append(execution.input_file(label1))
    cargs.append(execution.input_file(label2))
    cargs.append(outputname)
    ret = LabelsDisjointOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(outputname),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "LABELS_DISJOINT_METADATA",
    "LabelsDisjointOutputs",
    "labels_disjoint",
]
