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

import typing
import pathlib
from styxdefs import *
import dataclasses

SLICEANIMATE_METADATA = Metadata(
    id="05268b7eca1ce9802cba56c1e5171a4d5003db1c.boutiques",
    name="sliceanimate",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


class SliceanimateOutputs(typing.NamedTuple):
    """
    Output object returned when calling `sliceanimate(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    animated_gif: OutputPathType
    """Generated animated GIF"""


def sliceanimate(
    output_file: str,
    input_files: list[InputPathType],
    runner: Runner | None = None,
) -> SliceanimateOutputs:
    """
    A tool for animating slices of an image using whirlgif.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        output_file: Output animated GIF file.
        input_files: Input image files for animation.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SliceanimateOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SLICEANIMATE_METADATA)
    cargs = []
    cargs.append("sliceanimate")
    cargs.append(output_file)
    cargs.append("--")
    cargs.extend([execution.input_file(f) for f in input_files])
    ret = SliceanimateOutputs(
        root=execution.output_file("."),
        animated_gif=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SLICEANIMATE_METADATA",
    "SliceanimateOutputs",
    "sliceanimate",
]
