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

import typing
import pathlib
from styxdefs import *
import dataclasses

INVFEATREG_METADATA = Metadata(
    id="dfd93a0e3c77ac7d8350f0e55ba782b5705b1969.boutiques",
    name="invfeatreg",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


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


def invfeatreg(
    feat_directory: str,
    runner: Runner | None = None,
) -> InvfeatregOutputs:
    """
    Inverse warp image using FNIRT.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        feat_directory: FEAT Directory.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `InvfeatregOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(INVFEATREG_METADATA)
    cargs = []
    cargs.append("invfeatreg")
    cargs.append(feat_directory)
    ret = InvfeatregOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "INVFEATREG_METADATA",
    "InvfeatregOutputs",
    "invfeatreg",
]
