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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_VEC_RGB_TO_HSL_METADATA = Metadata(
    id="9bd7d5be67d0b333dca8898a8d70c130d3545628.boutiques",
    name="3dVecRGB_to_HSL",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dVecRgbToHslOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_vec_rgb_to_hsl(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_hsl_dataset: OutputPathType
    """Output HSL dataset"""


def v_3d_vec_rgb_to_hsl(
    prefix: str,
    in_vec: InputPathType,
    mask: InputPathType | None = None,
    in_scal: InputPathType | None = None,
    runner: Runner | None = None,
) -> V3dVecRgbToHslOutputs:
    """
    Convert a 3-brick RGB (red, green, blue) data set to an HSL (hue, saturation,
    luminance) one.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dVecRGB_to_HSL.html
    
    Args:
        prefix: Output file name part.
        in_vec: Input RGB vector file of three bricks, presumably each having\
            values in the interval [0,1].
        mask: Whole brain mask within which to calculate things. Otherwise,\
            data should be masked already.
        in_scal: Scalar file (single brick) which will be appended to the\
            output file, mainly aimed at loading in an FA data set for tract volume\
            coloration.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dVecRgbToHslOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_VEC_RGB_TO_HSL_METADATA)
    cargs = []
    cargs.append("3dVecRGBtoHSL")
    cargs.extend([
        "-prefix",
        prefix
    ])
    cargs.extend([
        "-in_vec",
        execution.input_file(in_vec)
    ])
    if mask is not None:
        cargs.extend([
            "-mask",
            execution.input_file(mask)
        ])
    if in_scal is not None:
        cargs.extend([
            "-in_scal",
            execution.input_file(in_scal)
        ])
    ret = V3dVecRgbToHslOutputs(
        root=execution.output_file("."),
        output_hsl_dataset=execution.output_file(prefix + "_HSL+*.HEAD"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dVecRgbToHslOutputs",
    "V_3D_VEC_RGB_TO_HSL_METADATA",
    "v_3d_vec_rgb_to_hsl",
]
