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

import typing
import pathlib
from styxdefs import *
import dataclasses

FIX_SUBJECT_RH_METADATA = Metadata(
    id="3bb32adfbfd21f826f4e479a088d3bcfcdad5042.boutiques",
    name="fix_subject-rh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def fix_subject_rh(
    input_directory: str,
    help_flag: bool = False,
    runner: Runner | None = None,
) -> FixSubjectRhOutputs:
    """
    A tool from FreeSurfer that performs operations on the right hemisphere data
    within a specified directory.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_directory: Directory where the subject's right hemisphere data is\
            located.
        help_flag: Displays help information for fix_subject-rh.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FixSubjectRhOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FIX_SUBJECT_RH_METADATA)
    cargs = []
    cargs.extend([
        "-rh",
        "fix_subject" + input_directory
    ])
    if help_flag:
        cargs.append("--help")
    ret = FixSubjectRhOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FIX_SUBJECT_RH_METADATA",
    "FixSubjectRhOutputs",
    "fix_subject_rh",
]
