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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_OR_METADATA = Metadata(
    id="23de8af32e672952c619b947417102b41f7a6636.boutiques",
    name="mri_or",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mri_or(
    input_files: list[InputPathType],
    original_labels: bool = False,
    runner: Runner | None = None,
) -> MriOrOutputs:
    """
    Performs a logical voxel-wise OR on a series of volumes.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_files: Input image files on which to perform the logical OR\
            operation.
        original_labels: Keeps the original label values in the input files\
            when creating the output.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriOrOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_OR_METADATA)
    cargs = []
    cargs.append("mri_or")
    if original_labels:
        cargs.append("-o")
    cargs.extend([execution.input_file(f) for f in input_files])
    ret = MriOrOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_OR_METADATA",
    "MriOrOutputs",
    "mri_or",
]
