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

import typing
import pathlib
from styxdefs import *
import dataclasses

SPM_T_TO_B_METADATA = Metadata(
    id="aeb4cbf77424f7a4691e003e7bad0ef280a42842.boutiques",
    name="spm_t_to_b",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class SpmTToBOutputs(typing.NamedTuple):
    """
    Output object returned when calling `spm_t_to_b(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def spm_t_to_b(
    spm_stem_format: str,
    bshort_stem: str,
    runner: Runner | None = None,
) -> SpmTToBOutputs:
    """
    Converts SPM format to Bshort format.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        spm_stem_format: Input SPM stem format.
        bshort_stem: Output bshort stem.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SpmTToBOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SPM_T_TO_B_METADATA)
    cargs = []
    cargs.append("spm_t_to_b")
    cargs.append(spm_stem_format)
    cargs.append(bshort_stem)
    ret = SpmTToBOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SPM_T_TO_B_METADATA",
    "SpmTToBOutputs",
    "spm_t_to_b",
]
