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

import typing
import pathlib
from styxdefs import *
import dataclasses

LABEL_SUBJECT_METADATA = Metadata(
    id="91f9c5eb131863d4bbc7a95b5adc4b9fd63410f3.boutiques",
    name="label_subject",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class LabelSubjectOutputs(typing.NamedTuple):
    """
    Output object returned when calling `label_subject(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    converted_mnc: OutputPathType
    """Converted MNC file from the original MRI data"""


def label_subject(
    nu_file: InputPathType | None = None,
    orig_dir: str | None = "/usr/local/freesurfer/subjects",
    runner: Runner | None = None,
) -> LabelSubjectOutputs:
    """
    A tool for labeling subject MRI data in FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        nu_file: Path to the nu.mgz file. If not provided, defaults to nu.mgz.
        orig_dir: The original MRI data directory. If the nu file is not found,\
            it will search in the given directory.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `LabelSubjectOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(LABEL_SUBJECT_METADATA)
    cargs = []
    cargs.append("label_subject")
    if nu_file is not None:
        cargs.append(execution.input_file(nu_file))
    if orig_dir is not None:
        cargs.append(orig_dir)
    ret = LabelSubjectOutputs(
        root=execution.output_file("."),
        converted_mnc=execution.output_file("/tmp/nu*.mnc"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "LABEL_SUBJECT_METADATA",
    "LabelSubjectOutputs",
    "label_subject",
]
