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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_COMPUTE_VOLUME_INTENSITIES_METADATA = Metadata(
    id="0ef3728f055c825945a1bf63696573fc7f07f67d.boutiques",
    name="mri_compute_volume_intensities",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriComputeVolumeIntensitiesOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_compute_volume_intensities(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_volume_file: OutputPathType
    """Computed output volume file"""


def mri_compute_volume_intensities(
    input_intensity: InputPathType,
    volume_fraction_stem: str,
    output_volume: InputPathType,
    runner: Runner | None = None,
) -> MriComputeVolumeIntensitiesOutputs:
    """
    A tool to compute volume intensities for a given input intensity volume and
    volume fraction stem.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_intensity: Input intensity volume.
        volume_fraction_stem: Volume fraction stem.
        output_volume: Output volume file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriComputeVolumeIntensitiesOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_COMPUTE_VOLUME_INTENSITIES_METADATA)
    cargs = []
    cargs.append("mri_compute_volume_intensities")
    cargs.append(execution.input_file(input_intensity))
    cargs.append(volume_fraction_stem)
    cargs.append(execution.input_file(output_volume))
    ret = MriComputeVolumeIntensitiesOutputs(
        root=execution.output_file("."),
        output_volume_file=execution.output_file(pathlib.Path(output_volume).name),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_COMPUTE_VOLUME_INTENSITIES_METADATA",
    "MriComputeVolumeIntensitiesOutputs",
    "mri_compute_volume_intensities",
]
