def _set_contour_input(self): """Sets the input to the appropriate contour filter and returns the currently used contour filter. """ inp = self.inputs[0].outputs[0] cf = self.contour_filter if self.filled_contours: inp = convert_to_poly_data(inp) cf.input = inp cf.update() return cf
def update_pipeline(self): # Do nothing if there is no input. inputs = self.inputs if len(inputs) == 0: return # By default we set the input to the first output of the first # input. fil = self.filter fil.input = convert_to_poly_data(inputs[0].outputs[0]) fil.update() self._set_outputs([fil.output])
def 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 the input fires a `pipeline_changed` event. """ if (len(self.inputs) == 0) or \ (len(self.inputs[0].outputs) == 0): return f = self.filter input = self.inputs[0].outputs[0] f.input = convert_to_poly_data(input) f.update() self.outputs = [f.output]