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

import typing
import pathlib
from styxdefs import *
import dataclasses

PREDICT_V1_SH_METADATA = Metadata(
    id="9dad70e954292a5df8dae706ae1d13ad401174c0.boutiques",
    name="predict_v1.sh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class PredictV1ShOutputs(typing.NamedTuple):
    """
    Output object returned when calling `predict_v1_sh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def predict_v1_sh(
    subjects: list[str],
    template: str | None = None,
    inflated_surface_flag: bool = False,
    hemisphere: str | None = None,
    print_mode_flag: bool = False,
    runner: Runner | None = None,
) -> PredictV1ShOutputs:
    """
    A script for predicting brain images using registration.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subjects: Subjects for prediction.
        template: Target image for registration (exvivo or invivo [default]).
        inflated_surface_flag: Don't use inflated surface as initial\
            registration (backward compatibility).
        hemisphere: Hemisphere (rh or lh) default is both hemispheres.
        print_mode_flag: Print mode (do not run commands, just print them).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `PredictV1ShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(PREDICT_V1_SH_METADATA)
    cargs = []
    cargs.append("predict_v1.sh")
    if template is not None:
        cargs.extend([
            "-t",
            template
        ])
    if inflated_surface_flag:
        cargs.append("-i")
    if hemisphere is not None:
        cargs.extend([
            "-h",
            hemisphere
        ])
    if print_mode_flag:
        cargs.append("-p")
    cargs.append("".join(subjects) + "...")
    ret = PredictV1ShOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "PREDICT_V1_SH_METADATA",
    "PredictV1ShOutputs",
    "predict_v1_sh",
]
