Inherits from
- Source: enthought.mayavi.core.source.Source
Attributes
- image_data
The image data stored by this instance.
image_data = Instance(tvtk.ImageData, allow_none = False)
- origin
The origin of the points in the array.
origin = Array(dtype = float, shape = (3), value = (0.0, 0.0, 0.0), desc = 'the origin of the points in array')
- output_info
Information about what this object can produce.
output_info = PipelineInfo(datasets = [ 'image_data' ])
- scalar_data
The scalar array data we manage.
scalar_data = Trait(None, _check_scalar_array, rich_compare = False)
- scalar_name
The name of our scalar array.
scalar_name = Str('scalar')
- spacing
The spacing of the points in the array.
spacing = Array(dtype = float, shape = (3), value = (1.0, 1.0, 1.0), desc = 'the spacing between points in array')
- transpose_input_array
Should we transpose the input data or not. Transposing is necessary to make the numpy array compatible with the way VTK needs it. However, transposing numpy arrays makes them non-contiguous where the data is copied by VTK. Thus, when the user explicitly requests that transpose_input_array is false then we assume that the array has already been suitably formatted by the user.
transpose_input_array = Bool(True, desc = 'if input array should be transposed (if on VTK will copy the input data)')
- update_image_data
Fire an event to update the spacing and origin - this reflushes the pipeline.
update_image_data = Button('Update spacing and origin')
- vector_data
The vector array data we manage.
vector_data = Trait(None, _check_vector_array, rich_compare = False)
- vector_name
The name of our vector array.
vector_name = Str('vector')
- view
Our view.
view = View(Group(Item(name = 'transpose_input_array'), Item(name = 'scalar_name'), Item(name = 'vector_name'), Item(name = 'spacing'), Item(name = 'origin'), Item(name = 'update_image_data', show_label = False), show_labels = True))
Inherited from base classes
Method summary
- __get_pure_state__(self)
- __init__(self, **traits)
- update(self)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __icon_path_default(self)
- __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_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_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- render(self)
- 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_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_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)
- __init__(self, **traits)
- update(self)
Call this function when you change the array data in-place.