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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_3D_DTTO_DWI_METADATA = Metadata(
    id="0f0fbb0dc2b7d522416ef673b66be8d6a5895cef.boutiques",
    name="3dDTtoDWI",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V3dDttoDwiOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_3d_dtto_dwi(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_dwi: OutputPathType
    """Computed DWI images including sub-brick for each gradient vector."""


def v_3d_dtto_dwi(
    gradient_file: InputPathType,
    i0_dataset: InputPathType,
    dt_dataset: InputPathType,
    runner: Runner | None = None,
) -> V3dDttoDwiOutputs:
    """
    Tool to compute multiple gradient images from tensors and gradient vector
    coordinates applied to the I0-dataset.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        gradient_file: 1D file containing the gradient vectors (ASCII floats)\
            for non-zero gradients.
        i0_dataset: Volume without any gradient applied.
        dt_dataset: 6-sub-brick dataset containing the diffusion tensor data\
            (Dxx, Dxy, Dyy, Dxz, Dyz, Dzz).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V3dDttoDwiOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_3D_DTTO_DWI_METADATA)
    cargs = []
    cargs.append("3dDTtoDWI")
    cargs.append("[OPTIONS]")
    cargs.append(execution.input_file(gradient_file))
    cargs.append(execution.input_file(i0_dataset))
    cargs.append(execution.input_file(dt_dataset))
    ret = V3dDttoDwiOutputs(
        root=execution.output_file("."),
        output_dwi=execution.output_file("[PREFIX]*.HEAD"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V3dDttoDwiOutputs",
    "V_3D_DTTO_DWI_METADATA",
    "v_3d_dtto_dwi",
]
