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

import typing
import pathlib
from styxdefs import *
import dataclasses

SPHERE_SUBJECT_METADATA = Metadata(
    id="1b01c8e4cff0b051c46d47179ad938955066fe57.boutiques",
    name="sphere_subject",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class SphereSubjectOutputs(typing.NamedTuple):
    """
    Output object returned when calling `sphere_subject(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_result: OutputPathType
    """Output of the sphere_subject execution."""


def sphere_subject(
    input_dir: str,
    output_file: str,
    license_file: str | None = "/usr/local/freesurfer/.license",
    runner: Runner | None = None,
) -> SphereSubjectOutputs:
    """
    A FreeSurfer tool for processing subject data.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_dir: Input subject directory.
        output_file: Output file for results.
        license_file: Path to FreeSurfer license file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SphereSubjectOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SPHERE_SUBJECT_METADATA)
    cargs = []
    cargs.append("sphere_subject")
    cargs.append(input_dir)
    cargs.append(output_file)
    if license_file is not None:
        cargs.append(license_file)
    ret = SphereSubjectOutputs(
        root=execution.output_file("."),
        output_result=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SPHERE_SUBJECT_METADATA",
    "SphereSubjectOutputs",
    "sphere_subject",
]
