#NEWLINE# def compute( self ) : #NEWLINE# #INDENT# vtk_object = None #NEWLINE# if self . has_input ( 'SetInputConnection0' ) : #NEWLINE# #INDENT# ic = self . get_input ( 'SetInputConnection0' ) #NEWLINE# port_object = ic . vtkInstance #NEWLINE# ix = port_object . GetIndex ( ) #NEWLINE# producer = port_object . GetProducer ( ) #NEWLINE# try : #NEWLINE# #INDENT# vtk_object = producer . GetOutput ( ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# raise ModuleError ( self , 'expected a module that supports GetOutput' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if self . has_input ( 'SetInput' ) : #NEWLINE# #INDENT# port_object = self . get_input ( 'SetInput' ) #NEWLINE# if hasattr ( producer , 'vtkInstance' ) : #NEWLINE# #INDENT# vtk_object = port_object . vtkInstance #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ModuleError ( self , 'expected a vtk module' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if vtk_object : #NEWLINE# #INDENT# self . auto_set_results ( vtk_object )