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

import typing
import pathlib
from styxdefs import *
import dataclasses

UNPACKIMADIR2_METADATA = Metadata(
    id="bdf6eb9c77635e9326080586e7654d60496c26b4.boutiques",
    name="unpackimadir2",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def unpackimadir2(
    directory: InputPathType,
    runner: Runner | None = None,
) -> Unpackimadir2Outputs:
    """
    Tool to unpack image directories, from FreeSurfer suite.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        directory: Image directory to unpack.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `Unpackimadir2Outputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(UNPACKIMADIR2_METADATA)
    cargs = []
    cargs.append("unpackimadir2")
    cargs.append(execution.input_file(directory))
    ret = Unpackimadir2Outputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "UNPACKIMADIR2_METADATA",
    "Unpackimadir2Outputs",
    "unpackimadir2",
]
