Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@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.
# """
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)