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

import typing
import pathlib
from styxdefs import *
import dataclasses

LONG_CREATE_ORIG_METADATA = Metadata(
    id="90b8f21bd10e8814ce52ca803641ec5d4e3eb057.boutiques",
    name="long_create_orig",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class LongCreateOrigOutputs(typing.NamedTuple):
    """
    Output object returned when calling `long_create_orig(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_directory: OutputPathType
    """Output directory for processed time point data. Defaults to the specified
    path."""


def long_create_orig(
    base_id: str,
    tp_id: str | None = None,
    runner: Runner | None = None,
) -> LongCreateOrigOutputs:
    """
    Maps, conforms and averages (motioncorrect) raw inputs from cross-sectional
    directory to base space in Freesurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        base_id: Base ID to be utilized in the process.
        tp_id: Time point ID. If omitted, operates on all time points in base.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `LongCreateOrigOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(LONG_CREATE_ORIG_METADATA)
    cargs = []
    cargs.append("long_create_orig")
    cargs.append(base_id)
    if tp_id is not None:
        cargs.append(tp_id)
    ret = LongCreateOrigOutputs(
        root=execution.output_file("."),
        output_directory=execution.output_file("<SUBJECTS_DIR>/<base-id>/longtp/<tp-id>"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "LONG_CREATE_ORIG_METADATA",
    "LongCreateOrigOutputs",
    "long_create_orig",
]
