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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_GCA_AMBIGUOUS_METADATA = Metadata(
    id="8e1f7ad27bb8e2945f700929ab50960c8ad52f74.boutiques",
    name="mri_gca_ambiguous",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriGcaAmbiguousOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_gca_ambiguous(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_image: OutputPathType
    """Resulting MR image file with computed ambiguity measure"""


def mri_gca_ambiguous(
    gca_file: InputPathType,
    output_volume: InputPathType,
    runner: Runner | None = None,
) -> MriGcaAmbiguousOutputs:
    """
    This program computes an ambiguity measure across a GCA and outputs an MR image
    of it.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        gca_file: The input GCA file.
        output_volume: The output MR image file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriGcaAmbiguousOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_GCA_AMBIGUOUS_METADATA)
    cargs = []
    cargs.append("mri_gca_ambiguous")
    cargs.append(execution.input_file(gca_file))
    cargs.append(execution.input_file(output_volume))
    ret = MriGcaAmbiguousOutputs(
        root=execution.output_file("."),
        output_image=execution.output_file(pathlib.Path(output_volume).name),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_GCA_AMBIGUOUS_METADATA",
    "MriGcaAmbiguousOutputs",
    "mri_gca_ambiguous",
]
