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

import typing
import pathlib
from styxdefs import *
import dataclasses

FAT_PROC_MAP_TO_DTI_METADATA = Metadata(
    id="ee78feae0990bd37d34d68c063edc4b3b4071179.boutiques",
    name="fat_proc_map_to_dti",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class FatProcMapToDtiOutputs(typing.NamedTuple):
    """
    Output object returned when calling `fat_proc_map_to_dti(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def fat_proc_map_to_dti(
    source: InputPathType,
    base: InputPathType,
    prefix: str,
    followers_nn: list[InputPathType] | None = None,
    followers_wsinc5: list[InputPathType] | None = None,
    followers_surf: list[InputPathType] | None = None,
    followers_ndset: list[InputPathType] | None = None,
    followers_spec: list[InputPathType] | None = None,
    matrix: InputPathType | None = None,
    workdir: str | None = None,
    no_cmd_out: bool = False,
    no_clean: bool = False,
    runner: Runner | None = None,
) -> FatProcMapToDtiOutputs:
    """
    A program for mapping data sets into DWI space, suitable for aligning anatomical
    ROI maps or EPI data to a DWI reference volume.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/fat_proc_map_to_dti.html
    
    Args:
        source: T1w volume file (source volume).
        base: DWI reference volume file.
        prefix: Output prefix for files and snapshots.
        followers_nn: Follower data sets with NN interpolation.
        followers_wsinc5: Follower data sets with wsinc5 interpolation.
        followers_surf: Surface follower data sets.
        followers_ndset: NIML follower data sets.
        followers_spec: Spec follower data sets.
        matrix: Pre-made matrix file for transformation.
        workdir: Specify a working directory.
        no_cmd_out: Don't save the command line call of this program.
        no_clean: Do not delete temporary working directory.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FatProcMapToDtiOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FAT_PROC_MAP_TO_DTI_METADATA)
    cargs = []
    cargs.append("fat_proc_map_to_dti")
    cargs.extend([
        "-source",
        execution.input_file(source)
    ])
    cargs.extend([
        "-base",
        execution.input_file(base)
    ])
    cargs.extend([
        "-prefix",
        prefix
    ])
    if followers_nn is not None:
        cargs.extend([
            "-followers_NN",
            *[execution.input_file(f) for f in followers_nn]
        ])
    if followers_wsinc5 is not None:
        cargs.extend([
            "-followers_wsinc5",
            *[execution.input_file(f) for f in followers_wsinc5]
        ])
    if followers_surf is not None:
        cargs.extend([
            "-followers_surf",
            *[execution.input_file(f) for f in followers_surf]
        ])
    if followers_ndset is not None:
        cargs.extend([
            "-followers_ndset",
            *[execution.input_file(f) for f in followers_ndset]
        ])
    if followers_spec is not None:
        cargs.extend([
            "-followers_spec",
            *[execution.input_file(f) for f in followers_spec]
        ])
    if matrix is not None:
        cargs.extend([
            "-matrix",
            execution.input_file(matrix)
        ])
    if workdir is not None:
        cargs.extend([
            "-workdir",
            workdir
        ])
    if no_cmd_out:
        cargs.append("-no_cmd_out")
    if no_clean:
        cargs.append("-no_clean")
    ret = FatProcMapToDtiOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FAT_PROC_MAP_TO_DTI_METADATA",
    "FatProcMapToDtiOutputs",
    "fat_proc_map_to_dti",
]
