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

import typing
import pathlib
from styxdefs import *
import dataclasses

HISTO_COMPUTE_JOINT_DENSITY_METADATA = Metadata(
    id="f724dcdabbfe196e5a6d9bc856c3b1b0e765be9b.boutiques",
    name="histo_compute_joint_density",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class HistoComputeJointDensityOutputs(typing.NamedTuple):
    """
    Output object returned when calling `histo_compute_joint_density(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_joint_density: OutputPathType
    """Computed joint density output file"""


def histo_compute_joint_density(
    volume1: InputPathType,
    volume2: InputPathType,
    joint_density_file: str,
    runner: Runner | None = None,
) -> HistoComputeJointDensityOutputs:
    """
    A tool to compute the joint density of two volumes.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        volume1: Input volume 1.
        volume2: Input volume 2.
        joint_density_file: Output joint density file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `HistoComputeJointDensityOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(HISTO_COMPUTE_JOINT_DENSITY_METADATA)
    cargs = []
    cargs.append("histo_compute_joint_density")
    cargs.append(execution.input_file(volume1))
    cargs.append(execution.input_file(volume2))
    cargs.append(joint_density_file)
    ret = HistoComputeJointDensityOutputs(
        root=execution.output_file("."),
        output_joint_density=execution.output_file(joint_density_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "HISTO_COMPUTE_JOINT_DENSITY_METADATA",
    "HistoComputeJointDensityOutputs",
    "histo_compute_joint_density",
]
