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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_CAL_RENORMALIZE_GCA_METADATA = Metadata(
    id="df0026a0e8b6f004896d4b13f1e6b7061efe9b96.boutiques",
    name="mri_cal_renormalize_gca",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriCalRenormalizeGcaOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_cal_renormalize_gca(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_atlas_file: OutputPathType
    """Renormalized output atlas"""


def mri_cal_renormalize_gca(
    timepoint_file: InputPathType,
    in_vol: InputPathType,
    input_atlas: InputPathType,
    transform_file: InputPathType,
    output_atlas: str,
    runner: Runner | None = None,
) -> MriCalRenormalizeGcaOutputs:
    """
    Tool for atlas renormalization in FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        timepoint_file: Longitudinal time point file.
        in_vol: Input volume.
        input_atlas: Input atlas.
        transform_file: Transform file.
        output_atlas: Output atlas.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriCalRenormalizeGcaOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_CAL_RENORMALIZE_GCA_METADATA)
    cargs = []
    cargs.append("mri_cal_renormalize_gca")
    cargs.append(execution.input_file(timepoint_file))
    cargs.append(execution.input_file(in_vol))
    cargs.append(execution.input_file(input_atlas))
    cargs.append(execution.input_file(transform_file))
    cargs.append(output_atlas)
    ret = MriCalRenormalizeGcaOutputs(
        root=execution.output_file("."),
        output_atlas_file=execution.output_file(output_atlas),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_CAL_RENORMALIZE_GCA_METADATA",
    "MriCalRenormalizeGcaOutputs",
    "mri_cal_renormalize_gca",
]
