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

import typing
import pathlib
from styxdefs import *
import dataclasses

COR_TO_MINC_METADATA = Metadata(
    id="40b8ba63752dc024cdd4c61323a6a2c0ec2b41fb.boutiques",
    name="cor_to_minc",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class CorToMincOutputs(typing.NamedTuple):
    """
    Output object returned when calling `cor_to_minc(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_minc: OutputPathType
    """Converted MINC file"""


def cor_to_minc(
    cor_directory: str,
    minc_file: str,
    runner: Runner | None = None,
) -> CorToMincOutputs:
    """
    Converts a directory of COR files to a MINC file.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        cor_directory: Directory containing COR files.
        minc_file: Output MINC file name.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `CorToMincOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(COR_TO_MINC_METADATA)
    cargs = []
    cargs.append("cor_to_minc")
    cargs.append(cor_directory)
    cargs.append(minc_file)
    ret = CorToMincOutputs(
        root=execution.output_file("."),
        output_minc=execution.output_file(minc_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "COR_TO_MINC_METADATA",
    "CorToMincOutputs",
    "cor_to_minc",
]
