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

import typing
import pathlib
from styxdefs import *
import dataclasses

MKMNC_INDEX_TCL_METADATA = Metadata(
    id="153ac6ba9dc33639bcc37f096fb83434f0b7cb92.boutiques",
    name="mkmnc_index.tcl",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MkmncIndexTclOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mkmnc_index_tcl(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    indexfile: OutputPathType
    """Generated index file"""


def mkmnc_index_tcl(
    infile: InputPathType,
    outfile: str,
    runner: Runner | None = None,
) -> MkmncIndexTclOutputs:
    """
    A tool for creating MINC indices.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        infile: Input MINC file.
        outfile: Output index file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MkmncIndexTclOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MKMNC_INDEX_TCL_METADATA)
    cargs = []
    cargs.append("mkmnc_index.tcl")
    cargs.append(execution.input_file(infile))
    cargs.append(outfile)
    ret = MkmncIndexTclOutputs(
        root=execution.output_file("."),
        indexfile=execution.output_file(outfile),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MKMNC_INDEX_TCL_METADATA",
    "MkmncIndexTclOutputs",
    "mkmnc_index_tcl",
]
