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

import typing
import pathlib
from styxdefs import *
import dataclasses

ADJUNCT_SUMA_FS_MASK_AND_QC_METADATA = Metadata(
    id="e333368d139aab06ce173382ee2a0cb69f091a99.boutiques",
    name="adjunct_suma_fs_mask_and_qc",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class AdjunctSumaFsMaskAndQcOutputs(typing.NamedTuple):
    """
    Output object returned when calling `adjunct_suma_fs_mask_and_qc(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    fs_parc_wb_mask: OutputPathType
    """Whole brain mask based on the FS parcellation created by this script."""
    qc_image_00: OutputPathType
    """QC image with overlay of brainmask.nii* volume in red and parcellated
    subset in black."""
    qc_image_01: OutputPathType
    """QC image with overlay of fs_parc_wb_mask.nii.gz."""
    qc_image_02: OutputPathType
    """QC image with overlay of tissue segmentations."""
    qc_image_03: OutputPathType
    """QC image with overlay of GM."""
    qc_image_04: OutputPathType
    """QC image with overlay of WM."""
    qc_image_05: OutputPathType
    """QC image with overlay of "2000" atlas parcellation."""


def adjunct_suma_fs_mask_and_qc(
    subj_id: str,
    suma_dir: str,
    no_clean: bool = False,
    help_: bool = False,
    hview: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> AdjunctSumaFsMaskAndQcOutputs:
    """
    Script for quickly making some QC images for the SUMA/ directory created by
    @SUMA_Make_Spec_FS after running FreeSurfer's recon-all.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        subj_id: Subject ID.
        suma_dir: SUMA/ directory output by AFNI's @SUMA_Make_Spec_FS.
        no_clean: Do not remove temporary working subdirectory (default: remove\
            it).
        help_: Show help.
        hview: Show help in text editor.
        version: Show version.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `AdjunctSumaFsMaskAndQcOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(ADJUNCT_SUMA_FS_MASK_AND_QC_METADATA)
    cargs = []
    cargs.append("adjunct_suma_fs_mask_and_qc")
    cargs.extend([
        "-sid",
        subj_id
    ])
    cargs.extend([
        "-suma_dir",
        suma_dir
    ])
    if no_clean:
        cargs.append("-no_clean")
    if help_:
        cargs.append("-help")
    if hview:
        cargs.append("-hview")
    if version:
        cargs.append("-ver")
    ret = AdjunctSumaFsMaskAndQcOutputs(
        root=execution.output_file("."),
        fs_parc_wb_mask=execution.output_file("SUMA/fs_parc_wb_mask.nii.gz"),
        qc_image_00=execution.output_file("SUMA/qc_00*.jpg"),
        qc_image_01=execution.output_file("SUMA/qc_01*.jpg"),
        qc_image_02=execution.output_file("SUMA/qc_02*.jpg"),
        qc_image_03=execution.output_file("SUMA/qc_03*.jpg"),
        qc_image_04=execution.output_file("SUMA/qc_04*.jpg"),
        qc_image_05=execution.output_file("SUMA/qc_05*.jpg"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "ADJUNCT_SUMA_FS_MASK_AND_QC_METADATA",
    "AdjunctSumaFsMaskAndQcOutputs",
    "adjunct_suma_fs_mask_and_qc",
]
