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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_GRADIENT_INFO_METADATA = Metadata(
    id="31065ab477983c227eb79e13fe275d6a65852b07.boutiques",
    name="mri_gradient_info",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriGradientInfoOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_gradient_info(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    gradient_info_output: OutputPathType
    """Text file containing the extracted gradient information."""


def mri_gradient_info(
    input_image: InputPathType,
    runner: Runner | None = None,
) -> MriGradientInfoOutputs:
    """
    A utility to obtain gradient information from MRI images using FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_image: Input MRI image file, typically in .mgz format.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriGradientInfoOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_GRADIENT_INFO_METADATA)
    cargs = []
    cargs.append("mri_gradient_info")
    cargs.append(execution.input_file(input_image))
    ret = MriGradientInfoOutputs(
        root=execution.output_file("."),
        gradient_info_output=execution.output_file("gradient_info_output.txt"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_GRADIENT_INFO_METADATA",
    "MriGradientInfoOutputs",
    "mri_gradient_info",
]
