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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3DSVM_LINPREDICT_METADATA = Metadata(
    id="162a26d7cd1e95514fe2260fa414829582d88bd4.boutiques",
    name="3dsvm_linpredict",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dsvmLinpredictOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3dsvm_linpredict(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    stdout_output: OutputPathType
    """The result is a number printed to stdout"""


def v_3dsvm_linpredict(
    weight_vector: InputPathType,
    input_dataset: str,
    mask_dataset: InputPathType | None = None,
    runner: Runner | None = None,
) -> V3dsvmLinpredictOutputs:
    """
    Linear prediction for weights from 3dsvm.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        weight_vector: Weight vector dataset.
        input_dataset: Input dataset, potentially with sub-brick and/or\
            sub-range selectors.
        mask_dataset: Dataset to be used as a mask. Only voxels with nonzero\
            values in 'mset' will be averaged from 'dataset'. The mask dataset and\
            the input dataset must have the same number of voxels.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dsvmLinpredictOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3DSVM_LINPREDICT_METADATA)
    cargs = []
    cargs.append("3dsvm_linpredict")
    if mask_dataset is not None:
        cargs.extend([
            "-mask",
            execution.input_file(mask_dataset)
        ])
    cargs.append(execution.input_file(weight_vector))
    cargs.append(input_dataset)
    ret = V3dsvmLinpredictOutputs(
        root=execution.output_file("."),
        stdout_output=execution.output_file("stdout"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dsvmLinpredictOutputs",
    "V_3DSVM_LINPREDICT_METADATA",
    "v_3dsvm_linpredict",
]
