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

import typing
import pathlib
from styxdefs import *

FIXELCONVERT_METADATA = Metadata(
    id="e14b8ead7201552625ae27a34473502808101400.boutiques",
    name="fixelconvert",
    package="mrtrix",
    container_image_tag="mrtrix3/mrtrix3:3.0.4",
)


_FixelconvertConfigParamsDictNoTag = typing.TypedDict('_FixelconvertConfigParamsDictNoTag', {
    "key": str,
    "value": str,
})
FixelconvertConfigParamsDictTagged = typing.TypedDict('FixelconvertConfigParamsDictTagged', {
    "@type": typing.Literal["config"],
    "key": str,
    "value": str,
})
FixelconvertConfigParamsDict = _FixelconvertConfigParamsDictNoTag | FixelconvertConfigParamsDictTagged


_FixelconvertVariousStringParamsDictNoTag = typing.TypedDict('_FixelconvertVariousStringParamsDictNoTag', {
    "obj": str,
})
FixelconvertVariousStringParamsDictTagged = typing.TypedDict('FixelconvertVariousStringParamsDictTagged', {
    "@type": typing.Literal["VariousString"],
    "obj": str,
})
FixelconvertVariousStringParamsDict = _FixelconvertVariousStringParamsDictNoTag | FixelconvertVariousStringParamsDictTagged


_FixelconvertVariousFileParamsDictNoTag = typing.TypedDict('_FixelconvertVariousFileParamsDictNoTag', {
    "obj": InputPathType,
})
FixelconvertVariousFileParamsDictTagged = typing.TypedDict('FixelconvertVariousFileParamsDictTagged', {
    "@type": typing.Literal["VariousFile"],
    "obj": InputPathType,
})
FixelconvertVariousFileParamsDict = _FixelconvertVariousFileParamsDictNoTag | FixelconvertVariousFileParamsDictTagged


_FixelconvertVariousString1ParamsDictNoTag = typing.TypedDict('_FixelconvertVariousString1ParamsDictNoTag', {
    "obj": str,
})
FixelconvertVariousString1ParamsDictTagged = typing.TypedDict('FixelconvertVariousString1ParamsDictTagged', {
    "@type": typing.Literal["VariousString_1"],
    "obj": str,
})
FixelconvertVariousString1ParamsDict = _FixelconvertVariousString1ParamsDictNoTag | FixelconvertVariousString1ParamsDictTagged


_FixelconvertVariousFile1ParamsDictNoTag = typing.TypedDict('_FixelconvertVariousFile1ParamsDictNoTag', {
    "obj": InputPathType,
})
FixelconvertVariousFile1ParamsDictTagged = typing.TypedDict('FixelconvertVariousFile1ParamsDictTagged', {
    "@type": typing.Literal["VariousFile_1"],
    "obj": InputPathType,
})
FixelconvertVariousFile1ParamsDict = _FixelconvertVariousFile1ParamsDictNoTag | FixelconvertVariousFile1ParamsDictTagged


_FixelconvertParamsDictNoTag = typing.TypedDict('_FixelconvertParamsDictNoTag', {
    "name": typing.NotRequired[str | None],
    "nii": bool,
    "out_size": bool,
    "template": typing.NotRequired[InputPathType | None],
    "value": typing.NotRequired[InputPathType | None],
    "in_size": typing.NotRequired[InputPathType | None],
    "info": bool,
    "quiet": bool,
    "debug": bool,
    "force": bool,
    "nthreads": typing.NotRequired[int | None],
    "config": typing.NotRequired[list[FixelconvertConfigParamsDict] | None],
    "help": bool,
    "version": bool,
    "fixel_in": typing.Union[FixelconvertVariousStringParamsDictTagged, FixelconvertVariousFileParamsDictTagged],
    "fixel_out": typing.Union[FixelconvertVariousString1ParamsDictTagged, FixelconvertVariousFile1ParamsDictTagged],
})
FixelconvertParamsDictTagged = typing.TypedDict('FixelconvertParamsDictTagged', {
    "@type": typing.Literal["mrtrix/fixelconvert"],
    "name": typing.NotRequired[str | None],
    "nii": bool,
    "out_size": bool,
    "template": typing.NotRequired[InputPathType | None],
    "value": typing.NotRequired[InputPathType | None],
    "in_size": typing.NotRequired[InputPathType | None],
    "info": bool,
    "quiet": bool,
    "debug": bool,
    "force": bool,
    "nthreads": typing.NotRequired[int | None],
    "config": typing.NotRequired[list[FixelconvertConfigParamsDict] | None],
    "help": bool,
    "version": bool,
    "fixel_in": typing.Union[FixelconvertVariousStringParamsDictTagged, FixelconvertVariousFileParamsDictTagged],
    "fixel_out": typing.Union[FixelconvertVariousString1ParamsDictTagged, FixelconvertVariousFile1ParamsDictTagged],
})
FixelconvertParamsDict = _FixelconvertParamsDictNoTag | FixelconvertParamsDictTagged


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


def fixelconvert_fixel_in_validate_dyn_fn(
    t: str,
) -> typing.Any:
    """
    Get validate params function by command type.
    
    Args:
        t: Command type.
    Returns:
        Validate params function.
    """
    return {
        "VariousString": fixelconvert_various_string_validate,
        "VariousFile": fixelconvert_various_file_validate,
    }.get(t)


def fixelconvert_fixel_out_cargs_dyn_fn(
    t: str,
) -> typing.Any:
    """
    Get build cargs function by command type.
    
    Args:
        t: Command type.
    Returns:
        Build cargs function.
    """
    return {
        "VariousString_1": fixelconvert_various_string_1_cargs,
        "VariousFile_1": fixelconvert_various_file_1_cargs,
    }.get(t)


def fixelconvert_fixel_out_validate_dyn_fn(
    t: str,
) -> typing.Any:
    """
    Get validate params function by command type.
    
    Args:
        t: Command type.
    Returns:
        Validate params function.
    """
    return {
        "VariousString_1": fixelconvert_various_string_1_validate,
        "VariousFile_1": fixelconvert_various_file_1_validate,
    }.get(t)


def fixelconvert_config(
    key: str,
    value: str,
) -> FixelconvertConfigParamsDictTagged:
    """
    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 fixelconvert_config_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `FixelconvertConfigParamsDict` object.
    
    Args:
        params: The parameters object to validate.
    """
    if params is None or not isinstance(params, dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
    if params.get("key", None) is None:
        raise StyxValidationError("`key` must not be None")
    if not isinstance(params["key"], str):
        raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
    if params.get("value", None) is None:
        raise StyxValidationError("`value` must not be None")
    if not isinstance(params["value"], str):
        raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')


def fixelconvert_config_cargs(
    params: FixelconvertConfigParamsDict,
    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 fixelconvert_various_string(
    obj: str,
) -> FixelconvertVariousStringParamsDictTagged:
    """
    Build parameters.
    
    Args:
        obj: String object.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "VariousString",
        "obj": obj,
    }
    return params


def fixelconvert_various_string_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `FixelconvertVariousStringParamsDict` object.
    
    Args:
        params: The parameters object to validate.
    """
    if params is None or not isinstance(params, dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
    if params.get("obj", None) is None:
        raise StyxValidationError("`obj` must not be None")
    if not isinstance(params["obj"], str):
        raise StyxValidationError(f'`obj` has the wrong type: Received `{type(params.get("obj", None))}` expected `str`')


def fixelconvert_various_string_cargs(
    params: FixelconvertVariousStringParamsDict,
    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 fixelconvert_various_file(
    obj: InputPathType,
) -> FixelconvertVariousFileParamsDictTagged:
    """
    Build parameters.
    
    Args:
        obj: File object.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "VariousFile",
        "obj": obj,
    }
    return params


def fixelconvert_various_file_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `FixelconvertVariousFileParamsDict` object.
    
    Args:
        params: The parameters object to validate.
    """
    if params is None or not isinstance(params, dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
    if params.get("obj", None) is None:
        raise StyxValidationError("`obj` must not be None")
    if not isinstance(params["obj"], (pathlib.Path, str)):
        raise StyxValidationError(f'`obj` has the wrong type: Received `{type(params.get("obj", None))}` expected `InputPathType`')


def fixelconvert_various_file_cargs(
    params: FixelconvertVariousFileParamsDict,
    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


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


def fixelconvert_various_string_1_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `FixelconvertVariousString1ParamsDict` object.
    
    Args:
        params: The parameters object to validate.
    """
    if params is None or not isinstance(params, dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
    if params.get("obj", None) is None:
        raise StyxValidationError("`obj` must not be None")
    if not isinstance(params["obj"], str):
        raise StyxValidationError(f'`obj` has the wrong type: Received `{type(params.get("obj", None))}` expected `str`')


def fixelconvert_various_string_1_cargs(
    params: FixelconvertVariousString1ParamsDict,
    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 fixelconvert_various_file_1(
    obj: InputPathType,
) -> FixelconvertVariousFile1ParamsDictTagged:
    """
    Build parameters.
    
    Args:
        obj: File object.
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "VariousFile_1",
        "obj": obj,
    }
    return params


def fixelconvert_various_file_1_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `FixelconvertVariousFile1ParamsDict` object.
    
    Args:
        params: The parameters object to validate.
    """
    if params is None or not isinstance(params, dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
    if params.get("obj", None) is None:
        raise StyxValidationError("`obj` must not be None")
    if not isinstance(params["obj"], (pathlib.Path, str)):
        raise StyxValidationError(f'`obj` has the wrong type: Received `{type(params.get("obj", None))}` expected `InputPathType`')


def fixelconvert_various_file_1_cargs(
    params: FixelconvertVariousFile1ParamsDict,
    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 FixelconvertOutputs(typing.NamedTuple):
    """
    Output object returned when calling `FixelconvertParamsDict(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def fixelconvert_params(
    fixel_in: typing.Union[FixelconvertVariousStringParamsDictTagged, FixelconvertVariousFileParamsDictTagged],
    fixel_out: typing.Union[FixelconvertVariousString1ParamsDictTagged, FixelconvertVariousFile1ParamsDictTagged],
    name: str | None = None,
    nii: bool = False,
    out_size: bool = False,
    template: InputPathType | None = None,
    value: InputPathType | None = None,
    in_size: InputPathType | None = None,
    info: bool = False,
    quiet: bool = False,
    debug: bool = False,
    force: bool = False,
    nthreads: int | None = None,
    config: list[FixelconvertConfigParamsDict] | None = None,
    help_: bool = False,
    version: bool = False,
) -> FixelconvertParamsDictTagged:
    """
    Build parameters.
    
    Args:
        fixel_in: the input fixel file / directory.
        fixel_out: the output fixel file / directory.
        name: assign a different name to the value field output (Default:\
            value). Do not include the file extension.
        nii: output the index, directions and data file in NIfTI format instead\
            of .mif.
        out_size: also output the 'size' field from the old format.
        template: specify an existing fixel directory (in the new format) to\
            which the new output should conform.
        value: nominate the data file to import to the 'value' field in the old\
            format.
        in_size: import data for the 'size' field in the old format.
        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/fixelconvert",
        "nii": nii,
        "out_size": out_size,
        "info": info,
        "quiet": quiet,
        "debug": debug,
        "force": force,
        "help": help_,
        "version": version,
        "fixel_in": fixel_in,
        "fixel_out": fixel_out,
    }
    if name is not None:
        params["name"] = name
    if template is not None:
        params["template"] = template
    if value is not None:
        params["value"] = value
    if in_size is not None:
        params["in_size"] = in_size
    if nthreads is not None:
        params["nthreads"] = nthreads
    if config is not None:
        params["config"] = config
    return params


def fixelconvert_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `FixelconvertParamsDict` object.
    
    Args:
        params: The parameters object to validate.
    """
    if params is None or not isinstance(params, dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
    if params.get("name", None) is not None:
        if not isinstance(params["name"], str):
            raise StyxValidationError(f'`name` has the wrong type: Received `{type(params.get("name", None))}` expected `str | None`')
    if params.get("nii", False) is None:
        raise StyxValidationError("`nii` must not be None")
    if not isinstance(params["nii"], bool):
        raise StyxValidationError(f'`nii` has the wrong type: Received `{type(params.get("nii", False))}` expected `bool`')
    if params.get("out_size", False) is None:
        raise StyxValidationError("`out_size` must not be None")
    if not isinstance(params["out_size"], bool):
        raise StyxValidationError(f'`out_size` has the wrong type: Received `{type(params.get("out_size", False))}` expected `bool`')
    if params.get("template", None) is not None:
        if not isinstance(params["template"], (pathlib.Path, str)):
            raise StyxValidationError(f'`template` has the wrong type: Received `{type(params.get("template", None))}` expected `InputPathType | None`')
    if params.get("value", None) is not None:
        if not isinstance(params["value"], (pathlib.Path, str)):
            raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `InputPathType | None`')
    if params.get("in_size", None) is not None:
        if not isinstance(params["in_size"], (pathlib.Path, str)):
            raise StyxValidationError(f'`in_size` has the wrong type: Received `{type(params.get("in_size", None))}` expected `InputPathType | None`')
    if params.get("info", False) is None:
        raise StyxValidationError("`info` must not be None")
    if not isinstance(params["info"], bool):
        raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
    if params.get("quiet", False) is None:
        raise StyxValidationError("`quiet` must not be None")
    if not isinstance(params["quiet"], bool):
        raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
    if params.get("debug", False) is None:
        raise StyxValidationError("`debug` must not be None")
    if not isinstance(params["debug"], bool):
        raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
    if params.get("force", False) is None:
        raise StyxValidationError("`force` must not be None")
    if not isinstance(params["force"], bool):
        raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
    if params.get("nthreads", None) is not None:
        if not isinstance(params["nthreads"], int):
            raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
    if params.get("config", None) is not None:
        if not isinstance(params["config"], list):
            raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[FixelconvertConfigParamsDict] | None`')
        for e in params["config"]:
            fixelconvert_config_validate(e)
    if params.get("help", False) is None:
        raise StyxValidationError("`help` must not be None")
    if not isinstance(params["help"], bool):
        raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
    if params.get("version", False) is None:
        raise StyxValidationError("`version` must not be None")
    if not isinstance(params["version"], bool):
        raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
    if params.get("fixel_in", None) is None:
        raise StyxValidationError("`fixel_in` must not be None")
    if not isinstance(params["fixel_in"], dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params["fixel_in"])}\'')
    if "@type" not in params["fixel_in"]:
        raise StyxValidationError("Params object is missing `@type`")
    if params["fixel_in"]["@type"] not in ["VariousString", "VariousFile"]:
        raise StyxValidationError("Parameter `fixel_in`s `@type` must be one of [\"VariousString\", \"VariousFile\"]")
    fixelconvert_fixel_in_validate_dyn_fn(params["fixel_in"]["@type"])(params["fixel_in"])
    if params.get("fixel_out", None) is None:
        raise StyxValidationError("`fixel_out` must not be None")
    if not isinstance(params["fixel_out"], dict):
        raise StyxValidationError(f'Params object has the wrong type \'{type(params["fixel_out"])}\'')
    if "@type" not in params["fixel_out"]:
        raise StyxValidationError("Params object is missing `@type`")
    if params["fixel_out"]["@type"] not in ["VariousString_1", "VariousFile_1"]:
        raise StyxValidationError("Parameter `fixel_out`s `@type` must be one of [\"VariousString_1\", \"VariousFile_1\"]")
    fixelconvert_fixel_out_validate_dyn_fn(params["fixel_out"]["@type"])(params["fixel_out"])


def fixelconvert_cargs(
    params: FixelconvertParamsDict,
    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("fixelconvert")
    if params.get("name", None) is not None:
        cargs.extend([
            "-name",
            params.get("name", None)
        ])
    if params.get("nii", False):
        cargs.append("-nii")
    if params.get("out_size", False):
        cargs.append("-out_size")
    if params.get("template", None) is not None:
        cargs.extend([
            "-template",
            execution.input_file(params.get("template", None))
        ])
    if params.get("value", None) is not None:
        cargs.extend([
            "-value",
            execution.input_file(params.get("value", None))
        ])
    if params.get("in_size", None) is not None:
        cargs.extend([
            "-in_size",
            execution.input_file(params.get("in_size", 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 [fixelconvert_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(fixelconvert_fixel_in_cargs_dyn_fn(params.get("fixel_in", None)["@type"])(params.get("fixel_in", None), execution))
    cargs.extend(fixelconvert_fixel_out_cargs_dyn_fn(params.get("fixel_out", None)["@type"])(params.get("fixel_out", None), execution))
    return cargs


def fixelconvert_outputs(
    params: FixelconvertParamsDict,
    execution: Execution,
) -> FixelconvertOutputs:
    """
    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 = FixelconvertOutputs(
        root=execution.output_file("."),
    )
    return ret


def fixelconvert_execute(
    params: FixelconvertParamsDict,
    runner: Runner | None = None,
) -> FixelconvertOutputs:
    """
    fixelconvert
    
    Convert between the old format fixel image (.msf / .msh) and the new fixel
    directory format.
    
    
    
    References:
    
    .
    
    Author: MRTrix3 Developers
    
    URL: https://www.mrtrix.org/
    
    Args:
        params: The parameters.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FixelconvertOutputs`).
    """
    fixelconvert_validate(params)
    runner = runner or get_global_runner()
    execution = runner.start_execution(FIXELCONVERT_METADATA)
    params = execution.params(params)
    cargs = fixelconvert_cargs(params, execution)
    ret = fixelconvert_outputs(params, execution)
    execution.run(cargs)
    return ret


def fixelconvert(
    fixel_in: typing.Union[FixelconvertVariousStringParamsDictTagged, FixelconvertVariousFileParamsDictTagged],
    fixel_out: typing.Union[FixelconvertVariousString1ParamsDictTagged, FixelconvertVariousFile1ParamsDictTagged],
    name: str | None = None,
    nii: bool = False,
    out_size: bool = False,
    template: InputPathType | None = None,
    value: InputPathType | None = None,
    in_size: InputPathType | None = None,
    info: bool = False,
    quiet: bool = False,
    debug: bool = False,
    force: bool = False,
    nthreads: int | None = None,
    config: list[FixelconvertConfigParamsDict] | None = None,
    help_: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> FixelconvertOutputs:
    """
    fixelconvert
    
    Convert between the old format fixel image (.msf / .msh) and the new fixel
    directory format.
    
    
    
    References:
    
    .
    
    Author: MRTrix3 Developers
    
    URL: https://www.mrtrix.org/
    
    Args:
        fixel_in: the input fixel file / directory.
        fixel_out: the output fixel file / directory.
        name: assign a different name to the value field output (Default:\
            value). Do not include the file extension.
        nii: output the index, directions and data file in NIfTI format instead\
            of .mif.
        out_size: also output the 'size' field from the old format.
        template: specify an existing fixel directory (in the new format) to\
            which the new output should conform.
        value: nominate the data file to import to the 'value' field in the old\
            format.
        in_size: import data for the 'size' field in the old format.
        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 `FixelconvertOutputs`).
    """
    params = fixelconvert_params(
        name=name,
        nii=nii,
        out_size=out_size,
        template=template,
        value=value,
        in_size=in_size,
        info=info,
        quiet=quiet,
        debug=debug,
        force=force,
        nthreads=nthreads,
        config=config,
        help_=help_,
        version=version,
        fixel_in=fixel_in,
        fixel_out=fixel_out,
    )
    return fixelconvert_execute(params, runner)


__all__ = [
    "FIXELCONVERT_METADATA",
    "FixelconvertConfigParamsDict",
    "FixelconvertConfigParamsDictTagged",
    "FixelconvertOutputs",
    "FixelconvertParamsDict",
    "FixelconvertParamsDictTagged",
    "FixelconvertVariousFile1ParamsDict",
    "FixelconvertVariousFile1ParamsDictTagged",
    "FixelconvertVariousFileParamsDict",
    "FixelconvertVariousFileParamsDictTagged",
    "FixelconvertVariousString1ParamsDict",
    "FixelconvertVariousString1ParamsDictTagged",
    "FixelconvertVariousStringParamsDict",
    "FixelconvertVariousStringParamsDictTagged",
    "fixelconvert",
    "fixelconvert_config",
    "fixelconvert_execute",
    "fixelconvert_params",
    "fixelconvert_various_file",
    "fixelconvert_various_file_1",
    "fixelconvert_various_string",
    "fixelconvert_various_string_1",
]
