#NEWLINE# def update_pipeline( self ) : #NEWLINE# #INDENT# inputs = self . inputs #NEWLINE# if ( len ( inputs ) == 0 ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# input = inputs [ 0 ] . get_output_dataset ( ) #NEWLINE# mapping = { #NEWLINE# #INDENT# 'vtkStructuredGrid' : tvtk . ExtractGrid , #NEWLINE# 'vtkRectilinearGrid' : tvtk . ExtractRectilinearGrid , #NEWLINE# 'vtkImageData' : tvtk . ExtractVOI , #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , klass ) in mapping . items ( ) : #NEWLINE# #INDENT# if input . is_a ( key ) : #NEWLINE# #INDENT# self . filter = klass ( ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# error ( ( 'This filter does not support %s objects' % input . __class__ . __name__ ) ) #NEWLINE# return #NEWLINE# #UNINDENT# fil = klass . filter #NEWLINE# self . configure_connection ( fil , inputs [ 0 ] ) #NEWLINE# fil . update_whole_extent ( ) #NEWLINE# fil . update ( ) #NEWLINE# self . _set_outputs ( [ fil ] ) #NEWLINE# self . _update_limits ( ) #NEWLINE# self . _update_voi ( ) #NEWLINE# self . _update_sample_rate ( )