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

import typing
import pathlib
from styxdefs import *
import dataclasses

SEGMENT_HA_T1_LONG_SH_METADATA = Metadata(
    id="e6413cb2b0b0c7d6ddbeca885e2ef04a50aea294.boutiques",
    name="segmentHA_T1_long.sh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class SegmentHaT1LongShOutputs(typing.NamedTuple):
    """
    Output object returned when calling `segment_ha_t1_long_sh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_dir: OutputPathType
    """Output directory containing segmentation results"""


def segment_ha_t1_long_sh(
    subject_dir: str,
    subject_id: str,
    runner: Runner | None = None,
) -> SegmentHaT1LongShOutputs:
    """
    A script for longitudinal segmentation of the hippocampal/amygdala regions.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject_dir: Directory containing subject data.
        subject_id: Identifier for the subject within the subject directory.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SegmentHaT1LongShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SEGMENT_HA_T1_LONG_SH_METADATA)
    cargs = []
    cargs.append("segmentHA_T1_long.sh")
    cargs.append(subject_dir)
    cargs.append(subject_id)
    ret = SegmentHaT1LongShOutputs(
        root=execution.output_file("."),
        output_dir=execution.output_file(subject_dir + "/" + subject_id + "_long_segment/output"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SEGMENT_HA_T1_LONG_SH_METADATA",
    "SegmentHaT1LongShOutputs",
    "segment_ha_t1_long_sh",
]
