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

import typing
import pathlib
from styxdefs import *
import dataclasses

IREPIFITVOL_METADATA = Metadata(
    id="a2bd7dc06ae3c68248647867b862df791e5ba76b.boutiques",
    name="irepifitvol",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class IrepifitvolOutputs(typing.NamedTuple):
    """
    Output object returned when calling `irepifitvol(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    fitted_output: OutputPathType
    """The resulting volume file after fitting"""


def irepifitvol(
    input_file: InputPathType,
    output_file: str = "fitted_output",
    runner: Runner | None = None,
) -> IrepifitvolOutputs:
    """
    A tool for 3D volume fitting.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input volume file for fitting.
        output_file: Output volume file after fitting.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `IrepifitvolOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(IREPIFITVOL_METADATA)
    cargs = []
    cargs.append("irepifitvol")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_file)
    ret = IrepifitvolOutputs(
        root=execution.output_file("."),
        fitted_output=execution.output_file(output_file + ".ext"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "IREPIFITVOL_METADATA",
    "IrepifitvolOutputs",
    "irepifitvol",
]
