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

import typing
import pathlib
from styxdefs import *

MRCALC_METADATA = Metadata(
    id="653dbc736bd2e23e6344aa23f92d7d2506dd4a3a.boutiques",
    name="mrcalc",
    package="mrtrix",
    container_image_tag="mrtrix3/mrtrix3:3.0.4",
)


MrcalcAbsParameters = typing.TypedDict('MrcalcAbsParameters', {
    "@type": typing.NotRequired[typing.Literal["abs"]],
})
MrcalcAbsParametersTagged = typing.TypedDict('MrcalcAbsParametersTagged', {
    "@type": typing.Literal["abs"],
})


MrcalcNegParameters = typing.TypedDict('MrcalcNegParameters', {
    "@type": typing.NotRequired[typing.Literal["neg"]],
})
MrcalcNegParametersTagged = typing.TypedDict('MrcalcNegParametersTagged', {
    "@type": typing.Literal["neg"],
})


MrcalcAddParameters = typing.TypedDict('MrcalcAddParameters', {
    "@type": typing.NotRequired[typing.Literal["add"]],
})
MrcalcAddParametersTagged = typing.TypedDict('MrcalcAddParametersTagged', {
    "@type": typing.Literal["add"],
})


MrcalcSubtractParameters = typing.TypedDict('MrcalcSubtractParameters', {
    "@type": typing.NotRequired[typing.Literal["subtract"]],
})
MrcalcSubtractParametersTagged = typing.TypedDict('MrcalcSubtractParametersTagged', {
    "@type": typing.Literal["subtract"],
})


MrcalcMultiplyParameters = typing.TypedDict('MrcalcMultiplyParameters', {
    "@type": typing.NotRequired[typing.Literal["multiply"]],
})
MrcalcMultiplyParametersTagged = typing.TypedDict('MrcalcMultiplyParametersTagged', {
    "@type": typing.Literal["multiply"],
})


MrcalcDivideParameters = typing.TypedDict('MrcalcDivideParameters', {
    "@type": typing.NotRequired[typing.Literal["divide"]],
})
MrcalcDivideParametersTagged = typing.TypedDict('MrcalcDivideParametersTagged', {
    "@type": typing.Literal["divide"],
})


MrcalcMinParameters = typing.TypedDict('MrcalcMinParameters', {
    "@type": typing.NotRequired[typing.Literal["min"]],
})
MrcalcMinParametersTagged = typing.TypedDict('MrcalcMinParametersTagged', {
    "@type": typing.Literal["min"],
})


MrcalcMaxParameters = typing.TypedDict('MrcalcMaxParameters', {
    "@type": typing.NotRequired[typing.Literal["max"]],
})
MrcalcMaxParametersTagged = typing.TypedDict('MrcalcMaxParametersTagged', {
    "@type": typing.Literal["max"],
})


MrcalcLtParameters = typing.TypedDict('MrcalcLtParameters', {
    "@type": typing.NotRequired[typing.Literal["lt"]],
})
MrcalcLtParametersTagged = typing.TypedDict('MrcalcLtParametersTagged', {
    "@type": typing.Literal["lt"],
})


MrcalcGtParameters = typing.TypedDict('MrcalcGtParameters', {
    "@type": typing.NotRequired[typing.Literal["gt"]],
})
MrcalcGtParametersTagged = typing.TypedDict('MrcalcGtParametersTagged', {
    "@type": typing.Literal["gt"],
})


MrcalcLeParameters = typing.TypedDict('MrcalcLeParameters', {
    "@type": typing.NotRequired[typing.Literal["le"]],
})
MrcalcLeParametersTagged = typing.TypedDict('MrcalcLeParametersTagged', {
    "@type": typing.Literal["le"],
})


MrcalcGeParameters = typing.TypedDict('MrcalcGeParameters', {
    "@type": typing.NotRequired[typing.Literal["ge"]],
})
MrcalcGeParametersTagged = typing.TypedDict('MrcalcGeParametersTagged', {
    "@type": typing.Literal["ge"],
})


MrcalcEqParameters = typing.TypedDict('MrcalcEqParameters', {
    "@type": typing.NotRequired[typing.Literal["eq"]],
})
MrcalcEqParametersTagged = typing.TypedDict('MrcalcEqParametersTagged', {
    "@type": typing.Literal["eq"],
})


MrcalcNeqParameters = typing.TypedDict('MrcalcNeqParameters', {
    "@type": typing.NotRequired[typing.Literal["neq"]],
})
MrcalcNeqParametersTagged = typing.TypedDict('MrcalcNeqParametersTagged', {
    "@type": typing.Literal["neq"],
})


MrcalcIfParameters = typing.TypedDict('MrcalcIfParameters', {
    "@type": typing.NotRequired[typing.Literal["if"]],
})
MrcalcIfParametersTagged = typing.TypedDict('MrcalcIfParametersTagged', {
    "@type": typing.Literal["if"],
})


MrcalcReplaceParameters = typing.TypedDict('MrcalcReplaceParameters', {
    "@type": typing.NotRequired[typing.Literal["replace"]],
})
MrcalcReplaceParametersTagged = typing.TypedDict('MrcalcReplaceParametersTagged', {
    "@type": typing.Literal["replace"],
})


MrcalcSqrtParameters = typing.TypedDict('MrcalcSqrtParameters', {
    "@type": typing.NotRequired[typing.Literal["sqrt"]],
})
MrcalcSqrtParametersTagged = typing.TypedDict('MrcalcSqrtParametersTagged', {
    "@type": typing.Literal["sqrt"],
})


MrcalcPowParameters = typing.TypedDict('MrcalcPowParameters', {
    "@type": typing.NotRequired[typing.Literal["pow"]],
})
MrcalcPowParametersTagged = typing.TypedDict('MrcalcPowParametersTagged', {
    "@type": typing.Literal["pow"],
})


MrcalcRoundParameters = typing.TypedDict('MrcalcRoundParameters', {
    "@type": typing.NotRequired[typing.Literal["round"]],
})
MrcalcRoundParametersTagged = typing.TypedDict('MrcalcRoundParametersTagged', {
    "@type": typing.Literal["round"],
})


MrcalcCeilParameters = typing.TypedDict('MrcalcCeilParameters', {
    "@type": typing.NotRequired[typing.Literal["ceil"]],
})
MrcalcCeilParametersTagged = typing.TypedDict('MrcalcCeilParametersTagged', {
    "@type": typing.Literal["ceil"],
})


MrcalcFloorParameters = typing.TypedDict('MrcalcFloorParameters', {
    "@type": typing.NotRequired[typing.Literal["floor"]],
})
MrcalcFloorParametersTagged = typing.TypedDict('MrcalcFloorParametersTagged', {
    "@type": typing.Literal["floor"],
})


MrcalcNotParameters = typing.TypedDict('MrcalcNotParameters', {
    "@type": typing.NotRequired[typing.Literal["not"]],
})
MrcalcNotParametersTagged = typing.TypedDict('MrcalcNotParametersTagged', {
    "@type": typing.Literal["not"],
})


MrcalcAndParameters = typing.TypedDict('MrcalcAndParameters', {
    "@type": typing.NotRequired[typing.Literal["and"]],
})
MrcalcAndParametersTagged = typing.TypedDict('MrcalcAndParametersTagged', {
    "@type": typing.Literal["and"],
})


MrcalcOrParameters = typing.TypedDict('MrcalcOrParameters', {
    "@type": typing.NotRequired[typing.Literal["or"]],
})
MrcalcOrParametersTagged = typing.TypedDict('MrcalcOrParametersTagged', {
    "@type": typing.Literal["or"],
})


MrcalcXorParameters = typing.TypedDict('MrcalcXorParameters', {
    "@type": typing.NotRequired[typing.Literal["xor"]],
})
MrcalcXorParametersTagged = typing.TypedDict('MrcalcXorParametersTagged', {
    "@type": typing.Literal["xor"],
})


MrcalcIsnanParameters = typing.TypedDict('MrcalcIsnanParameters', {
    "@type": typing.NotRequired[typing.Literal["isnan"]],
})
MrcalcIsnanParametersTagged = typing.TypedDict('MrcalcIsnanParametersTagged', {
    "@type": typing.Literal["isnan"],
})


MrcalcIsinfParameters = typing.TypedDict('MrcalcIsinfParameters', {
    "@type": typing.NotRequired[typing.Literal["isinf"]],
})
MrcalcIsinfParametersTagged = typing.TypedDict('MrcalcIsinfParametersTagged', {
    "@type": typing.Literal["isinf"],
})


MrcalcFiniteParameters = typing.TypedDict('MrcalcFiniteParameters', {
    "@type": typing.NotRequired[typing.Literal["finite"]],
})
MrcalcFiniteParametersTagged = typing.TypedDict('MrcalcFiniteParametersTagged', {
    "@type": typing.Literal["finite"],
})


MrcalcComplexParameters = typing.TypedDict('MrcalcComplexParameters', {
    "@type": typing.NotRequired[typing.Literal["complex"]],
})
MrcalcComplexParametersTagged = typing.TypedDict('MrcalcComplexParametersTagged', {
    "@type": typing.Literal["complex"],
})


MrcalcPolarParameters = typing.TypedDict('MrcalcPolarParameters', {
    "@type": typing.NotRequired[typing.Literal["polar"]],
})
MrcalcPolarParametersTagged = typing.TypedDict('MrcalcPolarParametersTagged', {
    "@type": typing.Literal["polar"],
})


MrcalcRealParameters = typing.TypedDict('MrcalcRealParameters', {
    "@type": typing.NotRequired[typing.Literal["real"]],
})
MrcalcRealParametersTagged = typing.TypedDict('MrcalcRealParametersTagged', {
    "@type": typing.Literal["real"],
})


MrcalcImagParameters = typing.TypedDict('MrcalcImagParameters', {
    "@type": typing.NotRequired[typing.Literal["imag"]],
})
MrcalcImagParametersTagged = typing.TypedDict('MrcalcImagParametersTagged', {
    "@type": typing.Literal["imag"],
})


MrcalcPhaseParameters = typing.TypedDict('MrcalcPhaseParameters', {
    "@type": typing.NotRequired[typing.Literal["phase"]],
})
MrcalcPhaseParametersTagged = typing.TypedDict('MrcalcPhaseParametersTagged', {
    "@type": typing.Literal["phase"],
})


MrcalcConjParameters = typing.TypedDict('MrcalcConjParameters', {
    "@type": typing.NotRequired[typing.Literal["conj"]],
})
MrcalcConjParametersTagged = typing.TypedDict('MrcalcConjParametersTagged', {
    "@type": typing.Literal["conj"],
})


MrcalcProjParameters = typing.TypedDict('MrcalcProjParameters', {
    "@type": typing.NotRequired[typing.Literal["proj"]],
})
MrcalcProjParametersTagged = typing.TypedDict('MrcalcProjParametersTagged', {
    "@type": typing.Literal["proj"],
})


MrcalcExpParameters = typing.TypedDict('MrcalcExpParameters', {
    "@type": typing.NotRequired[typing.Literal["exp"]],
})
MrcalcExpParametersTagged = typing.TypedDict('MrcalcExpParametersTagged', {
    "@type": typing.Literal["exp"],
})


MrcalcLogParameters = typing.TypedDict('MrcalcLogParameters', {
    "@type": typing.NotRequired[typing.Literal["log"]],
})
MrcalcLogParametersTagged = typing.TypedDict('MrcalcLogParametersTagged', {
    "@type": typing.Literal["log"],
})


MrcalcLog10Parameters = typing.TypedDict('MrcalcLog10Parameters', {
    "@type": typing.NotRequired[typing.Literal["log10"]],
})
MrcalcLog10ParametersTagged = typing.TypedDict('MrcalcLog10ParametersTagged', {
    "@type": typing.Literal["log10"],
})


MrcalcCosParameters = typing.TypedDict('MrcalcCosParameters', {
    "@type": typing.NotRequired[typing.Literal["cos"]],
})
MrcalcCosParametersTagged = typing.TypedDict('MrcalcCosParametersTagged', {
    "@type": typing.Literal["cos"],
})


MrcalcSinParameters = typing.TypedDict('MrcalcSinParameters', {
    "@type": typing.NotRequired[typing.Literal["sin"]],
})
MrcalcSinParametersTagged = typing.TypedDict('MrcalcSinParametersTagged', {
    "@type": typing.Literal["sin"],
})


MrcalcTanParameters = typing.TypedDict('MrcalcTanParameters', {
    "@type": typing.NotRequired[typing.Literal["tan"]],
})
MrcalcTanParametersTagged = typing.TypedDict('MrcalcTanParametersTagged', {
    "@type": typing.Literal["tan"],
})


MrcalcAcosParameters = typing.TypedDict('MrcalcAcosParameters', {
    "@type": typing.NotRequired[typing.Literal["acos"]],
})
MrcalcAcosParametersTagged = typing.TypedDict('MrcalcAcosParametersTagged', {
    "@type": typing.Literal["acos"],
})


MrcalcAsinParameters = typing.TypedDict('MrcalcAsinParameters', {
    "@type": typing.NotRequired[typing.Literal["asin"]],
})
MrcalcAsinParametersTagged = typing.TypedDict('MrcalcAsinParametersTagged', {
    "@type": typing.Literal["asin"],
})


MrcalcAtanParameters = typing.TypedDict('MrcalcAtanParameters', {
    "@type": typing.NotRequired[typing.Literal["atan"]],
})
MrcalcAtanParametersTagged = typing.TypedDict('MrcalcAtanParametersTagged', {
    "@type": typing.Literal["atan"],
})


MrcalcCoshParameters = typing.TypedDict('MrcalcCoshParameters', {
    "@type": typing.NotRequired[typing.Literal["cosh"]],
})
MrcalcCoshParametersTagged = typing.TypedDict('MrcalcCoshParametersTagged', {
    "@type": typing.Literal["cosh"],
})


MrcalcSinhParameters = typing.TypedDict('MrcalcSinhParameters', {
    "@type": typing.NotRequired[typing.Literal["sinh"]],
})
MrcalcSinhParametersTagged = typing.TypedDict('MrcalcSinhParametersTagged', {
    "@type": typing.Literal["sinh"],
})


MrcalcTanhParameters = typing.TypedDict('MrcalcTanhParameters', {
    "@type": typing.NotRequired[typing.Literal["tanh"]],
})
MrcalcTanhParametersTagged = typing.TypedDict('MrcalcTanhParametersTagged', {
    "@type": typing.Literal["tanh"],
})


MrcalcAcoshParameters = typing.TypedDict('MrcalcAcoshParameters', {
    "@type": typing.NotRequired[typing.Literal["acosh"]],
})
MrcalcAcoshParametersTagged = typing.TypedDict('MrcalcAcoshParametersTagged', {
    "@type": typing.Literal["acosh"],
})


MrcalcAsinhParameters = typing.TypedDict('MrcalcAsinhParameters', {
    "@type": typing.NotRequired[typing.Literal["asinh"]],
})
MrcalcAsinhParametersTagged = typing.TypedDict('MrcalcAsinhParametersTagged', {
    "@type": typing.Literal["asinh"],
})


MrcalcAtanhParameters = typing.TypedDict('MrcalcAtanhParameters', {
    "@type": typing.NotRequired[typing.Literal["atanh"]],
})
MrcalcAtanhParametersTagged = typing.TypedDict('MrcalcAtanhParametersTagged', {
    "@type": typing.Literal["atanh"],
})


MrcalcConfigParameters = typing.TypedDict('MrcalcConfigParameters', {
    "@type": typing.NotRequired[typing.Literal["config"]],
    "key": str,
    "value": str,
})
MrcalcConfigParametersTagged = typing.TypedDict('MrcalcConfigParametersTagged', {
    "@type": typing.Literal["config"],
    "key": str,
    "value": str,
})


MrcalcVariousStringParameters = typing.TypedDict('MrcalcVariousStringParameters', {
    "@type": typing.NotRequired[typing.Literal["VariousString"]],
    "obj": str,
})
MrcalcVariousStringParametersTagged = typing.TypedDict('MrcalcVariousStringParametersTagged', {
    "@type": typing.Literal["VariousString"],
    "obj": str,
})


MrcalcVariousFileParameters = typing.TypedDict('MrcalcVariousFileParameters', {
    "@type": typing.NotRequired[typing.Literal["VariousFile"]],
    "obj": InputPathType,
})
MrcalcVariousFileParametersTagged = typing.TypedDict('MrcalcVariousFileParametersTagged', {
    "@type": typing.Literal["VariousFile"],
    "obj": InputPathType,
})


MrcalcParameters = typing.TypedDict('MrcalcParameters', {
    "@type": typing.NotRequired[typing.Literal["mrtrix/mrcalc"]],
    "abs": typing.NotRequired[list[MrcalcAbsParameters] | None],
    "neg": typing.NotRequired[list[MrcalcNegParameters] | None],
    "add": typing.NotRequired[list[MrcalcAddParameters] | None],
    "subtract": typing.NotRequired[list[MrcalcSubtractParameters] | None],
    "multiply": typing.NotRequired[list[MrcalcMultiplyParameters] | None],
    "divide": typing.NotRequired[list[MrcalcDivideParameters] | None],
    "min": typing.NotRequired[list[MrcalcMinParameters] | None],
    "max": typing.NotRequired[list[MrcalcMaxParameters] | None],
    "lt": typing.NotRequired[list[MrcalcLtParameters] | None],
    "gt": typing.NotRequired[list[MrcalcGtParameters] | None],
    "le": typing.NotRequired[list[MrcalcLeParameters] | None],
    "ge": typing.NotRequired[list[MrcalcGeParameters] | None],
    "eq": typing.NotRequired[list[MrcalcEqParameters] | None],
    "neq": typing.NotRequired[list[MrcalcNeqParameters] | None],
    "if": typing.NotRequired[list[MrcalcIfParameters] | None],
    "replace": typing.NotRequired[list[MrcalcReplaceParameters] | None],
    "sqrt": typing.NotRequired[list[MrcalcSqrtParameters] | None],
    "pow": typing.NotRequired[list[MrcalcPowParameters] | None],
    "round": typing.NotRequired[list[MrcalcRoundParameters] | None],
    "ceil": typing.NotRequired[list[MrcalcCeilParameters] | None],
    "floor": typing.NotRequired[list[MrcalcFloorParameters] | None],
    "not": typing.NotRequired[list[MrcalcNotParameters] | None],
    "and": typing.NotRequired[list[MrcalcAndParameters] | None],
    "or": typing.NotRequired[list[MrcalcOrParameters] | None],
    "xor": typing.NotRequired[list[MrcalcXorParameters] | None],
    "isnan": typing.NotRequired[list[MrcalcIsnanParameters] | None],
    "isinf": typing.NotRequired[list[MrcalcIsinfParameters] | None],
    "finite": typing.NotRequired[list[MrcalcFiniteParameters] | None],
    "complex": typing.NotRequired[list[MrcalcComplexParameters] | None],
    "polar": typing.NotRequired[list[MrcalcPolarParameters] | None],
    "real": typing.NotRequired[list[MrcalcRealParameters] | None],
    "imag": typing.NotRequired[list[MrcalcImagParameters] | None],
    "phase": typing.NotRequired[list[MrcalcPhaseParameters] | None],
    "conj": typing.NotRequired[list[MrcalcConjParameters] | None],
    "proj": typing.NotRequired[list[MrcalcProjParameters] | None],
    "exp": typing.NotRequired[list[MrcalcExpParameters] | None],
    "log": typing.NotRequired[list[MrcalcLogParameters] | None],
    "log10": typing.NotRequired[list[MrcalcLog10Parameters] | None],
    "cos": typing.NotRequired[list[MrcalcCosParameters] | None],
    "sin": typing.NotRequired[list[MrcalcSinParameters] | None],
    "tan": typing.NotRequired[list[MrcalcTanParameters] | None],
    "acos": typing.NotRequired[list[MrcalcAcosParameters] | None],
    "asin": typing.NotRequired[list[MrcalcAsinParameters] | None],
    "atan": typing.NotRequired[list[MrcalcAtanParameters] | None],
    "cosh": typing.NotRequired[list[MrcalcCoshParameters] | None],
    "sinh": typing.NotRequired[list[MrcalcSinhParameters] | None],
    "tanh": typing.NotRequired[list[MrcalcTanhParameters] | None],
    "acosh": typing.NotRequired[list[MrcalcAcoshParameters] | None],
    "asinh": typing.NotRequired[list[MrcalcAsinhParameters] | None],
    "atanh": typing.NotRequired[list[MrcalcAtanhParameters] | None],
    "datatype": typing.NotRequired[str | None],
    "info": bool,
    "quiet": bool,
    "debug": bool,
    "force": bool,
    "nthreads": typing.NotRequired[int | None],
    "config": typing.NotRequired[list[MrcalcConfigParameters] | None],
    "help": bool,
    "version": bool,
    "operand": list[typing.Union[MrcalcVariousStringParametersTagged, MrcalcVariousFileParametersTagged]],
})
MrcalcParametersTagged = typing.TypedDict('MrcalcParametersTagged', {
    "@type": typing.Literal["mrtrix/mrcalc"],
    "abs": typing.NotRequired[list[MrcalcAbsParameters] | None],
    "neg": typing.NotRequired[list[MrcalcNegParameters] | None],
    "add": typing.NotRequired[list[MrcalcAddParameters] | None],
    "subtract": typing.NotRequired[list[MrcalcSubtractParameters] | None],
    "multiply": typing.NotRequired[list[MrcalcMultiplyParameters] | None],
    "divide": typing.NotRequired[list[MrcalcDivideParameters] | None],
    "min": typing.NotRequired[list[MrcalcMinParameters] | None],
    "max": typing.NotRequired[list[MrcalcMaxParameters] | None],
    "lt": typing.NotRequired[list[MrcalcLtParameters] | None],
    "gt": typing.NotRequired[list[MrcalcGtParameters] | None],
    "le": typing.NotRequired[list[MrcalcLeParameters] | None],
    "ge": typing.NotRequired[list[MrcalcGeParameters] | None],
    "eq": typing.NotRequired[list[MrcalcEqParameters] | None],
    "neq": typing.NotRequired[list[MrcalcNeqParameters] | None],
    "if": typing.NotRequired[list[MrcalcIfParameters] | None],
    "replace": typing.NotRequired[list[MrcalcReplaceParameters] | None],
    "sqrt": typing.NotRequired[list[MrcalcSqrtParameters] | None],
    "pow": typing.NotRequired[list[MrcalcPowParameters] | None],
    "round": typing.NotRequired[list[MrcalcRoundParameters] | None],
    "ceil": typing.NotRequired[list[MrcalcCeilParameters] | None],
    "floor": typing.NotRequired[list[MrcalcFloorParameters] | None],
    "not": typing.NotRequired[list[MrcalcNotParameters] | None],
    "and": typing.NotRequired[list[MrcalcAndParameters] | None],
    "or": typing.NotRequired[list[MrcalcOrParameters] | None],
    "xor": typing.NotRequired[list[MrcalcXorParameters] | None],
    "isnan": typing.NotRequired[list[MrcalcIsnanParameters] | None],
    "isinf": typing.NotRequired[list[MrcalcIsinfParameters] | None],
    "finite": typing.NotRequired[list[MrcalcFiniteParameters] | None],
    "complex": typing.NotRequired[list[MrcalcComplexParameters] | None],
    "polar": typing.NotRequired[list[MrcalcPolarParameters] | None],
    "real": typing.NotRequired[list[MrcalcRealParameters] | None],
    "imag": typing.NotRequired[list[MrcalcImagParameters] | None],
    "phase": typing.NotRequired[list[MrcalcPhaseParameters] | None],
    "conj": typing.NotRequired[list[MrcalcConjParameters] | None],
    "proj": typing.NotRequired[list[MrcalcProjParameters] | None],
    "exp": typing.NotRequired[list[MrcalcExpParameters] | None],
    "log": typing.NotRequired[list[MrcalcLogParameters] | None],
    "log10": typing.NotRequired[list[MrcalcLog10Parameters] | None],
    "cos": typing.NotRequired[list[MrcalcCosParameters] | None],
    "sin": typing.NotRequired[list[MrcalcSinParameters] | None],
    "tan": typing.NotRequired[list[MrcalcTanParameters] | None],
    "acos": typing.NotRequired[list[MrcalcAcosParameters] | None],
    "asin": typing.NotRequired[list[MrcalcAsinParameters] | None],
    "atan": typing.NotRequired[list[MrcalcAtanParameters] | None],
    "cosh": typing.NotRequired[list[MrcalcCoshParameters] | None],
    "sinh": typing.NotRequired[list[MrcalcSinhParameters] | None],
    "tanh": typing.NotRequired[list[MrcalcTanhParameters] | None],
    "acosh": typing.NotRequired[list[MrcalcAcoshParameters] | None],
    "asinh": typing.NotRequired[list[MrcalcAsinhParameters] | None],
    "atanh": typing.NotRequired[list[MrcalcAtanhParameters] | None],
    "datatype": typing.NotRequired[str | None],
    "info": bool,
    "quiet": bool,
    "debug": bool,
    "force": bool,
    "nthreads": typing.NotRequired[int | None],
    "config": typing.NotRequired[list[MrcalcConfigParameters] | None],
    "help": bool,
    "version": bool,
    "operand": list[typing.Union[MrcalcVariousStringParametersTagged, MrcalcVariousFileParametersTagged]],
})


def mrcalc_operand_cargs_dyn_fn(
    t: str,
) -> typing.Any:
    """
    Get build cargs function by command type.
    
    Args:
        t: Command type.
    Returns:
        Build cargs function.
    """
    return {
        "VariousString": mrcalc_various_string_cargs,
        "VariousFile": mrcalc_various_file_cargs,
    }.get(t)


def mrcalc_operand_outputs_dyn_fn(
    t: str,
) -> typing.Any:
    """
    Get build outputs function by command type.
    
    Args:
        t: Command type.
    Returns:
        Build outputs function.
    """
    return {
    }.get(t)


def mrcalc_abs_params(
) -> MrcalcAbsParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "abs",
    }
    return params


def mrcalc_abs_cargs(
    params: MrcalcAbsParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-abs")
    return cargs


def mrcalc_neg_params(
) -> MrcalcNegParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "neg",
    }
    return params


def mrcalc_neg_cargs(
    params: MrcalcNegParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-neg")
    return cargs


def mrcalc_add_params(
) -> MrcalcAddParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "add",
    }
    return params


def mrcalc_add_cargs(
    params: MrcalcAddParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-add")
    return cargs


def mrcalc_subtract_params(
) -> MrcalcSubtractParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "subtract",
    }
    return params


def mrcalc_subtract_cargs(
    params: MrcalcSubtractParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-subtract")
    return cargs


def mrcalc_multiply_params(
) -> MrcalcMultiplyParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "multiply",
    }
    return params


def mrcalc_multiply_cargs(
    params: MrcalcMultiplyParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-multiply")
    return cargs


def mrcalc_divide_params(
) -> MrcalcDivideParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "divide",
    }
    return params


def mrcalc_divide_cargs(
    params: MrcalcDivideParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-divide")
    return cargs


def mrcalc_min_params(
) -> MrcalcMinParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "min",
    }
    return params


def mrcalc_min_cargs(
    params: MrcalcMinParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-min")
    return cargs


def mrcalc_max_params(
) -> MrcalcMaxParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "max",
    }
    return params


def mrcalc_max_cargs(
    params: MrcalcMaxParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-max")
    return cargs


def mrcalc_lt_params(
) -> MrcalcLtParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "lt",
    }
    return params


def mrcalc_lt_cargs(
    params: MrcalcLtParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-lt")
    return cargs


def mrcalc_gt_params(
) -> MrcalcGtParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "gt",
    }
    return params


def mrcalc_gt_cargs(
    params: MrcalcGtParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-gt")
    return cargs


def mrcalc_le_params(
) -> MrcalcLeParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "le",
    }
    return params


def mrcalc_le_cargs(
    params: MrcalcLeParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-le")
    return cargs


def mrcalc_ge_params(
) -> MrcalcGeParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "ge",
    }
    return params


def mrcalc_ge_cargs(
    params: MrcalcGeParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-ge")
    return cargs


def mrcalc_eq_params(
) -> MrcalcEqParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "eq",
    }
    return params


def mrcalc_eq_cargs(
    params: MrcalcEqParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-eq")
    return cargs


def mrcalc_neq_params(
) -> MrcalcNeqParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "neq",
    }
    return params


def mrcalc_neq_cargs(
    params: MrcalcNeqParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-neq")
    return cargs


def mrcalc_if_params(
) -> MrcalcIfParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "if",
    }
    return params


def mrcalc_if_cargs(
    params: MrcalcIfParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-if")
    return cargs


def mrcalc_replace_params(
) -> MrcalcReplaceParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "replace",
    }
    return params


def mrcalc_replace_cargs(
    params: MrcalcReplaceParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-replace")
    return cargs


def mrcalc_sqrt_params(
) -> MrcalcSqrtParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "sqrt",
    }
    return params


def mrcalc_sqrt_cargs(
    params: MrcalcSqrtParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-sqrt")
    return cargs


def mrcalc_pow_params(
) -> MrcalcPowParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "pow",
    }
    return params


def mrcalc_pow_cargs(
    params: MrcalcPowParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-pow")
    return cargs


def mrcalc_round_params(
) -> MrcalcRoundParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "round",
    }
    return params


def mrcalc_round_cargs(
    params: MrcalcRoundParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-round")
    return cargs


def mrcalc_ceil_params(
) -> MrcalcCeilParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "ceil",
    }
    return params


def mrcalc_ceil_cargs(
    params: MrcalcCeilParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-ceil")
    return cargs


def mrcalc_floor_params(
) -> MrcalcFloorParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "floor",
    }
    return params


def mrcalc_floor_cargs(
    params: MrcalcFloorParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-floor")
    return cargs


def mrcalc_not_params(
) -> MrcalcNotParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "not",
    }
    return params


def mrcalc_not_cargs(
    params: MrcalcNotParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-not")
    return cargs


def mrcalc_and_params(
) -> MrcalcAndParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "and",
    }
    return params


def mrcalc_and_cargs(
    params: MrcalcAndParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-and")
    return cargs


def mrcalc_or_params(
) -> MrcalcOrParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "or",
    }
    return params


def mrcalc_or_cargs(
    params: MrcalcOrParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-or")
    return cargs


def mrcalc_xor_params(
) -> MrcalcXorParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "xor",
    }
    return params


def mrcalc_xor_cargs(
    params: MrcalcXorParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-xor")
    return cargs


def mrcalc_isnan_params(
) -> MrcalcIsnanParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "isnan",
    }
    return params


def mrcalc_isnan_cargs(
    params: MrcalcIsnanParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-isnan")
    return cargs


def mrcalc_isinf_params(
) -> MrcalcIsinfParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "isinf",
    }
    return params


def mrcalc_isinf_cargs(
    params: MrcalcIsinfParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-isinf")
    return cargs


def mrcalc_finite_params(
) -> MrcalcFiniteParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "finite",
    }
    return params


def mrcalc_finite_cargs(
    params: MrcalcFiniteParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-finite")
    return cargs


def mrcalc_complex_params(
) -> MrcalcComplexParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "complex",
    }
    return params


def mrcalc_complex_cargs(
    params: MrcalcComplexParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-complex")
    return cargs


def mrcalc_polar_params(
) -> MrcalcPolarParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "polar",
    }
    return params


def mrcalc_polar_cargs(
    params: MrcalcPolarParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-polar")
    return cargs


def mrcalc_real_params(
) -> MrcalcRealParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "real",
    }
    return params


def mrcalc_real_cargs(
    params: MrcalcRealParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-real")
    return cargs


def mrcalc_imag_params(
) -> MrcalcImagParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "imag",
    }
    return params


def mrcalc_imag_cargs(
    params: MrcalcImagParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-imag")
    return cargs


def mrcalc_phase_params(
) -> MrcalcPhaseParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "phase",
    }
    return params


def mrcalc_phase_cargs(
    params: MrcalcPhaseParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-phase")
    return cargs


def mrcalc_conj_params(
) -> MrcalcConjParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "conj",
    }
    return params


def mrcalc_conj_cargs(
    params: MrcalcConjParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-conj")
    return cargs


def mrcalc_proj_params(
) -> MrcalcProjParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "proj",
    }
    return params


def mrcalc_proj_cargs(
    params: MrcalcProjParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-proj")
    return cargs


def mrcalc_exp_params(
) -> MrcalcExpParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "exp",
    }
    return params


def mrcalc_exp_cargs(
    params: MrcalcExpParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-exp")
    return cargs


def mrcalc_log_params(
) -> MrcalcLogParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "log",
    }
    return params


def mrcalc_log_cargs(
    params: MrcalcLogParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-log")
    return cargs


def mrcalc_log10_params(
) -> MrcalcLog10ParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "log10",
    }
    return params


def mrcalc_log10_cargs(
    params: MrcalcLog10Parameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-log10")
    return cargs


def mrcalc_cos_params(
) -> MrcalcCosParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "cos",
    }
    return params


def mrcalc_cos_cargs(
    params: MrcalcCosParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-cos")
    return cargs


def mrcalc_sin_params(
) -> MrcalcSinParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "sin",
    }
    return params


def mrcalc_sin_cargs(
    params: MrcalcSinParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-sin")
    return cargs


def mrcalc_tan_params(
) -> MrcalcTanParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "tan",
    }
    return params


def mrcalc_tan_cargs(
    params: MrcalcTanParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-tan")
    return cargs


def mrcalc_acos_params(
) -> MrcalcAcosParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "acos",
    }
    return params


def mrcalc_acos_cargs(
    params: MrcalcAcosParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-acos")
    return cargs


def mrcalc_asin_params(
) -> MrcalcAsinParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "asin",
    }
    return params


def mrcalc_asin_cargs(
    params: MrcalcAsinParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-asin")
    return cargs


def mrcalc_atan_params(
) -> MrcalcAtanParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "atan",
    }
    return params


def mrcalc_atan_cargs(
    params: MrcalcAtanParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-atan")
    return cargs


def mrcalc_cosh_params(
) -> MrcalcCoshParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "cosh",
    }
    return params


def mrcalc_cosh_cargs(
    params: MrcalcCoshParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-cosh")
    return cargs


def mrcalc_sinh_params(
) -> MrcalcSinhParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "sinh",
    }
    return params


def mrcalc_sinh_cargs(
    params: MrcalcSinhParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-sinh")
    return cargs


def mrcalc_tanh_params(
) -> MrcalcTanhParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "tanh",
    }
    return params


def mrcalc_tanh_cargs(
    params: MrcalcTanhParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-tanh")
    return cargs


def mrcalc_acosh_params(
) -> MrcalcAcoshParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "acosh",
    }
    return params


def mrcalc_acosh_cargs(
    params: MrcalcAcoshParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-acosh")
    return cargs


def mrcalc_asinh_params(
) -> MrcalcAsinhParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "asinh",
    }
    return params


def mrcalc_asinh_cargs(
    params: MrcalcAsinhParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-asinh")
    return cargs


def mrcalc_atanh_params(
) -> MrcalcAtanhParametersTagged:
    """
    Build parameters.
    
    Args:
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "atanh",
    }
    return params


def mrcalc_atanh_cargs(
    params: MrcalcAtanhParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-atanh")
    return cargs


def mrcalc_config_params(
    key: str,
    value: str,
) -> MrcalcConfigParametersTagged:
    """
    Build parameters.
    
    Args:
        key: temporarily set the value of an MRtrix config file entry.
        value: temporarily set the value of an MRtrix config file entry.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "config",
        "key": key,
        "value": value,
    }
    return params


def mrcalc_config_cargs(
    params: MrcalcConfigParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("-config")
    cargs.append(params.get("key", None))
    cargs.append(params.get("value", None))
    return cargs


def mrcalc_various_string_params(
    obj: str,
) -> MrcalcVariousStringParametersTagged:
    """
    Build parameters.
    
    Args:
        obj: String object.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "VariousString",
        "obj": obj,
    }
    return params


def mrcalc_various_string_cargs(
    params: MrcalcVariousStringParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append(params.get("obj", None))
    return cargs


def mrcalc_various_file_params(
    obj: InputPathType,
) -> MrcalcVariousFileParametersTagged:
    """
    Build parameters.
    
    Args:
        obj: File object.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "VariousFile",
        "obj": obj,
    }
    return params


def mrcalc_various_file_cargs(
    params: MrcalcVariousFileParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append(execution.input_file(params.get("obj", None)))
    return cargs


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


def mrcalc_params(
    operand: list[typing.Union[MrcalcVariousStringParametersTagged, MrcalcVariousFileParametersTagged]],
    abs_: list[MrcalcAbsParameters] | None = None,
    neg: list[MrcalcNegParameters] | None = None,
    add: list[MrcalcAddParameters] | None = None,
    subtract: list[MrcalcSubtractParameters] | None = None,
    multiply: list[MrcalcMultiplyParameters] | None = None,
    divide: list[MrcalcDivideParameters] | None = None,
    min_: list[MrcalcMinParameters] | None = None,
    max_: list[MrcalcMaxParameters] | None = None,
    lt: list[MrcalcLtParameters] | None = None,
    gt: list[MrcalcGtParameters] | None = None,
    le: list[MrcalcLeParameters] | None = None,
    ge: list[MrcalcGeParameters] | None = None,
    eq: list[MrcalcEqParameters] | None = None,
    neq: list[MrcalcNeqParameters] | None = None,
    if_: list[MrcalcIfParameters] | None = None,
    replace: list[MrcalcReplaceParameters] | None = None,
    sqrt: list[MrcalcSqrtParameters] | None = None,
    pow_: list[MrcalcPowParameters] | None = None,
    round_: list[MrcalcRoundParameters] | None = None,
    ceil: list[MrcalcCeilParameters] | None = None,
    floor: list[MrcalcFloorParameters] | None = None,
    not_: list[MrcalcNotParameters] | None = None,
    and_: list[MrcalcAndParameters] | None = None,
    or_: list[MrcalcOrParameters] | None = None,
    xor: list[MrcalcXorParameters] | None = None,
    isnan: list[MrcalcIsnanParameters] | None = None,
    isinf: list[MrcalcIsinfParameters] | None = None,
    finite: list[MrcalcFiniteParameters] | None = None,
    complex_: list[MrcalcComplexParameters] | None = None,
    polar: list[MrcalcPolarParameters] | None = None,
    real: list[MrcalcRealParameters] | None = None,
    imag: list[MrcalcImagParameters] | None = None,
    phase: list[MrcalcPhaseParameters] | None = None,
    conj: list[MrcalcConjParameters] | None = None,
    proj: list[MrcalcProjParameters] | None = None,
    exp: list[MrcalcExpParameters] | None = None,
    log: list[MrcalcLogParameters] | None = None,
    log10: list[MrcalcLog10Parameters] | None = None,
    cos: list[MrcalcCosParameters] | None = None,
    sin: list[MrcalcSinParameters] | None = None,
    tan: list[MrcalcTanParameters] | None = None,
    acos: list[MrcalcAcosParameters] | None = None,
    asin: list[MrcalcAsinParameters] | None = None,
    atan: list[MrcalcAtanParameters] | None = None,
    cosh: list[MrcalcCoshParameters] | None = None,
    sinh: list[MrcalcSinhParameters] | None = None,
    tanh: list[MrcalcTanhParameters] | None = None,
    acosh: list[MrcalcAcoshParameters] | None = None,
    asinh: list[MrcalcAsinhParameters] | None = None,
    atanh: list[MrcalcAtanhParameters] | None = None,
    datatype: str | None = None,
    info: bool = False,
    quiet: bool = False,
    debug: bool = False,
    force: bool = False,
    nthreads: int | None = None,
    config: list[MrcalcConfigParameters] | None = None,
    help_: bool = False,
    version: bool = False,
) -> MrcalcParametersTagged:
    """
    Build parameters.
    
    Args:
        operand: an input image, intensity value, or the special keywords\
            'rand' (random number between 0 and 1) or 'randn' (random number from\
            unit std.dev. normal distribution) or the mathematical constants 'e'\
            and 'pi'.
        abs_: |%1| : return absolute value (magnitude) of real or complex\
            number.
        neg: -%1 : negative value.
        add: (%1 + %2) : add values.
        subtract: (%1 - %2) : subtract nth operand from (n-1)th.
        multiply: (%1 * %2) : multiply values.
        divide: (%1 / %2) : divide (n-1)th operand by nth.
        min_: min (%1, %2) : smallest of last two operands.
        max_: max (%1, %2) : greatest of last two operands.
        lt: (%1 < %2) : less-than operator (true=1, false=0).
        gt: (%1 > %2) : greater-than operator (true=1, false=0).
        le: (%1 <= %2) : less-than-or-equal-to operator (true=1, false=0).
        ge: (%1 >= %2) : greater-than-or-equal-to operator (true=1, false=0).
        eq: (%1 == %2) : equal-to operator (true=1, false=0).
        neq: (%1 != %2) : not-equal-to operator (true=1, false=0).
        if_: (%1 ? %2 : %3) : if first operand is true (non-zero), return\
            second operand, otherwise return third operand.
        replace: (%1, %2 -> %3) : Wherever first operand is equal to the second\
            operand, replace with third operand.
        sqrt: sqrt (%1) : square root.
        pow_: %1^%2 : raise (n-1)th operand to nth power.
        round_: round (%1) : round to nearest integer.
        ceil: ceil (%1) : round up to nearest integer.
        floor: floor (%1) : round down to nearest integer.
        not_: !%1 : NOT operator: true (1) if operand is false (i.e. zero).
        and_: (%1 && %2) : AND operator: true (1) if both operands are true\
            (i.e. non-zero).
        or_: (%1 || %2) : OR operator: true (1) if either operand is true (i.e.\
            non-zero).
        xor: (%1 ^^ %2) : XOR operator: true (1) if only one of the operands is\
            true (i.e. non-zero).
        isnan: isnan (%1) : true (1) if operand is not-a-number (NaN).
        isinf: isinf (%1) : true (1) if operand is infinite (Inf).
        finite: finite (%1) : true (1) if operand is finite (i.e. not NaN or\
            Inf).
        complex_: (%1 + %2 i) : create complex number using the last two\
            operands as real,imaginary components.
        polar: (%1 /_ %2) : create complex number using the last two operands\
            as magnitude,phase components (phase in radians).
        real: real (%1) : real part of complex number.
        imag: imag (%1) : imaginary part of complex number.
        phase: phase (%1) : phase of complex number (use -abs for magnitude).
        conj: conj (%1) : complex conjugate.
        proj: proj (%1) : projection onto the Riemann sphere.
        exp: exp (%1) : exponential function.
        log: log (%1) : natural logarithm.
        log10: log10 (%1) : common logarithm.
        cos: cos (%1) : cosine.
        sin: sin (%1) : sine.
        tan: tan (%1) : tangent.
        acos: acos (%1) : inverse cosine.
        asin: asin (%1) : inverse sine.
        atan: atan (%1) : inverse tangent.
        cosh: cosh (%1) : hyperbolic cosine.
        sinh: sinh (%1) : hyperbolic sine.
        tanh: tanh (%1) : hyperbolic tangent.
        acosh: acosh (%1) : inverse hyperbolic cosine.
        asinh: asinh (%1) : inverse hyperbolic sine.
        atanh: atanh (%1) : inverse hyperbolic tangent.
        datatype: specify output image data type. Valid choices are: float32,\
            float32le, float32be, float64, float64le, float64be, int64, uint64,\
            int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
            int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
            cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
            int8, uint8, bit.
        info: display information messages.
        quiet: do not display information messages or progress status;\
            alternatively, this can be achieved by setting the MRTRIX_QUIET\
            environment variable to a non-empty string.
        debug: display debugging messages.
        force: force overwrite of output files (caution: using the same file as\
            input and output might cause unexpected behaviour).
        nthreads: use this number of threads in multi-threaded applications\
            (set to 0 to disable multi-threading).
        config: temporarily set the value of an MRtrix config file entry.
        help_: display this information page and exit.
        version: display version information and exit.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "mrtrix/mrcalc",
        "info": info,
        "quiet": quiet,
        "debug": debug,
        "force": force,
        "help": help_,
        "version": version,
        "operand": operand,
    }
    if abs_ is not None:
        params["abs"] = abs_
    if neg is not None:
        params["neg"] = neg
    if add is not None:
        params["add"] = add
    if subtract is not None:
        params["subtract"] = subtract
    if multiply is not None:
        params["multiply"] = multiply
    if divide is not None:
        params["divide"] = divide
    if min_ is not None:
        params["min"] = min_
    if max_ is not None:
        params["max"] = max_
    if lt is not None:
        params["lt"] = lt
    if gt is not None:
        params["gt"] = gt
    if le is not None:
        params["le"] = le
    if ge is not None:
        params["ge"] = ge
    if eq is not None:
        params["eq"] = eq
    if neq is not None:
        params["neq"] = neq
    if if_ is not None:
        params["if"] = if_
    if replace is not None:
        params["replace"] = replace
    if sqrt is not None:
        params["sqrt"] = sqrt
    if pow_ is not None:
        params["pow"] = pow_
    if round_ is not None:
        params["round"] = round_
    if ceil is not None:
        params["ceil"] = ceil
    if floor is not None:
        params["floor"] = floor
    if not_ is not None:
        params["not"] = not_
    if and_ is not None:
        params["and"] = and_
    if or_ is not None:
        params["or"] = or_
    if xor is not None:
        params["xor"] = xor
    if isnan is not None:
        params["isnan"] = isnan
    if isinf is not None:
        params["isinf"] = isinf
    if finite is not None:
        params["finite"] = finite
    if complex_ is not None:
        params["complex"] = complex_
    if polar is not None:
        params["polar"] = polar
    if real is not None:
        params["real"] = real
    if imag is not None:
        params["imag"] = imag
    if phase is not None:
        params["phase"] = phase
    if conj is not None:
        params["conj"] = conj
    if proj is not None:
        params["proj"] = proj
    if exp is not None:
        params["exp"] = exp
    if log is not None:
        params["log"] = log
    if log10 is not None:
        params["log10"] = log10
    if cos is not None:
        params["cos"] = cos
    if sin is not None:
        params["sin"] = sin
    if tan is not None:
        params["tan"] = tan
    if acos is not None:
        params["acos"] = acos
    if asin is not None:
        params["asin"] = asin
    if atan is not None:
        params["atan"] = atan
    if cosh is not None:
        params["cosh"] = cosh
    if sinh is not None:
        params["sinh"] = sinh
    if tanh is not None:
        params["tanh"] = tanh
    if acosh is not None:
        params["acosh"] = acosh
    if asinh is not None:
        params["asinh"] = asinh
    if atanh is not None:
        params["atanh"] = atanh
    if datatype is not None:
        params["datatype"] = datatype
    if nthreads is not None:
        params["nthreads"] = nthreads
    if config is not None:
        params["config"] = config
    return params


def mrcalc_cargs(
    params: MrcalcParameters,
    execution: Execution,
) -> list[str]:
    """
    Build command-line arguments from parameters.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Command-line arguments.
    """
    cargs = []
    cargs.append("mrcalc")
    if params.get("abs", None) is not None:
        cargs.extend([a for c in [mrcalc_abs_cargs(s, execution) for s in params.get("abs", None)] for a in c])
    if params.get("neg", None) is not None:
        cargs.extend([a for c in [mrcalc_neg_cargs(s, execution) for s in params.get("neg", None)] for a in c])
    if params.get("add", None) is not None:
        cargs.extend([a for c in [mrcalc_add_cargs(s, execution) for s in params.get("add", None)] for a in c])
    if params.get("subtract", None) is not None:
        cargs.extend([a for c in [mrcalc_subtract_cargs(s, execution) for s in params.get("subtract", None)] for a in c])
    if params.get("multiply", None) is not None:
        cargs.extend([a for c in [mrcalc_multiply_cargs(s, execution) for s in params.get("multiply", None)] for a in c])
    if params.get("divide", None) is not None:
        cargs.extend([a for c in [mrcalc_divide_cargs(s, execution) for s in params.get("divide", None)] for a in c])
    if params.get("min", None) is not None:
        cargs.extend([a for c in [mrcalc_min_cargs(s, execution) for s in params.get("min", None)] for a in c])
    if params.get("max", None) is not None:
        cargs.extend([a for c in [mrcalc_max_cargs(s, execution) for s in params.get("max", None)] for a in c])
    if params.get("lt", None) is not None:
        cargs.extend([a for c in [mrcalc_lt_cargs(s, execution) for s in params.get("lt", None)] for a in c])
    if params.get("gt", None) is not None:
        cargs.extend([a for c in [mrcalc_gt_cargs(s, execution) for s in params.get("gt", None)] for a in c])
    if params.get("le", None) is not None:
        cargs.extend([a for c in [mrcalc_le_cargs(s, execution) for s in params.get("le", None)] for a in c])
    if params.get("ge", None) is not None:
        cargs.extend([a for c in [mrcalc_ge_cargs(s, execution) for s in params.get("ge", None)] for a in c])
    if params.get("eq", None) is not None:
        cargs.extend([a for c in [mrcalc_eq_cargs(s, execution) for s in params.get("eq", None)] for a in c])
    if params.get("neq", None) is not None:
        cargs.extend([a for c in [mrcalc_neq_cargs(s, execution) for s in params.get("neq", None)] for a in c])
    if params.get("if", None) is not None:
        cargs.extend([a for c in [mrcalc_if_cargs(s, execution) for s in params.get("if", None)] for a in c])
    if params.get("replace", None) is not None:
        cargs.extend([a for c in [mrcalc_replace_cargs(s, execution) for s in params.get("replace", None)] for a in c])
    if params.get("sqrt", None) is not None:
        cargs.extend([a for c in [mrcalc_sqrt_cargs(s, execution) for s in params.get("sqrt", None)] for a in c])
    if params.get("pow", None) is not None:
        cargs.extend([a for c in [mrcalc_pow_cargs(s, execution) for s in params.get("pow", None)] for a in c])
    if params.get("round", None) is not None:
        cargs.extend([a for c in [mrcalc_round_cargs(s, execution) for s in params.get("round", None)] for a in c])
    if params.get("ceil", None) is not None:
        cargs.extend([a for c in [mrcalc_ceil_cargs(s, execution) for s in params.get("ceil", None)] for a in c])
    if params.get("floor", None) is not None:
        cargs.extend([a for c in [mrcalc_floor_cargs(s, execution) for s in params.get("floor", None)] for a in c])
    if params.get("not", None) is not None:
        cargs.extend([a for c in [mrcalc_not_cargs(s, execution) for s in params.get("not", None)] for a in c])
    if params.get("and", None) is not None:
        cargs.extend([a for c in [mrcalc_and_cargs(s, execution) for s in params.get("and", None)] for a in c])
    if params.get("or", None) is not None:
        cargs.extend([a for c in [mrcalc_or_cargs(s, execution) for s in params.get("or", None)] for a in c])
    if params.get("xor", None) is not None:
        cargs.extend([a for c in [mrcalc_xor_cargs(s, execution) for s in params.get("xor", None)] for a in c])
    if params.get("isnan", None) is not None:
        cargs.extend([a for c in [mrcalc_isnan_cargs(s, execution) for s in params.get("isnan", None)] for a in c])
    if params.get("isinf", None) is not None:
        cargs.extend([a for c in [mrcalc_isinf_cargs(s, execution) for s in params.get("isinf", None)] for a in c])
    if params.get("finite", None) is not None:
        cargs.extend([a for c in [mrcalc_finite_cargs(s, execution) for s in params.get("finite", None)] for a in c])
    if params.get("complex", None) is not None:
        cargs.extend([a for c in [mrcalc_complex_cargs(s, execution) for s in params.get("complex", None)] for a in c])
    if params.get("polar", None) is not None:
        cargs.extend([a for c in [mrcalc_polar_cargs(s, execution) for s in params.get("polar", None)] for a in c])
    if params.get("real", None) is not None:
        cargs.extend([a for c in [mrcalc_real_cargs(s, execution) for s in params.get("real", None)] for a in c])
    if params.get("imag", None) is not None:
        cargs.extend([a for c in [mrcalc_imag_cargs(s, execution) for s in params.get("imag", None)] for a in c])
    if params.get("phase", None) is not None:
        cargs.extend([a for c in [mrcalc_phase_cargs(s, execution) for s in params.get("phase", None)] for a in c])
    if params.get("conj", None) is not None:
        cargs.extend([a for c in [mrcalc_conj_cargs(s, execution) for s in params.get("conj", None)] for a in c])
    if params.get("proj", None) is not None:
        cargs.extend([a for c in [mrcalc_proj_cargs(s, execution) for s in params.get("proj", None)] for a in c])
    if params.get("exp", None) is not None:
        cargs.extend([a for c in [mrcalc_exp_cargs(s, execution) for s in params.get("exp", None)] for a in c])
    if params.get("log", None) is not None:
        cargs.extend([a for c in [mrcalc_log_cargs(s, execution) for s in params.get("log", None)] for a in c])
    if params.get("log10", None) is not None:
        cargs.extend([a for c in [mrcalc_log10_cargs(s, execution) for s in params.get("log10", None)] for a in c])
    if params.get("cos", None) is not None:
        cargs.extend([a for c in [mrcalc_cos_cargs(s, execution) for s in params.get("cos", None)] for a in c])
    if params.get("sin", None) is not None:
        cargs.extend([a for c in [mrcalc_sin_cargs(s, execution) for s in params.get("sin", None)] for a in c])
    if params.get("tan", None) is not None:
        cargs.extend([a for c in [mrcalc_tan_cargs(s, execution) for s in params.get("tan", None)] for a in c])
    if params.get("acos", None) is not None:
        cargs.extend([a for c in [mrcalc_acos_cargs(s, execution) for s in params.get("acos", None)] for a in c])
    if params.get("asin", None) is not None:
        cargs.extend([a for c in [mrcalc_asin_cargs(s, execution) for s in params.get("asin", None)] for a in c])
    if params.get("atan", None) is not None:
        cargs.extend([a for c in [mrcalc_atan_cargs(s, execution) for s in params.get("atan", None)] for a in c])
    if params.get("cosh", None) is not None:
        cargs.extend([a for c in [mrcalc_cosh_cargs(s, execution) for s in params.get("cosh", None)] for a in c])
    if params.get("sinh", None) is not None:
        cargs.extend([a for c in [mrcalc_sinh_cargs(s, execution) for s in params.get("sinh", None)] for a in c])
    if params.get("tanh", None) is not None:
        cargs.extend([a for c in [mrcalc_tanh_cargs(s, execution) for s in params.get("tanh", None)] for a in c])
    if params.get("acosh", None) is not None:
        cargs.extend([a for c in [mrcalc_acosh_cargs(s, execution) for s in params.get("acosh", None)] for a in c])
    if params.get("asinh", None) is not None:
        cargs.extend([a for c in [mrcalc_asinh_cargs(s, execution) for s in params.get("asinh", None)] for a in c])
    if params.get("atanh", None) is not None:
        cargs.extend([a for c in [mrcalc_atanh_cargs(s, execution) for s in params.get("atanh", None)] for a in c])
    if params.get("datatype", None) is not None:
        cargs.extend([
            "-datatype",
            params.get("datatype", None)
        ])
    if params.get("info", False):
        cargs.append("-info")
    if params.get("quiet", False):
        cargs.append("-quiet")
    if params.get("debug", False):
        cargs.append("-debug")
    if params.get("force", False):
        cargs.append("-force")
    if params.get("nthreads", None) is not None:
        cargs.extend([
            "-nthreads",
            str(params.get("nthreads", None))
        ])
    if params.get("config", None) is not None:
        cargs.extend([a for c in [mrcalc_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
    if params.get("help", False):
        cargs.append("-help")
    if params.get("version", False):
        cargs.append("-version")
    cargs.extend([a for c in [mrcalc_operand_cargs_dyn_fn(s["@type"])(s, execution) for s in params.get("operand", None)] for a in c])
    return cargs


def mrcalc_outputs(
    params: MrcalcParameters,
    execution: Execution,
) -> MrcalcOutputs:
    """
    Build outputs object containing output file paths and possibly stdout/stderr.
    
    Args:
        params: The parameters.
        execution: The execution object for resolving input paths.
    Returns:
        Outputs object.
    """
    ret = MrcalcOutputs(
        root=execution.output_file("."),
    )
    return ret


def mrcalc_execute(
    params: MrcalcParameters,
    runner: Runner | None = None,
) -> MrcalcOutputs:
    """
    mrcalc
    
    Apply generic voxel-wise mathematical operations to images.
    
    This command will only compute per-voxel operations. Use 'mrmath' to compute
    summary statistics across images or along image axes.
    
    This command uses a stack-based syntax, with operators (specified using
    options) operating on the top-most entries (i.e. images or values) in the
    stack. Operands (values or images) are pushed onto the stack in the order
    they appear (as arguments) on the command-line, and operators (specified as
    options) operate on and consume the top-most entries in the stack, and push
    their output as a new entry on the stack.
    
    As an additional feature, this command will allow images with different
    dimensions to be processed, provided they satisfy the following conditions:
    for each axis, the dimensions match if they are the same size, or one of
    them has size one. In the latter case, the entire image will be replicated
    along that axis. This allows for example a 4D image of size [ X Y Z N ] to
    be added to a 3D image of size [ X Y Z ], as if it consisted of N copies of
    the 3D image along the 4th axis (the missing dimension is assumed to have
    size 1). Another example would a single-voxel 4D image of size [ 1 1 1 N ],
    multiplied by a 3D image of size [ X Y Z ], which would allow the creation
    of a 4D image where each volume consists of the 3D image scaled by the
    corresponding value for that volume in the single-voxel image.
    
    References:
    
    .
    
    Author: MRTrix3 Developers
    
    URL: https://www.mrtrix.org/
    
    Args:
        params: The parameters.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrcalcOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRCALC_METADATA)
    params = execution.params(params)
    cargs = mrcalc_cargs(params, execution)
    ret = mrcalc_outputs(params, execution)
    execution.run(cargs)
    return ret


def mrcalc(
    operand: list[typing.Union[MrcalcVariousStringParametersTagged, MrcalcVariousFileParametersTagged]],
    abs_: list[MrcalcAbsParameters] | None = None,
    neg: list[MrcalcNegParameters] | None = None,
    add: list[MrcalcAddParameters] | None = None,
    subtract: list[MrcalcSubtractParameters] | None = None,
    multiply: list[MrcalcMultiplyParameters] | None = None,
    divide: list[MrcalcDivideParameters] | None = None,
    min_: list[MrcalcMinParameters] | None = None,
    max_: list[MrcalcMaxParameters] | None = None,
    lt: list[MrcalcLtParameters] | None = None,
    gt: list[MrcalcGtParameters] | None = None,
    le: list[MrcalcLeParameters] | None = None,
    ge: list[MrcalcGeParameters] | None = None,
    eq: list[MrcalcEqParameters] | None = None,
    neq: list[MrcalcNeqParameters] | None = None,
    if_: list[MrcalcIfParameters] | None = None,
    replace: list[MrcalcReplaceParameters] | None = None,
    sqrt: list[MrcalcSqrtParameters] | None = None,
    pow_: list[MrcalcPowParameters] | None = None,
    round_: list[MrcalcRoundParameters] | None = None,
    ceil: list[MrcalcCeilParameters] | None = None,
    floor: list[MrcalcFloorParameters] | None = None,
    not_: list[MrcalcNotParameters] | None = None,
    and_: list[MrcalcAndParameters] | None = None,
    or_: list[MrcalcOrParameters] | None = None,
    xor: list[MrcalcXorParameters] | None = None,
    isnan: list[MrcalcIsnanParameters] | None = None,
    isinf: list[MrcalcIsinfParameters] | None = None,
    finite: list[MrcalcFiniteParameters] | None = None,
    complex_: list[MrcalcComplexParameters] | None = None,
    polar: list[MrcalcPolarParameters] | None = None,
    real: list[MrcalcRealParameters] | None = None,
    imag: list[MrcalcImagParameters] | None = None,
    phase: list[MrcalcPhaseParameters] | None = None,
    conj: list[MrcalcConjParameters] | None = None,
    proj: list[MrcalcProjParameters] | None = None,
    exp: list[MrcalcExpParameters] | None = None,
    log: list[MrcalcLogParameters] | None = None,
    log10: list[MrcalcLog10Parameters] | None = None,
    cos: list[MrcalcCosParameters] | None = None,
    sin: list[MrcalcSinParameters] | None = None,
    tan: list[MrcalcTanParameters] | None = None,
    acos: list[MrcalcAcosParameters] | None = None,
    asin: list[MrcalcAsinParameters] | None = None,
    atan: list[MrcalcAtanParameters] | None = None,
    cosh: list[MrcalcCoshParameters] | None = None,
    sinh: list[MrcalcSinhParameters] | None = None,
    tanh: list[MrcalcTanhParameters] | None = None,
    acosh: list[MrcalcAcoshParameters] | None = None,
    asinh: list[MrcalcAsinhParameters] | None = None,
    atanh: list[MrcalcAtanhParameters] | None = None,
    datatype: str | None = None,
    info: bool = False,
    quiet: bool = False,
    debug: bool = False,
    force: bool = False,
    nthreads: int | None = None,
    config: list[MrcalcConfigParameters] | None = None,
    help_: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> MrcalcOutputs:
    """
    mrcalc
    
    Apply generic voxel-wise mathematical operations to images.
    
    This command will only compute per-voxel operations. Use 'mrmath' to compute
    summary statistics across images or along image axes.
    
    This command uses a stack-based syntax, with operators (specified using
    options) operating on the top-most entries (i.e. images or values) in the
    stack. Operands (values or images) are pushed onto the stack in the order
    they appear (as arguments) on the command-line, and operators (specified as
    options) operate on and consume the top-most entries in the stack, and push
    their output as a new entry on the stack.
    
    As an additional feature, this command will allow images with different
    dimensions to be processed, provided they satisfy the following conditions:
    for each axis, the dimensions match if they are the same size, or one of
    them has size one. In the latter case, the entire image will be replicated
    along that axis. This allows for example a 4D image of size [ X Y Z N ] to
    be added to a 3D image of size [ X Y Z ], as if it consisted of N copies of
    the 3D image along the 4th axis (the missing dimension is assumed to have
    size 1). Another example would a single-voxel 4D image of size [ 1 1 1 N ],
    multiplied by a 3D image of size [ X Y Z ], which would allow the creation
    of a 4D image where each volume consists of the 3D image scaled by the
    corresponding value for that volume in the single-voxel image.
    
    References:
    
    .
    
    Author: MRTrix3 Developers
    
    URL: https://www.mrtrix.org/
    
    Args:
        operand: an input image, intensity value, or the special keywords\
            'rand' (random number between 0 and 1) or 'randn' (random number from\
            unit std.dev. normal distribution) or the mathematical constants 'e'\
            and 'pi'.
        abs_: |%1| : return absolute value (magnitude) of real or complex\
            number.
        neg: -%1 : negative value.
        add: (%1 + %2) : add values.
        subtract: (%1 - %2) : subtract nth operand from (n-1)th.
        multiply: (%1 * %2) : multiply values.
        divide: (%1 / %2) : divide (n-1)th operand by nth.
        min_: min (%1, %2) : smallest of last two operands.
        max_: max (%1, %2) : greatest of last two operands.
        lt: (%1 < %2) : less-than operator (true=1, false=0).
        gt: (%1 > %2) : greater-than operator (true=1, false=0).
        le: (%1 <= %2) : less-than-or-equal-to operator (true=1, false=0).
        ge: (%1 >= %2) : greater-than-or-equal-to operator (true=1, false=0).
        eq: (%1 == %2) : equal-to operator (true=1, false=0).
        neq: (%1 != %2) : not-equal-to operator (true=1, false=0).
        if_: (%1 ? %2 : %3) : if first operand is true (non-zero), return\
            second operand, otherwise return third operand.
        replace: (%1, %2 -> %3) : Wherever first operand is equal to the second\
            operand, replace with third operand.
        sqrt: sqrt (%1) : square root.
        pow_: %1^%2 : raise (n-1)th operand to nth power.
        round_: round (%1) : round to nearest integer.
        ceil: ceil (%1) : round up to nearest integer.
        floor: floor (%1) : round down to nearest integer.
        not_: !%1 : NOT operator: true (1) if operand is false (i.e. zero).
        and_: (%1 && %2) : AND operator: true (1) if both operands are true\
            (i.e. non-zero).
        or_: (%1 || %2) : OR operator: true (1) if either operand is true (i.e.\
            non-zero).
        xor: (%1 ^^ %2) : XOR operator: true (1) if only one of the operands is\
            true (i.e. non-zero).
        isnan: isnan (%1) : true (1) if operand is not-a-number (NaN).
        isinf: isinf (%1) : true (1) if operand is infinite (Inf).
        finite: finite (%1) : true (1) if operand is finite (i.e. not NaN or\
            Inf).
        complex_: (%1 + %2 i) : create complex number using the last two\
            operands as real,imaginary components.
        polar: (%1 /_ %2) : create complex number using the last two operands\
            as magnitude,phase components (phase in radians).
        real: real (%1) : real part of complex number.
        imag: imag (%1) : imaginary part of complex number.
        phase: phase (%1) : phase of complex number (use -abs for magnitude).
        conj: conj (%1) : complex conjugate.
        proj: proj (%1) : projection onto the Riemann sphere.
        exp: exp (%1) : exponential function.
        log: log (%1) : natural logarithm.
        log10: log10 (%1) : common logarithm.
        cos: cos (%1) : cosine.
        sin: sin (%1) : sine.
        tan: tan (%1) : tangent.
        acos: acos (%1) : inverse cosine.
        asin: asin (%1) : inverse sine.
        atan: atan (%1) : inverse tangent.
        cosh: cosh (%1) : hyperbolic cosine.
        sinh: sinh (%1) : hyperbolic sine.
        tanh: tanh (%1) : hyperbolic tangent.
        acosh: acosh (%1) : inverse hyperbolic cosine.
        asinh: asinh (%1) : inverse hyperbolic sine.
        atanh: atanh (%1) : inverse hyperbolic tangent.
        datatype: specify output image data type. Valid choices are: float32,\
            float32le, float32be, float64, float64le, float64be, int64, uint64,\
            int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
            int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
            cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
            int8, uint8, bit.
        info: display information messages.
        quiet: do not display information messages or progress status;\
            alternatively, this can be achieved by setting the MRTRIX_QUIET\
            environment variable to a non-empty string.
        debug: display debugging messages.
        force: force overwrite of output files (caution: using the same file as\
            input and output might cause unexpected behaviour).
        nthreads: use this number of threads in multi-threaded applications\
            (set to 0 to disable multi-threading).
        config: temporarily set the value of an MRtrix config file entry.
        help_: display this information page and exit.
        version: display version information and exit.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrcalcOutputs`).
    """
    params = mrcalc_params(
        abs_=abs_,
        neg=neg,
        add=add,
        subtract=subtract,
        multiply=multiply,
        divide=divide,
        min_=min_,
        max_=max_,
        lt=lt,
        gt=gt,
        le=le,
        ge=ge,
        eq=eq,
        neq=neq,
        if_=if_,
        replace=replace,
        sqrt=sqrt,
        pow_=pow_,
        round_=round_,
        ceil=ceil,
        floor=floor,
        not_=not_,
        and_=and_,
        or_=or_,
        xor=xor,
        isnan=isnan,
        isinf=isinf,
        finite=finite,
        complex_=complex_,
        polar=polar,
        real=real,
        imag=imag,
        phase=phase,
        conj=conj,
        proj=proj,
        exp=exp,
        log=log,
        log10=log10,
        cos=cos,
        sin=sin,
        tan=tan,
        acos=acos,
        asin=asin,
        atan=atan,
        cosh=cosh,
        sinh=sinh,
        tanh=tanh,
        acosh=acosh,
        asinh=asinh,
        atanh=atanh,
        datatype=datatype,
        info=info,
        quiet=quiet,
        debug=debug,
        force=force,
        nthreads=nthreads,
        config=config,
        help_=help_,
        version=version,
        operand=operand,
    )
    return mrcalc_execute(params, runner)


__all__ = [
    "MRCALC_METADATA",
    "MrcalcOutputs",
    "mrcalc",
    "mrcalc_abs_params",
    "mrcalc_acos_params",
    "mrcalc_acosh_params",
    "mrcalc_add_params",
    "mrcalc_and_params",
    "mrcalc_asin_params",
    "mrcalc_asinh_params",
    "mrcalc_atan_params",
    "mrcalc_atanh_params",
    "mrcalc_ceil_params",
    "mrcalc_complex_params",
    "mrcalc_config_params",
    "mrcalc_conj_params",
    "mrcalc_cos_params",
    "mrcalc_cosh_params",
    "mrcalc_divide_params",
    "mrcalc_eq_params",
    "mrcalc_execute",
    "mrcalc_exp_params",
    "mrcalc_finite_params",
    "mrcalc_floor_params",
    "mrcalc_ge_params",
    "mrcalc_gt_params",
    "mrcalc_if_params",
    "mrcalc_imag_params",
    "mrcalc_isinf_params",
    "mrcalc_isnan_params",
    "mrcalc_le_params",
    "mrcalc_log10_params",
    "mrcalc_log_params",
    "mrcalc_lt_params",
    "mrcalc_max_params",
    "mrcalc_min_params",
    "mrcalc_multiply_params",
    "mrcalc_neg_params",
    "mrcalc_neq_params",
    "mrcalc_not_params",
    "mrcalc_or_params",
    "mrcalc_params",
    "mrcalc_phase_params",
    "mrcalc_polar_params",
    "mrcalc_pow_params",
    "mrcalc_proj_params",
    "mrcalc_real_params",
    "mrcalc_replace_params",
    "mrcalc_round_params",
    "mrcalc_sin_params",
    "mrcalc_sinh_params",
    "mrcalc_sqrt_params",
    "mrcalc_subtract_params",
    "mrcalc_tan_params",
    "mrcalc_tanh_params",
    "mrcalc_various_file_params",
    "mrcalc_various_string_params",
    "mrcalc_xor_params",
]
