def 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. """ # Create the objects and set them up. self.implicit_plane = ImplicitPlane() self.cutter = Cutter() self.glyph = Glyph(module=self, scale_mode='scale_by_vector', color_mode='color_by_vector', show_scale_mode=False) self.glyph.glyph_source.glyph_position = 'tail' actor = self.actor = Actor() actor.mapper.scalar_visibility = 1 actor.property.trait_set(line_width=2, backface_culling=False, frontface_culling=False)
def 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. """ # Create the objects and set them up. self.implicit_plane = ImplicitPlane() self.cutter = Cutter() self.warp_vector = WarpVector() self.normals = PolyDataNormals() actor = self.actor = Actor() actor.mapper.scalar_visibility = 1
def 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. """ # Create the components and set them up. self.implicit_plane = ImplicitPlane() ex = tvtk.ExtractGeometry(extract_only_boundary_cells=1, extract_boundary_cells=1) self.extract_geometry = ex self.geom_filter = tvtk.GeometryFilter() # Setup the actor suitably for this module. self.actor = Actor() self.actor.property.representation = 'w'
def 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. """ # Create the objects. self.implicit_plane = ImplicitPlane() self.cutter = Cutter() self.contour = Contour(auto_contours=True, number_of_contours=10) self.warp_scalar = WarpScalar() self.normals = PolyDataNormals() self.actor = Actor() # Setup the actor suitably for this module. prop = self.actor.property prop.line_width = 2.0
def setup_pipeline(self): """Creates the pipeline.""" ip = ImplicitPlane() cut = Cutter(cut_function=ip.plane) self.filters = [ip, cut]