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

import typing
import pathlib
from styxdefs import *
import dataclasses

FIX_SUBJECT_CORRECTED_RH_METADATA = Metadata(
    id="52da465b947b94728415b771545cea34c0073071.boutiques",
    name="fix_subject_corrected-rh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class FixSubjectCorrectedRhOutputs(typing.NamedTuple):
    """
    Output object returned when calling `fix_subject_corrected_rh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    log_file: OutputPathType
    """Log file generated during the execution"""


def fix_subject_corrected_rh(
    subject_dir: str,
    runner: Runner | None = None,
) -> FixSubjectCorrectedRhOutputs:
    """
    A tool related to FreeSurfer subject correction.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject_dir: Path to the FreeSurfer subject directory.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FixSubjectCorrectedRhOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FIX_SUBJECT_CORRECTED_RH_METADATA)
    cargs = []
    cargs.extend([
        "-rh",
        "fix_subject_corrected" + subject_dir
    ])
    ret = FixSubjectCorrectedRhOutputs(
        root=execution.output_file("."),
        log_file=execution.output_file(subject_dir + "/scripts_output.log"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FIX_SUBJECT_CORRECTED_RH_METADATA",
    "FixSubjectCorrectedRhOutputs",
    "fix_subject_corrected_rh",
]
