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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__SUMA_FSVOL_TO_BRIK_METADATA = Metadata(
    id="34a251de0c81f7f2fc2da3a56752e5c868f22a46.boutiques",
    name="@SUMA_FSvolToBRIK",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VSumaFsvolToBrikOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__suma_fsvol_to_brik(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    out_brik: OutputPathType
    """Output BRIK volume converted from FreeSurfer data"""
    out_head: OutputPathType
    """Header file for the output BRIK volume"""


def v__suma_fsvol_to_brik(
    fs_vol_data: InputPathType,
    prefix: str,
    runner: Runner | None = None,
) -> VSumaFsvolToBrikOutputs:
    """
    A script to convert COR- or .mgz files from FreeSurfer to BRIK format.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        fs_vol_data: Input FreeSurfer volume data (e.g. COR- images or .mgz\
            volume).
        prefix: Prefix for output BRIK volume.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VSumaFsvolToBrikOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__SUMA_FSVOL_TO_BRIK_METADATA)
    cargs = []
    cargs.append("@SUMA_FSvolToBRIK")
    cargs.append(execution.input_file(fs_vol_data))
    cargs.append(prefix)
    ret = VSumaFsvolToBrikOutputs(
        root=execution.output_file("."),
        out_brik=execution.output_file(prefix + ".BRIK"),
        out_head=execution.output_file(prefix + ".HEAD"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VSumaFsvolToBrikOutputs",
    "V__SUMA_FSVOL_TO_BRIK_METADATA",
    "v__suma_fsvol_to_brik",
]
