Exemple #1
0
 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
Exemple #2
0
 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
Exemple #3
0
    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
        self.configure_input(fil, convert_to_poly_data(inputs[0].outputs[0]))
        fil.update()
        self._set_outputs([fil])
    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
        self.configure_input(fil, convert_to_poly_data(inputs[0].outputs[0]))
        fil.update()
        self._set_outputs([fil.output])
Exemple #5
0
 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)
         self.configure_input_data(cf, inp)
     else:
         self.configure_connection(cf, self.inputs[0])
     cf.update()
     return cf
Exemple #6
0
    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]
        self.configure_input_data(f, convert_to_poly_data(input))
        f.update()
        self.outputs = [f.output]
Exemple #7
0
    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]
        self.configure_input_data(f, convert_to_poly_data(input))
        f.update()
        self.outputs = [f.output]