brainspace.vtk_interface.wrappers.algorithm.BSDataSetMapper¶
-
class
brainspace.vtk_interface.wrappers.algorithm.BSDataSetMapper(vtkobject=None, **kwargs)[source]¶ Wrapper for vtkDataSetMapper.
-
__init__(vtkobject=None, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
SetArrayId(idx)Set array id. SetArrayName(name)Set array id. SetColorTransferFunction([obj])Set lookup table using a ColorTransferFunction. SetDiscretizableColorTransferFunction([obj])Set lookup table using a DiscretizableColorTransferFunction. SetLookupTable([obj])Set lookup table. SetLookupTableWithEnabling([obj])Set lookup table using a LookupTableWithEnabling. SetWindowLevelLookupTable([obj])Set lookup table using a WindowLevelLookupTable. __init__([vtkobject])Initialize self. getVTK(*args, **kwargs)Invoke get methods on the vtk object. setVTK(*args, **kwargs)Invoke set methods on the vtk object. Attributes
is_filterReturns True if self is a filter. is_sinkReturns True if self is a sink. is_sourceReturns True if self is a source. nicReturns number of total input connections nipReturns number of input ports nopReturns number of output ports vtk_mapDictionary of vtk setter and getter methods. -
SetArrayId(idx)¶ Set array id.
Wraps the SetArrayId method of vtkMapper such that the access mode is changed to accept setting the array id.
Parameters: idx (int) – Array id.
-
SetArrayName(name)¶ Set array id.
Wraps the SetArrayName method of vtkMapper such that the access mode is changed to accept setting the array name.
Parameters: name (str) – Array name.
-
SetColorTransferFunction(obj=None, **kwargs)¶ Set lookup table using a ColorTransferFunction.
Parameters: - obj (vtkColorTransferFunction or BSColorTransferFunction, optional) – Lookup table. If None, the color transfer function is created. Default is None.
- kwargs (optional keyword arguments) – Arguments are used to set the lookup table.
-
SetDiscretizableColorTransferFunction(obj=None, **kwargs)¶ Set lookup table using a DiscretizableColorTransferFunction.
Parameters: - obj (vtkDiscretizableColorTransferFunction or) – BSDiscretizableColorTransferFunction, optional Lookup table. If None, the discretizable color transfer function is created. Default is None.
- kwargs (optional keyword arguments) – Arguments are used to set the lookup table.
-
SetLookupTable(obj=None, **kwargs)¶ Set lookup table.
Wraps the SetLookupTable method of vtkMapper to accept a vtkLookupTable or BSLookupTable.
Parameters: - obj (vtkLookupTable or BSLookupTable, optional) – Lookup table. If None, a LookupTable is created. Default is None.
- kwargs (optional keyword arguments) – Arguments are used to set the lookup table.
-
SetLookupTableWithEnabling(obj=None, **kwargs)¶ Set lookup table using a LookupTableWithEnabling.
Parameters: - obj (vtkLookupTableWithEnabling or BSLookupTableWithEnabling, optional) – Lookup table. If None, the lut is created. Default is None.
- kwargs (optional keyword arguments) – Arguments are used to set the lookup table.
-
SetWindowLevelLookupTable(obj=None, **kwargs)¶ Set lookup table using a WindowLevelLookupTable.
Parameters: - obj (vtkWindowLevelLookupTable or BSWindowLevelLookupTable, optional) – Lookup table. If None, the lut is created. Default is None.
- kwargs (optional keyword arguments) – Arguments are used to set the lookup table.
-
getVTK(*args, **kwargs)¶ Invoke get methods on the vtk object.
Parameters: - args (list of str) – Method that require no arguments.
- kwargs (list of keyword-value arguments) – key-word arguments can be use for methods that require arguments. When several arguments are required, use a tuple. Methods that require no arguments can also be used here using None as the argument.
Returns: results (dict) – Dictionary of results where the keys are the method names and the values the results.
Examples
>>> import vtk >>> from brainspace.vtk_interface.wrappers import BSVTKObjectWrapper >>> m1 = BSVTKObjectWrapper(vtk.vtkPolyDataMapper()) >>> m1.getVTK('arrayId', colorModeAsString=None) {'arrayId': -1, 'colorModeAsString': 'Default'} >>> m1.getVTK('colorModeAsString', arrayId=None) {'colorModeAsString': 'Default', 'arrayId': -1} >>> m1.getVTK(numberOfInputConnections=0) {'numberOfInputConnections': 0}
-
is_filter¶ Returns True if self is a filter. False, otherwise.
A filter that is not a source nor a sink.
Type: bool
-
setVTK(*args, **kwargs)¶ Invoke set methods on the vtk object.
Parameters: - args (list of str) – Setter methods that require no arguments.
- kwargs (list of keyword-value arguments) – key-word arguments can be use for methods that require arguments. When several arguments are required, use a tuple. Methods that require no arguments can also be used here using None as the argument.
Returns: self (BSVTKObjectWrapper object) – Return self.
Examples
>>> import vtk >>> from brainspace.vtk_interface.wrappers import BSVTKObjectWrapper >>> m1 = BSVTKObjectWrapper(vtk.vtkPolyDataMapper()) >>> m1.setVTK(arrayId=3, colorMode='mapScalars') <brainspace.vtk_interface.base.BSVTKObjectWrapper at 0x7f38a4ace320> >>> m1.arrayId 3 >>> m1.colorModeAsString 'MapScalars'
-