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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_CONVERT_METADATA = Metadata(
    id="072cf5d2422186514e5e2726e7afe06ff330f744.boutiques",
    name="mri_convert",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriConvertOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_convert(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    converted_volume: OutputPathType
    """Converted volume output file"""


def mri_convert(
    inp_volume: InputPathType,
    out_volume: str,
    runner: Runner | None = None,
) -> MriConvertOutputs:
    """
    A general purpose utility for converting between different file formats
    supported by FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        inp_volume: The input volume file.
        out_volume: The output volume file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriConvertOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_CONVERT_METADATA)
    cargs = []
    cargs.append("mri_convert")
    cargs.append(execution.input_file(inp_volume))
    cargs.append(out_volume)
    cargs.append("[OPTIONS]")
    ret = MriConvertOutputs(
        root=execution.output_file("."),
        converted_volume=execution.output_file(out_volume),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_CONVERT_METADATA",
    "MriConvertOutputs",
    "mri_convert",
]
