예제 #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
예제 #2
0
파일: contour.py 프로젝트: sjl421/code-2
 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
예제 #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
        fil.input = convert_to_poly_data(inputs[0].outputs[0])
        fil.update()
        self._set_outputs([fil.output])
예제 #4
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
        fil.input = convert_to_poly_data(inputs[0].outputs[0])
        fil.update()
        self._set_outputs([fil.output])
예제 #5
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]
        f.input = convert_to_poly_data(input)
        f.update()
        self.outputs = [f.output]
예제 #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]
        f.input = convert_to_poly_data(input)
        f.update()
        self.outputs = [f.output]