Inherits from
- Component: enthought.mayavi.core.component.Component
Attributes
- color_mode
The color mode to use when coloring the glyphs. We could have used the glyph's own color_mode trait but it allows users to set the mode to use vector components for the scaling which I'd like to disallow.
color_mode = Trait('color_by_scalar', TraitRevPrefixMap({ Const('color_by_vector') : Const(2), Const('color_by_scalar') : Const(1), Const('no_coloring') : Const(0) }), desc = 'if coloring is done by scalar or vector/normal magnitude')
- color_mode_tensor
color_mode_tensor = Trait('scalar', TraitRevPrefixMap({ Const('scalars') : Const(1), Const('eigenvalues') : Const(2), Const('no_coloring') : Const(0) }), desc = 'if coloring is done by scalar or eigenvalues')
- glyph
The Glyph3D instance.
glyph = Instance(tvtk.Object, allow_none = False, record = True)
- glyph_source
The Source to use for the glyph. This is chosen from self._glyph_list or self.glyph_dict.
glyph_source = Instance(glyph_source.GlyphSource, allow_none = False, record = True)
- glyph_type
Type of Glyph: 'tensor' or 'vector'
glyph_type = Enum('vector', 'tensor', desc = 'if the glyph is vector or tensor')
- mask_input_points
Specify if the input points must be masked. By mask we mean that only a subset of the input points must be displayed.
mask_input_points = Bool(False, desc = 'if input points are masked')
- mask_points
The MaskPoints filter.
mask_points = Instance(tvtk.MaskPoints, args = (), kw = { Const('random_mode') : Name('True') }, record = True)
- module
The module associated with this component. This is used to get the data range of the glyph when the scale mode changes. This must be set if this module is to work correctly.
module = Instance(Module)
- scale_mode
The scaling mode to use when scaling the glyphs. We could have used the glyph's own scale mode but it allows users to set the mode to use vector components for the scaling which I'd like to disallow.
scale_mode = Trait('scale_by_scalar', TraitRevPrefixMap({ Const('scale_by_vector') : Const(1), Const('data_scaling_off') : Const(3), Const('scale_by_scalar') : Const(0) }), desc = 'if scaling is done using scalar or vector/normal magnitude')
- show_scale_mode
Should we show the GUI option for changing the scalar mode or not? This is useful for vector glyphing modules where there it does not make sense to scale the data based on scalars.
show_scale_mode = Bool(True)
- view
view = View(Group(Item(name = 'mask_input_points'), Group(Item(name = 'mask_points', enabled_when = 'object.mask_input_points', style = 'custom', resizable = True), show_labels = False), label = 'Masking'), Group(Group(Item(name = 'scale_mode', enabled_when = 'show_scale_mode', visible_when = 'show_scale_mode'), Item(name = 'color_mode', enabled_when = 'glyph_type == "vector"', visible_when = 'glyph_type == "vector"'), Item(name = 'color_mode_tensor', enabled_when = 'glyph_type == "tensor"', visible_when = 'glyph_type == "tensor"')), Group(Item(name = 'glyph', style = 'custom', resizable = True), show_labels = False), label = 'Glyph', selected = True), Group(Item(name = 'glyph_source', style = 'custom', resizable = True), show_labels = False, label = 'Glyph Source'), resizable = True)
Inherited from base classes
Method summary
- __get_pure_state__(self)
- render(self)
- setup_pipeline(self)
- start(self)
- stop(self)
- update_data(self)
- update_pipeline(self)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __icon_path_default(self)
- __init__(self, **traits)
- __menu_default(self)
- __module_view_default(self)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, str_state)
- __view_filename_default(self)
- add_actors(self)
- add_child(self, child)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- dialog_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- has_traits_interface(self, *interfaces)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove(self)
- remove_actors(self)
- remove_child(self, child)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- tno_allows_children(self, node)
- tno_append_child(self, node, child)
- tno_can_add(self, node, add_object)
- tno_can_auto_close(self, node)
- tno_can_auto_open(self, node)
- tno_can_copy(self, node)
- tno_can_delete(self, node)
- tno_can_delete_me(self, node)
- tno_can_insert(self, node)
- tno_can_rename(self, node)
- tno_can_rename_me(self, node)
- tno_click(self, node)
- tno_confirm_delete(self, node)
- tno_dclick(self, node)
- tno_delete_child(self, node, index)
- tno_drop_object(self, node, dropped_object)
- tno_get_add(self, node)
- tno_get_children(self, node)
- tno_get_children_id(self, node)
- tno_get_drag_object(self, node)
- tno_get_icon(self, node, is_expanded)
- tno_get_icon_path(self, node)
- tno_get_label(self, node)
- tno_get_menu(self, node)
- tno_get_name(self, node)
- tno_get_tooltip(self, node)
- tno_get_view(self, node)
- tno_has_children(self, node)
- tno_insert_child(self, node, index, child)
- tno_is_node_for(self, node)
- tno_select(self, node)
- tno_set_label(self, node, label)
- tno_when_children_changed(self, node, listener, remove)
- tno_when_children_replaced(self, node, listener, remove)
- tno_when_label_changed(self, node, listener, remove)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- __get_pure_state__(self)
- render(self)
- setup_pipeline(self)
Override this method so that it creates the tvtk pipeline.
This method is invoked when the object is initialized via __init__. Note that at the time this method is called, the tvtk data pipeline will not yet be setup. So upstream data will not be available. The idea is that you simply create the basic objects and setup those parts of the pipeline not dependent on upstream sources and filters. You should also set the actors attribute up at this point.
- start(self)
Overridden method.
- stop(self)
- update_data(self)
Override this method so that it flushes the vtk pipeline if that is necessary.
This method is invoked (automatically) when any of the inputs sends a data_changed event.
- update_pipeline(self)
Override this method so that it updates the tvtk pipeline when data upstream is known to have changed.
This method is invoked (automatically) when any of the inputs sends a pipeline_changed event.