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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_HIRES_REGISTER_METADATA = Metadata(
    id="e2724f458ab078f29f7dd2a2e7a3af466b56cbb8.boutiques",
    name="mri_hires_register",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriHiresRegisterOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_hires_register(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output transform file resulting from high-resolution registration"""


def mri_hires_register(
    hires_labeling: InputPathType,
    input_intensity: InputPathType,
    input_aseg: InputPathType,
    output_xform: InputPathType,
    runner: Runner | None = None,
) -> MriHiresRegisterOutputs:
    """
    A tool for high-resolution registration for Freesurfer images.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        hires_labeling: The high resolution labeling input file.
        input_intensity: The input intensity file.
        input_aseg: The input aseg file.
        output_xform: The output transform file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriHiresRegisterOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_HIRES_REGISTER_METADATA)
    cargs = []
    cargs.append("mri_hires_register")
    cargs.append(execution.input_file(hires_labeling))
    cargs.append(execution.input_file(input_intensity))
    cargs.append(execution.input_file(input_aseg))
    cargs.append(execution.input_file(output_xform))
    ret = MriHiresRegisterOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(pathlib.Path(output_xform).name),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_HIRES_REGISTER_METADATA",
    "MriHiresRegisterOutputs",
    "mri_hires_register",
]
