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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_FSLMAT_TO_LTA_METADATA = Metadata(
    id="a584f1ce4737b11d3bc46a9cd0dac5a4276a9a35.boutiques",
    name="mri_fslmat_to_lta",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriFslmatToLtaOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_fslmat_to_lta(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_lta_file: OutputPathType
    """LTA transformation file created from the given source, target volumes and
    FSL matrix file"""


def mri_fslmat_to_lta(
    src_vol: InputPathType,
    target_vol: InputPathType,
    fslmat_file: InputPathType,
    lta_file: str,
    runner: Runner | None = None,
) -> MriFslmatToLtaOutputs:
    """
    This program creates the LTA transformation file using information from the src
    and target volumes and an FSL matrix file.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        src_vol: Source volume file.
        target_vol: Target volume file.
        fslmat_file: FSL transformation matrix file.
        lta_file: Output LTA transformation file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriFslmatToLtaOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_FSLMAT_TO_LTA_METADATA)
    cargs = []
    cargs.append("mri_fslmat_to_lta")
    cargs.append(execution.input_file(src_vol))
    cargs.append(execution.input_file(target_vol))
    cargs.append(execution.input_file(fslmat_file))
    cargs.append(lta_file)
    ret = MriFslmatToLtaOutputs(
        root=execution.output_file("."),
        output_lta_file=execution.output_file(lta_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_FSLMAT_TO_LTA_METADATA",
    "MriFslmatToLtaOutputs",
    "mri_fslmat_to_lta",
]
