#NEWLINE# def update_pipeline( self ) : #NEWLINE# #INDENT# 'Override this method so that it *updates* the tvtk pipeline\n        when data upstream is known to have changed.\n\n        This method is invoked (automatically) when the input fires a\n        `pipeline_changed` event.\n        ' #NEWLINE# if ( len ( self . inputs ) == 0 ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# input = self . inputs [ 0 ] . get_output_dataset ( ) #NEWLINE# plane = None #NEWLINE# if input . is_a ( 'vtkStructuredGrid' ) : #NEWLINE# #INDENT# plane = tvtk . StructuredGridGeometryFilter ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( input . is_a ( 'vtkStructuredPoints' ) or input . is_a ( 'vtkImageData' ) ) : #NEWLINE# #INDENT# plane = tvtk . ImageDataGeometryFilter ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if input . is_a ( 'vtkRectilinearGrid' ) : #NEWLINE# #INDENT# plane = tvtk . RectilinearGridGeometryFilter ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = ( 'The GridPlane component does not support the %s dataset.' % input . class_name ) #NEWLINE# error ( msg ) #NEWLINE# raise TypeError ( msg ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . configure_connection ( plane , self . inputs [ 0 ] ) #NEWLINE# self . plane = x #NEWLINE# self . plane . update ( ) #NEWLINE# self . outputs = [ plane ] #NEWLINE# self . _update_limits ( ) #NEWLINE# self . _update_extents ( ) #NEWLINE# extents = list ( _get_extent ( input ) ) #NEWLINE# diff = [ ( y - x ) for ( x , y ) in zip ( extents [ : : 2 ] , extents [ 1 : : 2 ] ) ] #NEWLINE# if ( diff . count ( 0 ) > 0 ) : #NEWLINE# #INDENT# self . axis = [ 'x' , 'y' , 'z' ] [ diff . index ( 0 ) ]