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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_COMPUTE_LAYER_INTENSITIES_METADATA = Metadata(
    id="ea3678d2dae6244999c4877f8c133e28845c7c8b.boutiques",
    name="mris_compute_layer_intensities",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisComputeLayerIntensitiesOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_compute_layer_intensities(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_overlay_file: OutputPathType
    """The output overlay file generated by the tool."""


def mris_compute_layer_intensities(
    input_intensity_volume: InputPathType,
    layer_volume_fractions_file: InputPathType,
    input_surface: InputPathType,
    output_overlay: str,
    runner: Runner | None = None,
) -> MrisComputeLayerIntensitiesOutputs:
    """
    Computes intensity overlays for specified cortical layers based on input volumes
    and surfaces.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_intensity_volume: The input intensity volume file.
        layer_volume_fractions_file: The layer volume fractions file.
        input_surface: The input surface file for layer intensity computation.
        output_overlay: The output file where the overlay will be saved.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisComputeLayerIntensitiesOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_COMPUTE_LAYER_INTENSITIES_METADATA)
    cargs = []
    cargs.append("mris_compute_layer_intensities")
    cargs.append(execution.input_file(input_intensity_volume))
    cargs.append(execution.input_file(layer_volume_fractions_file))
    cargs.append(execution.input_file(input_surface))
    cargs.append(output_overlay)
    ret = MrisComputeLayerIntensitiesOutputs(
        root=execution.output_file("."),
        output_overlay_file=execution.output_file(output_overlay),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_COMPUTE_LAYER_INTENSITIES_METADATA",
    "MrisComputeLayerIntensitiesOutputs",
    "mris_compute_layer_intensities",
]
