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

import typing
import pathlib
from styxdefs import *

TCKRESAMPLE_METADATA = Metadata(
    id="78ef274f2a87923f211402ee1cddb82172cd3499.boutiques",
    name="tckresample",
    package="mrtrix",
    container_image_tag="mrtrix3/mrtrix3:3.0.4",
)


_TckresampleLineParamsDictNoTag = typing.TypedDict('_TckresampleLineParamsDictNoTag', {
    "num": int,
    "start": list[float],
    "end": list[float],
})
TckresampleLineParamsDictTagged = typing.TypedDict('TckresampleLineParamsDictTagged', {
    "@type": typing.Literal["line"],
    "num": int,
    "start": list[float],
    "end": list[float],
})
TckresampleLineParamsDict = _TckresampleLineParamsDictNoTag | TckresampleLineParamsDictTagged


_TckresampleArcParamsDictNoTag = typing.TypedDict('_TckresampleArcParamsDictNoTag', {
    "num": int,
    "start": list[float],
    "mid": list[float],
    "end": list[float],
})
TckresampleArcParamsDictTagged = typing.TypedDict('TckresampleArcParamsDictTagged', {
    "@type": typing.Literal["arc"],
    "num": int,
    "start": list[float],
    "mid": list[float],
    "end": list[float],
})
TckresampleArcParamsDict = _TckresampleArcParamsDictNoTag | TckresampleArcParamsDictTagged


_TckresampleConfigParamsDictNoTag = typing.TypedDict('_TckresampleConfigParamsDictNoTag', {
    "key": str,
    "value": str,
})
TckresampleConfigParamsDictTagged = typing.TypedDict('TckresampleConfigParamsDictTagged', {
    "@type": typing.Literal["config"],
    "key": str,
    "value": str,
})
TckresampleConfigParamsDict = _TckresampleConfigParamsDictNoTag | TckresampleConfigParamsDictTagged


_TckresampleParamsDictNoTag = typing.TypedDict('_TckresampleParamsDictNoTag', {
    "upsample": typing.NotRequired[int | None],
    "downsample": typing.NotRequired[int | None],
    "step_size": typing.NotRequired[float | None],
    "num_points": typing.NotRequired[int | None],
    "endpoints": bool,
    "line": typing.NotRequired[TckresampleLineParamsDict | None],
    "arc": typing.NotRequired[TckresampleArcParamsDict | None],
    "info": bool,
    "quiet": bool,
    "debug": bool,
    "force": bool,
    "nthreads": typing.NotRequired[int | None],
    "config": typing.NotRequired[list[TckresampleConfigParamsDict] | None],
    "help": bool,
    "version": bool,
    "in_tracks": InputPathType,
    "out_tracks": str,
})
TckresampleParamsDictTagged = typing.TypedDict('TckresampleParamsDictTagged', {
    "@type": typing.Literal["mrtrix/tckresample"],
    "upsample": typing.NotRequired[int | None],
    "downsample": typing.NotRequired[int | None],
    "step_size": typing.NotRequired[float | None],
    "num_points": typing.NotRequired[int | None],
    "endpoints": bool,
    "line": typing.NotRequired[TckresampleLineParamsDict | None],
    "arc": typing.NotRequired[TckresampleArcParamsDict | None],
    "info": bool,
    "quiet": bool,
    "debug": bool,
    "force": bool,
    "nthreads": typing.NotRequired[int | None],
    "config": typing.NotRequired[list[TckresampleConfigParamsDict] | None],
    "help": bool,
    "version": bool,
    "in_tracks": InputPathType,
    "out_tracks": str,
})
TckresampleParamsDict = _TckresampleParamsDictNoTag | TckresampleParamsDictTagged


def tckresample_line(
    num: int,
    start: list[float],
    end: list[float],
) -> TckresampleLineParamsDictTagged:
    """
    Build parameters.
    
    Args:
        num: resample tracks at 'num' equidistant locations along a line\
            between 'start' and 'end' (specified as comma-separated 3-vectors in\
            scanner coordinates).
        start: resample tracks at 'num' equidistant locations along a line\
            between 'start' and 'end' (specified as comma-separated 3-vectors in\
            scanner coordinates).
        end: resample tracks at 'num' equidistant locations along a line\
            between 'start' and 'end' (specified as comma-separated 3-vectors in\
            scanner coordinates).
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "line",
        "num": num,
        "start": start,
        "end": end,
    }
    return params


def tckresample_line_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `TckresampleLineParamsDict` 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("num", None) is None:
        raise StyxValidationError("`num` must not be None")
    if not isinstance(params["num"], int):
        raise StyxValidationError(f'`num` has the wrong type: Received `{type(params.get("num", None))}` expected `int`')
    if params.get("start", None) is None:
        raise StyxValidationError("`start` must not be None")
    if not isinstance(params["start"], list):
        raise StyxValidationError(f'`start` has the wrong type: Received `{type(params.get("start", None))}` expected `list[float]`')
    for e in params["start"]:
        if not isinstance(e, (float, int)):
            raise StyxValidationError(f'`start` has the wrong type: Received `{type(params.get("start", None))}` expected `list[float]`')
    if params.get("end", None) is None:
        raise StyxValidationError("`end` must not be None")
    if not isinstance(params["end"], list):
        raise StyxValidationError(f'`end` has the wrong type: Received `{type(params.get("end", None))}` expected `list[float]`')
    for e in params["end"]:
        if not isinstance(e, (float, int)):
            raise StyxValidationError(f'`end` has the wrong type: Received `{type(params.get("end", None))}` expected `list[float]`')


def tckresample_line_cargs(
    params: TckresampleLineParamsDict,
    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("-line")
    cargs.append(str(params.get("num", None)))
    cargs.append(",".join(map(str, params.get("start", None))))
    cargs.append(",".join(map(str, params.get("end", None))))
    return cargs


def tckresample_arc(
    num: int,
    start: list[float],
    mid: list[float],
    end: list[float],
) -> TckresampleArcParamsDictTagged:
    """
    Build parameters.
    
    Args:
        num: resample tracks at 'num' equidistant locations along a circular\
            arc specified by points 'start', 'mid' and 'end' (specified as\
            comma-separated 3-vectors in scanner coordinates).
        start: resample tracks at 'num' equidistant locations along a circular\
            arc specified by points 'start', 'mid' and 'end' (specified as\
            comma-separated 3-vectors in scanner coordinates).
        mid: resample tracks at 'num' equidistant locations along a circular\
            arc specified by points 'start', 'mid' and 'end' (specified as\
            comma-separated 3-vectors in scanner coordinates).
        end: resample tracks at 'num' equidistant locations along a circular\
            arc specified by points 'start', 'mid' and 'end' (specified as\
            comma-separated 3-vectors in scanner coordinates).
    Returns:
        Parameter dictionary
    """
    params = {
        "@type": "arc",
        "num": num,
        "start": start,
        "mid": mid,
        "end": end,
    }
    return params


def tckresample_arc_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `TckresampleArcParamsDict` 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("num", None) is None:
        raise StyxValidationError("`num` must not be None")
    if not isinstance(params["num"], int):
        raise StyxValidationError(f'`num` has the wrong type: Received `{type(params.get("num", None))}` expected `int`')
    if params.get("start", None) is None:
        raise StyxValidationError("`start` must not be None")
    if not isinstance(params["start"], list):
        raise StyxValidationError(f'`start` has the wrong type: Received `{type(params.get("start", None))}` expected `list[float]`')
    for e in params["start"]:
        if not isinstance(e, (float, int)):
            raise StyxValidationError(f'`start` has the wrong type: Received `{type(params.get("start", None))}` expected `list[float]`')
    if params.get("mid", None) is None:
        raise StyxValidationError("`mid` must not be None")
    if not isinstance(params["mid"], list):
        raise StyxValidationError(f'`mid` has the wrong type: Received `{type(params.get("mid", None))}` expected `list[float]`')
    for e in params["mid"]:
        if not isinstance(e, (float, int)):
            raise StyxValidationError(f'`mid` has the wrong type: Received `{type(params.get("mid", None))}` expected `list[float]`')
    if params.get("end", None) is None:
        raise StyxValidationError("`end` must not be None")
    if not isinstance(params["end"], list):
        raise StyxValidationError(f'`end` has the wrong type: Received `{type(params.get("end", None))}` expected `list[float]`')
    for e in params["end"]:
        if not isinstance(e, (float, int)):
            raise StyxValidationError(f'`end` has the wrong type: Received `{type(params.get("end", None))}` expected `list[float]`')


def tckresample_arc_cargs(
    params: TckresampleArcParamsDict,
    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("-arc")
    cargs.append(str(params.get("num", None)))
    cargs.append(",".join(map(str, params.get("start", None))))
    cargs.append(",".join(map(str, params.get("mid", None))))
    cargs.append(",".join(map(str, params.get("end", None))))
    return cargs


def tckresample_config(
    key: str,
    value: str,
) -> TckresampleConfigParamsDictTagged:
    """
    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 tckresample_config_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `TckresampleConfigParamsDict` 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 tckresample_config_cargs(
    params: TckresampleConfigParamsDict,
    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


class TckresampleOutputs(typing.NamedTuple):
    """
    Output object returned when calling `TckresampleParamsDict(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    out_tracks: OutputPathType
    """the output resampled tracks"""


def tckresample_params(
    in_tracks: InputPathType,
    out_tracks: str,
    upsample: int | None = None,
    downsample: int | None = None,
    step_size: float | None = None,
    num_points: int | None = None,
    endpoints: bool = False,
    line: TckresampleLineParamsDict | None = None,
    arc: TckresampleArcParamsDict | None = None,
    info: bool = False,
    quiet: bool = False,
    debug: bool = False,
    force: bool = False,
    nthreads: int | None = None,
    config: list[TckresampleConfigParamsDict] | None = None,
    help_: bool = False,
    version: bool = False,
) -> TckresampleParamsDictTagged:
    """
    Build parameters.
    
    Args:
        in_tracks: the input track file.
        out_tracks: the output resampled tracks.
        upsample: increase the density of points along the length of each\
            streamline by some factor (may improve mapping streamlines to ROIs,\
            and/or visualisation).
        downsample: increase the density of points along the length of each\
            streamline by some factor (decreases required storage space).
        step_size: re-sample the streamlines to a desired step size (in mm).
        num_points: re-sample each streamline to a fixed number of points.
        endpoints: only output the two endpoints of each streamline.
        line: resample tracks at 'num' equidistant locations along a line\
            between 'start' and 'end' (specified as comma-separated 3-vectors in\
            scanner coordinates).
        arc: resample tracks at 'num' equidistant locations along a circular\
            arc specified by points 'start', 'mid' and 'end' (specified as\
            comma-separated 3-vectors in scanner coordinates).
        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/tckresample",
        "endpoints": endpoints,
        "info": info,
        "quiet": quiet,
        "debug": debug,
        "force": force,
        "help": help_,
        "version": version,
        "in_tracks": in_tracks,
        "out_tracks": out_tracks,
    }
    if upsample is not None:
        params["upsample"] = upsample
    if downsample is not None:
        params["downsample"] = downsample
    if step_size is not None:
        params["step_size"] = step_size
    if num_points is not None:
        params["num_points"] = num_points
    if line is not None:
        params["line"] = line
    if arc is not None:
        params["arc"] = arc
    if nthreads is not None:
        params["nthreads"] = nthreads
    if config is not None:
        params["config"] = config
    return params


def tckresample_validate(
    params: typing.Any,
) -> None:
    """
    Validate parameters. Throws an error if `params` is not a valid
    `TckresampleParamsDict` 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("upsample", None) is not None:
        if not isinstance(params["upsample"], int):
            raise StyxValidationError(f'`upsample` has the wrong type: Received `{type(params.get("upsample", None))}` expected `int | None`')
    if params.get("downsample", None) is not None:
        if not isinstance(params["downsample"], int):
            raise StyxValidationError(f'`downsample` has the wrong type: Received `{type(params.get("downsample", None))}` expected `int | None`')
    if params.get("step_size", None) is not None:
        if not isinstance(params["step_size"], (float, int)):
            raise StyxValidationError(f'`step_size` has the wrong type: Received `{type(params.get("step_size", None))}` expected `float | None`')
    if params.get("num_points", None) is not None:
        if not isinstance(params["num_points"], int):
            raise StyxValidationError(f'`num_points` has the wrong type: Received `{type(params.get("num_points", None))}` expected `int | None`')
    if params.get("endpoints", False) is None:
        raise StyxValidationError("`endpoints` must not be None")
    if not isinstance(params["endpoints"], bool):
        raise StyxValidationError(f'`endpoints` has the wrong type: Received `{type(params.get("endpoints", False))}` expected `bool`')
    if params.get("line", None) is not None:
        tckresample_line_validate(params["line"])
    if params.get("arc", None) is not None:
        tckresample_arc_validate(params["arc"])
    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[TckresampleConfigParamsDict] | None`')
        for e in params["config"]:
            tckresample_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("in_tracks", None) is None:
        raise StyxValidationError("`in_tracks` must not be None")
    if not isinstance(params["in_tracks"], (pathlib.Path, str)):
        raise StyxValidationError(f'`in_tracks` has the wrong type: Received `{type(params.get("in_tracks", None))}` expected `InputPathType`')
    if params.get("out_tracks", None) is None:
        raise StyxValidationError("`out_tracks` must not be None")
    if not isinstance(params["out_tracks"], str):
        raise StyxValidationError(f'`out_tracks` has the wrong type: Received `{type(params.get("out_tracks", None))}` expected `str`')


def tckresample_cargs(
    params: TckresampleParamsDict,
    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("tckresample")
    if params.get("upsample", None) is not None:
        cargs.extend([
            "-upsample",
            str(params.get("upsample", None))
        ])
    if params.get("downsample", None) is not None:
        cargs.extend([
            "-downsample",
            str(params.get("downsample", None))
        ])
    if params.get("step_size", None) is not None:
        cargs.extend([
            "-step_size",
            str(params.get("step_size", None))
        ])
    if params.get("num_points", None) is not None:
        cargs.extend([
            "-num_points",
            str(params.get("num_points", None))
        ])
    if params.get("endpoints", False):
        cargs.append("-endpoints")
    if params.get("line", None) is not None:
        cargs.extend(tckresample_line_cargs(params.get("line", None), execution))
    if params.get("arc", None) is not None:
        cargs.extend(tckresample_arc_cargs(params.get("arc", None), execution))
    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 [tckresample_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.append(execution.input_file(params.get("in_tracks", None)))
    cargs.append(params.get("out_tracks", None))
    return cargs


def tckresample_outputs(
    params: TckresampleParamsDict,
    execution: Execution,
) -> TckresampleOutputs:
    """
    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 = TckresampleOutputs(
        root=execution.output_file("."),
        out_tracks=execution.output_file(params.get("out_tracks", None)),
    )
    return ret


def tckresample_execute(
    params: TckresampleParamsDict,
    runner: Runner | None = None,
) -> TckresampleOutputs:
    """
    tckresample
    
    Resample each streamline in a track file to a new set of vertices.
    
    It is necessary to specify precisely ONE of the command-line options for
    controlling how this resampling takes place; this may be either increasing
    or decreasing the number of samples along each streamline, or may involve
    changing the positions of the samples according to some specified
    trajectory.
    
    Note that because the length of a streamline is calculated based on the sums
    of distances between adjacent vertices, resampling a streamline to a new set
    of vertices will typically change the quantified length of that streamline;
    the magnitude of the difference will typically depend on the discrepancy in
    the number of vertices, with less vertices leading to a shorter length (due
    to taking chordal lengths of curved trajectories).
    
    References:
    
    .
    
    Author: MRTrix3 Developers
    
    URL: https://www.mrtrix.org/
    
    Args:
        params: The parameters.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `TckresampleOutputs`).
    """
    tckresample_validate(params)
    runner = runner or get_global_runner()
    execution = runner.start_execution(TCKRESAMPLE_METADATA)
    params = execution.params(params)
    cargs = tckresample_cargs(params, execution)
    ret = tckresample_outputs(params, execution)
    execution.run(cargs)
    return ret


def tckresample(
    in_tracks: InputPathType,
    out_tracks: str,
    upsample: int | None = None,
    downsample: int | None = None,
    step_size: float | None = None,
    num_points: int | None = None,
    endpoints: bool = False,
    line: TckresampleLineParamsDict | None = None,
    arc: TckresampleArcParamsDict | None = None,
    info: bool = False,
    quiet: bool = False,
    debug: bool = False,
    force: bool = False,
    nthreads: int | None = None,
    config: list[TckresampleConfigParamsDict] | None = None,
    help_: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> TckresampleOutputs:
    """
    tckresample
    
    Resample each streamline in a track file to a new set of vertices.
    
    It is necessary to specify precisely ONE of the command-line options for
    controlling how this resampling takes place; this may be either increasing
    or decreasing the number of samples along each streamline, or may involve
    changing the positions of the samples according to some specified
    trajectory.
    
    Note that because the length of a streamline is calculated based on the sums
    of distances between adjacent vertices, resampling a streamline to a new set
    of vertices will typically change the quantified length of that streamline;
    the magnitude of the difference will typically depend on the discrepancy in
    the number of vertices, with less vertices leading to a shorter length (due
    to taking chordal lengths of curved trajectories).
    
    References:
    
    .
    
    Author: MRTrix3 Developers
    
    URL: https://www.mrtrix.org/
    
    Args:
        in_tracks: the input track file.
        out_tracks: the output resampled tracks.
        upsample: increase the density of points along the length of each\
            streamline by some factor (may improve mapping streamlines to ROIs,\
            and/or visualisation).
        downsample: increase the density of points along the length of each\
            streamline by some factor (decreases required storage space).
        step_size: re-sample the streamlines to a desired step size (in mm).
        num_points: re-sample each streamline to a fixed number of points.
        endpoints: only output the two endpoints of each streamline.
        line: resample tracks at 'num' equidistant locations along a line\
            between 'start' and 'end' (specified as comma-separated 3-vectors in\
            scanner coordinates).
        arc: resample tracks at 'num' equidistant locations along a circular\
            arc specified by points 'start', 'mid' and 'end' (specified as\
            comma-separated 3-vectors in scanner coordinates).
        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 `TckresampleOutputs`).
    """
    params = tckresample_params(
        upsample=upsample,
        downsample=downsample,
        step_size=step_size,
        num_points=num_points,
        endpoints=endpoints,
        line=line,
        arc=arc,
        info=info,
        quiet=quiet,
        debug=debug,
        force=force,
        nthreads=nthreads,
        config=config,
        help_=help_,
        version=version,
        in_tracks=in_tracks,
        out_tracks=out_tracks,
    )
    return tckresample_execute(params, runner)


__all__ = [
    "TCKRESAMPLE_METADATA",
    "TckresampleArcParamsDict",
    "TckresampleArcParamsDictTagged",
    "TckresampleConfigParamsDict",
    "TckresampleConfigParamsDictTagged",
    "TckresampleLineParamsDict",
    "TckresampleLineParamsDictTagged",
    "TckresampleOutputs",
    "TckresampleParamsDict",
    "TckresampleParamsDictTagged",
    "tckresample",
    "tckresample_arc",
    "tckresample_config",
    "tckresample_execute",
    "tckresample_line",
    "tckresample_params",
]
