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

import typing
import pathlib
from styxdefs import *
import dataclasses

UNPACK_IMA1_TCL_METADATA = Metadata(
    id="52c94b15732556feb79bbc32eda9530f12619cbc.boutiques",
    name="unpack_ima1.tcl",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class UnpackIma1TclOutputs(typing.NamedTuple):
    """
    Output object returned when calling `unpack_ima1_tcl(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    unpacked_files: OutputPathType
    """Unpacked files stored in the output directory"""


def unpack_ima1_tcl(
    input_directory: str,
    output_directory: str,
    runner: Runner | None = None,
) -> UnpackIma1TclOutputs:
    """
    A tool for unpacking images using FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_directory: The directory containing the input files to be\
            unpacked.
        output_directory: The directory where the unpacked files will be\
            stored.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `UnpackIma1TclOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(UNPACK_IMA1_TCL_METADATA)
    cargs = []
    cargs.append("unpack_ima1.tcl")
    cargs.append(input_directory)
    cargs.append(output_directory)
    ret = UnpackIma1TclOutputs(
        root=execution.output_file("."),
        unpacked_files=execution.output_file(output_directory + "/*"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "UNPACK_IMA1_TCL_METADATA",
    "UnpackIma1TclOutputs",
    "unpack_ima1_tcl",
]
