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

import typing
import pathlib
from styxdefs import *
import dataclasses

MIST_FA_REG_METADATA = Metadata(
    id="45a9d3529b9890b437032ed4b1edac4f90d4e0ac.boutiques",
    name="mist_FA_reg",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


class MistFaRegOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mist_fa_reg(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file for the registered volume"""


def mist_fa_reg(
    fa_volume: InputPathType,
    s0_volume: InputPathType,
    reference_t1_volume: InputPathType,
    output_filename: str,
    runner: Runner | None = None,
) -> MistFaRegOutputs:
    """
    Tool for registering FA volumes to a reference T1 volume.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    Args:
        fa_volume: The FA volume to be registered.
        s0_volume: The S0 volume corresponding to the FA volume.
        reference_t1_volume: The reference T1 volume to register against.
        output_filename: The output filename for the registered volume.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MistFaRegOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MIST_FA_REG_METADATA)
    cargs = []
    cargs.append("mist_FA_reg")
    cargs.append(execution.input_file(fa_volume))
    cargs.append(execution.input_file(s0_volume))
    cargs.append(execution.input_file(reference_t1_volume))
    cargs.append(output_filename)
    ret = MistFaRegOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_filename),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MIST_FA_REG_METADATA",
    "MistFaRegOutputs",
    "mist_fa_reg",
]
