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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__AFNI_REFACER_MAKE_MASTER_METADATA = Metadata(
    id="d2b95955add5ec1c7ee9c902b86d10ff4ae67032.boutiques",
    name="@afni_refacer_make_master",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VAfniRefacerMakeMasterOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__afni_refacer_make_master(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_shell_dataset: OutputPathType
    """Output dataset containing the average 'face' (non-brain tissue)."""


def v__afni_refacer_make_master(
    input_datasets: list[InputPathType],
    runner: Runner | None = None,
) -> VAfniRefacerMakeMasterOutputs:
    """
    This script makes a new mask/shell dataset for use with @afni_refacer_run by
    averaging 'faces' (non-brain tissue) from input datasets.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/@afni_refacer_make_master.html
    
    Args:
        input_datasets: List of T1-weighted datasets that have NOT been\
            skull-stripped, defaced, or refaced.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VAfniRefacerMakeMasterOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__AFNI_REFACER_MAKE_MASTER_METADATA)
    cargs = []
    cargs.append("@afni_refacer_make_master")
    cargs.extend([execution.input_file(f) for f in input_datasets])
    ret = VAfniRefacerMakeMasterOutputs(
        root=execution.output_file("."),
        output_shell_dataset=execution.output_file("afni_refacer_shell.nii.gz"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VAfniRefacerMakeMasterOutputs",
    "V__AFNI_REFACER_MAKE_MASTER_METADATA",
    "v__afni_refacer_make_master",
]
