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

import typing
import pathlib
from styxdefs import *
import dataclasses

IFH2HDR_METADATA = Metadata(
    id="e59ad437a43879fdeda8a194eb2d5e26f853b35c.boutiques",
    name="ifh2hdr",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def ifh2hdr(
    input_file: InputPathType,
    range_: str | None = None,
    runner: Runner | None = None,
) -> Ifh2hdrOutputs:
    """
    Tool for converting IFH (Interfile Header) to HDR (Header) format in 4dfp
    (Four-Dimensional Functional Image) file format.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input 4dfp file.
        range_: Set range for the 4dfp file. Format: <float>[to<float>].
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `Ifh2hdrOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(IFH2HDR_METADATA)
    cargs = []
    cargs.append("ifh2hdr")
    cargs.append(execution.input_file(input_file))
    if range_ is not None:
        cargs.extend([
            "-r",
            range_
        ])
    ret = Ifh2hdrOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "IFH2HDR_METADATA",
    "Ifh2hdrOutputs",
    "ifh2hdr",
]
