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

import typing
import pathlib
from styxdefs import *
import dataclasses

BORDER_RESAMPLE_METADATA = Metadata(
    id="dd380b1e5e4fe1855828015b5097f5b06fb67827.boutiques",
    name="border-resample",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


class BorderResampleOutputs(typing.NamedTuple):
    """
    Output object returned when calling `border_resample(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    border_out: OutputPathType
    """the output border file"""


def border_resample(
    border_in: InputPathType,
    current_sphere: InputPathType,
    new_sphere: InputPathType,
    border_out: str,
    runner: Runner | None = None,
) -> BorderResampleOutputs:
    """
    Resample a border file to a different mesh.
    
    Resamples a border file, given two spherical surfaces that are in register.
    Only borders that have the same structure as current-sphere will be
    resampled.
    
    Author: Washington University School of Medicin
    
    Args:
        border_in: the border file to resample.
        current_sphere: a sphere surface with the mesh that the metric is\
            currently on.
        new_sphere: a sphere surface that is in register with <current-sphere>\
            and has the desired output mesh.
        border_out: the output border file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `BorderResampleOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(BORDER_RESAMPLE_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-border-resample")
    cargs.append(execution.input_file(border_in))
    cargs.append(execution.input_file(current_sphere))
    cargs.append(execution.input_file(new_sphere))
    cargs.append(border_out)
    ret = BorderResampleOutputs(
        root=execution.output_file("."),
        border_out=execution.output_file(border_out),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "BORDER_RESAMPLE_METADATA",
    "BorderResampleOutputs",
    "border_resample",
]
