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

import typing
import pathlib
from styxdefs import *
import dataclasses

UNPACK_IMA_TCL_METADATA = Metadata(
    id="f7bb633c8e2fc57cba56d642be005b58715d8346.boutiques",
    name="unpack_ima.tcl",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def unpack_ima_tcl(
    target_dir: str = "~",
    runner: Runner | None = None,
) -> UnpackImaTclOutputs:
    """
    A tool to unpack MRI DICOM .ima files.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        target_dir: Target directory to unpack the files.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `UnpackImaTclOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(UNPACK_IMA_TCL_METADATA)
    cargs = []
    cargs.append("unpack_ima.tcl")
    cargs.append(target_dir)
    ret = UnpackImaTclOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "UNPACK_IMA_TCL_METADATA",
    "UnpackImaTclOutputs",
    "unpack_ima_tcl",
]
