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

import typing
import pathlib
from styxdefs import *
import dataclasses

IS_LTA_METADATA = Metadata(
    id="566d24838e7313b28a22f432de359c9b90571b0e.boutiques",
    name="IsLTA",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class IsLtaOutputs(typing.NamedTuple):
    """
    Output object returned when calling `is_lta(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """File containing 1 if the candidate file is an LTA, otherwise 0"""


def is_lta(
    candidate_file: InputPathType,
    outfile: str,
    runner: Runner | None = None,
) -> IsLtaOutputs:
    """
    Determines if a given file is an LTA (Linear Transform Array) file. Outputs 1 if
    true, otherwise outputs 0.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        candidate_file: Candidate file to check if it is an LTA.
        outfile: Output file to write the result.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `IsLtaOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(IS_LTA_METADATA)
    cargs = []
    cargs.append("IsLTA")
    cargs.extend([
        "--r",
        execution.input_file(candidate_file)
    ])
    cargs.extend([
        "--o",
        outfile
    ])
    ret = IsLtaOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(outfile),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "IS_LTA_METADATA",
    "IsLtaOutputs",
    "is_lta",
]
