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

import typing
import pathlib
from styxdefs import *
import dataclasses

FSLVAL_METADATA = Metadata(
    id="8a100481b1c8accf8862e7e516017aa7a9142b94.boutiques",
    name="fslval",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


class FslvalOutputs(typing.NamedTuple):
    """
    Output object returned when calling `fslval(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    stdout: OutputPathType
    """Output printed to standard out"""


def fslval(
    input_file: InputPathType,
    keyword_: str,
    runner: Runner | None = None,
) -> FslvalOutputs:
    """
    Tool for printing out header information from NIfTI image files.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        input_file: Input NIfTI image file.
        keyword_: Keyword to query from the NIfTI header.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FslvalOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FSLVAL_METADATA)
    cargs = []
    cargs.append("fslval")
    cargs.append(execution.input_file(input_file))
    cargs.append(keyword_)
    ret = FslvalOutputs(
        root=execution.output_file("."),
        stdout=execution.output_file("stdout"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FSLVAL_METADATA",
    "FslvalOutputs",
    "fslval",
]
