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

import typing
import pathlib
from styxdefs import *
import dataclasses

EDDY_QUAD_METADATA = Metadata(
    id="55c16aa046b6af53dd6839c56b18fd79a0c73855.boutiques",
    name="eddy_quad",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class EddyQuadOutputs(typing.NamedTuple):
    """
    Output object returned when calling `eddy_quad(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_dir_qc: OutputPathType
    """Quality control data outputs"""


def eddy_quad(
    eddy_base: str,
    eddy_index: InputPathType,
    eddy_params: InputPathType,
    mask: InputPathType,
    bvals: InputPathType,
    runner: Runner | None = None,
) -> EddyQuadOutputs:
    """
    QUality Assessment for DMRI.
    
    Author: FMRIB Software Library
    
    Args:
        eddy_base: Basename (including path) specified when running EDDY.
        eddy_index: File containing indices for all volumes into acquisition\
            parameters.
        eddy_params: File containing acquisition parameters.
        mask: Binary mask file.
        bvals: b-values file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `EddyQuadOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(EDDY_QUAD_METADATA)
    cargs = []
    cargs.append("eddy_quad")
    cargs.append(eddy_base)
    cargs.append("--eddyIdx")
    cargs.extend([
        "--eddyIdx",
        execution.input_file(eddy_index)
    ])
    cargs.append("--eddyParams")
    cargs.extend([
        "--eddyParams",
        execution.input_file(eddy_params)
    ])
    cargs.append("--mask")
    cargs.extend([
        "--mask",
        execution.input_file(mask)
    ])
    cargs.append("--bvals")
    cargs.extend([
        "--bvals",
        execution.input_file(bvals)
    ])
    cargs.append("[OPTIONS]")
    ret = EddyQuadOutputs(
        root=execution.output_file("."),
        output_dir_qc=execution.output_file("<output-dir>"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "EDDY_QUAD_METADATA",
    "EddyQuadOutputs",
    "eddy_quad",
]
