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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_VALIDATE_SKULL_STRIPPED_METADATA = Metadata(
    id="2bdfa9e2cc73998aa283c518ac64ca8fd5b27024.boutiques",
    name="mri_validate_skull_stripped",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriValidateSkullStrippedOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_validate_skull_stripped(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def mri_validate_skull_stripped(
    mri_reference: InputPathType,
    mri_test: InputPathType,
    weight: float,
    runner: Runner | None = None,
) -> MriValidateSkullStrippedOutputs:
    """
    Tool to validate skull stripped MRI images.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        mri_reference: Reference MRI image to compare against.
        mri_test: Test MRI image that has undergone skull stripping.
        weight: Weight parameter, should be greater than 1.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriValidateSkullStrippedOutputs`).
    """
    if not (1.01 <= weight): 
        raise ValueError(f"'weight' must be greater than 1.01 <= x but was {weight}")
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_VALIDATE_SKULL_STRIPPED_METADATA)
    cargs = []
    cargs.append("tntester")
    cargs.append(execution.input_file(mri_reference))
    cargs.append(execution.input_file(mri_test))
    cargs.append(str(weight))
    ret = MriValidateSkullStrippedOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_VALIDATE_SKULL_STRIPPED_METADATA",
    "MriValidateSkullStrippedOutputs",
    "mri_validate_skull_stripped",
]
