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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_REDUCE_METADATA = Metadata(
    id="cf6964a089f9810b1107cc8ec31b854f370cd7e4.boutiques",
    name="mri_reduce",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriReduceOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_reduce(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    reduced_output: OutputPathType
    """Reduced MRI file output"""


def mri_reduce(
    input_file: InputPathType,
    output_file: str,
    runner: Runner | None = None,
) -> MriReduceOutputs:
    """
    A tool to reduce MRI file dimensions.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input MRI file.
        output_file: Output filename for the reduced MRI file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriReduceOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_REDUCE_METADATA)
    cargs = []
    cargs.append("mri_reduce")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_file)
    ret = MriReduceOutputs(
        root=execution.output_file("."),
        reduced_output=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_REDUCE_METADATA",
    "MriReduceOutputs",
    "mri_reduce",
]
