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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_ALIGN_LONG_CSH_METADATA = Metadata(
    id="727dcf17137017559789f10344fd699c98eab6e5.boutiques",
    name="mri_align_long.csh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriAlignLongCshOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_align_long_csh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    aligned_norm: OutputPathType
    """Aligned norm volume in base space"""
    aligned_aseg: OutputPathType
    """Aligned aseg volume in base space"""


def mri_align_long_csh(
    base_id: str,
    runner: Runner | None = None,
) -> MriAlignLongCshOutputs:
    """
    Aligns all longitudinal norm and aseg files to the base space in FreeSurfer
    processing.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        base_id: Identifier for the base subject.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriAlignLongCshOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_ALIGN_LONG_CSH_METADATA)
    cargs = []
    cargs.append("mri_align_long.csh")
    cargs.append(base_id)
    ret = MriAlignLongCshOutputs(
        root=execution.output_file("."),
        aligned_norm=execution.output_file("[base_id].long.base/mri/norm-base.mgz"),
        aligned_aseg=execution.output_file("[base_id].long.base/mri/aseg.base.mgz"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_ALIGN_LONG_CSH_METADATA",
    "MriAlignLongCshOutputs",
    "mri_align_long_csh",
]
