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

import typing
import pathlib
from styxdefs import *
import dataclasses

DCM2NIIX_AFNI_METADATA = Metadata(
    id="d0aaf4cd6aec28169a2517d39316626037b75aae.boutiques",
    name="dcm2niix_afni",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class Dcm2niixAfniOutputs(typing.NamedTuple):
    """
    Output object returned when calling `dcm2niix_afni(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    nifti_files: OutputPathType
    """The main output NIfTI files"""


def dcm2niix_afni(
    runner: Runner | None = None,
) -> Dcm2niixAfniOutputs:
    """
    DICOM to NIfTI converter optimized for AFNI.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/dcm2niix_afni.html
    
    Args:
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `Dcm2niixAfniOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(DCM2NIIX_AFNI_METADATA)
    cargs = []
    cargs.append("dcm2niix_afni")
    cargs.append("[OPTIONS]")
    cargs.append("<INPUT_FOLDER>")
    ret = Dcm2niixAfniOutputs(
        root=execution.output_file("."),
        nifti_files=execution.output_file("<OUTPUT_DIRECTORY>/*.nii"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "DCM2NIIX_AFNI_METADATA",
    "Dcm2niixAfniOutputs",
    "dcm2niix_afni",
]
