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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_JOINT_DENSITY_METADATA = Metadata(
    id="95c3248976aa45e74859871185ad767414270ee1.boutiques",
    name="mri_joint_density",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriJointDensityOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_joint_density(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file containing the computed joint density"""


def mri_joint_density(
    vol1: InputPathType,
    vol2: InputPathType,
    output_density_file: str,
    runner: Runner | None = None,
) -> MriJointDensityOutputs:
    """
    Tool for computing joint density from two volumes.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        vol1: First input volume.
        vol2: Second input volume.
        output_density_file: Output joint density file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriJointDensityOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_JOINT_DENSITY_METADATA)
    cargs = []
    cargs.append("mri_joint_density")
    cargs.append(execution.input_file(vol1))
    cargs.append(execution.input_file(vol2))
    cargs.append(output_density_file)
    ret = MriJointDensityOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_density_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_JOINT_DENSITY_METADATA",
    "MriJointDensityOutputs",
    "mri_joint_density",
]
