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

import typing
import pathlib
from styxdefs import *
import dataclasses

T4IMGS_4DFP_METADATA = Metadata(
    id="a154bb5e4aacadb2e39707827d23586655ffa48d.boutiques",
    name="t4imgs_4dfp",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class T4imgs4dfpOutputs(typing.NamedTuple):
    """
    Output object returned when calling `t4imgs_4dfp(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    transformed_image: OutputPathType
    """Transformed 4dfp image as output."""


def t4imgs_4dfp(
    input_images: list[InputPathType],
    output_image: str,
    runner: Runner | None = None,
) -> T4imgs4dfpOutputs:
    """
    Freesurfer tool for transforming images according to a specified T4 file.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_images: Input list of 4dfp images.
        output_image: Output file name for the transformed image.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `T4imgs4dfpOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(T4IMGS_4DFP_METADATA)
    cargs = []
    cargs.append("t4imgs_4dfp")
    cargs.append("[OPTIONS]")
    cargs.extend([execution.input_file(f) for f in input_images])
    cargs.append(output_image)
    ret = T4imgs4dfpOutputs(
        root=execution.output_file("."),
        transformed_image=execution.output_file(output_image + ".4dfp.img"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "T4IMGS_4DFP_METADATA",
    "T4imgs4dfpOutputs",
    "t4imgs_4dfp",
]
