How to use the brainspace.vtk_interface.wrappers.BSAlgorithm function in brainspace

To help you get started, we’ve selected a few brainspace examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MICA-MNI / BrainSpace / brainspace / vtk_interface / wrappers.py View on Github external
    @n_values.setter
    def n_values(self, n):
        self.VTKObject.SetNumberOfTableValues(n)

    @property
    def n_colors(self):
        """int: Returns number of colors."""
        return self.VTKObject.GetNumberOfColors()

    @n_colors.setter
    def n_colors(self, n):
        self.VTKObject.SetNumberOfColors(n)


class BSMapper(BSAlgorithm):
    """Wrapper for vtkMapper."""
    def __init__(self, vtkobject=None, **kwargs):
        super().__init__(vtkobject=vtkobject, **kwargs)

    # @wrap_output
    # def GetInput(self):
    #     """Get input.
    #
    #     Wraps the `GetInput` method of `vtkMapper` to return a
    #     wrapped object.
    #
    #     Returns
    #     -------
    #     data : BSVTKObjectWrapper
    #         Data object after wrapping.
    #     """
github MICA-MNI / BrainSpace / brainspace / vtk_interface / wrappers.py View on Github external
return BSTexturedActor2D(obj)

    if isinstance(obj, vtk.vtkActor2D):
        return BSActor2D(obj)

    if isinstance(obj, vtk.vtkMapper):
        return BSMapper(obj)

    if isinstance(obj, vtk.vtkLookupTable):
        return BSLookupTable(obj)

    if isinstance(obj, vtk.vtkDataSet):
        return BSDataSet(obj)

    if isinstance(obj, vtk.vtkAlgorithm):
        return BSAlgorithm(obj)

    # Fall back to generic wrapper
    return BSVTKObjectWrapper(obj)