<s> import itk <EOL> import core . modules <EOL> import core . modules . module_registry <EOL> from core . modules . vistrails_module import Module , ModuleError <EOL> from ITK import * <EOL> from PixelType import * <EOL> class Image ( Module , ITK ) : <EOL> my_namespace = "<STR_LIT>" <EOL> def getPixelType ( self ) : <EOL> return self . _type <EOL> def getDim ( self ) : <EOL> return self . dim <EOL> def getImg ( self ) : <EOL> return self . inIm <EOL> def setImg ( self , img ) : <EOL> self . inIm = img <EOL> def setDim ( self , dim ) : <EOL> self . dim = dim <EOL> def setPixelType ( self , pt ) : <EOL> self . _type = pt <EOL> def compute ( self ) : <EOL> self . inIm = self . get_input ( "<STR_LIT>" ) <EOL> self . dim = self . get_input ( "<STR_LIT>" ) <EOL> self . _type = self . get_input ( "<STR_LIT>" ) <EOL> self . set_output ( "<STR_LIT>" , self ) <EOL> @ classmethod <EOL> def register ( cls , reg , basic ) : <EOL> reg . add_module ( cls , name = "<STR_LIT>" , namespace = cls . my_namespace ) <EOL> reg . add_input_port ( cls , "<STR_LIT>" , ( PixelType , '<STR_LIT>' ) ) <EOL> reg . add_input_port ( cls , "<STR_LIT>" , ( basic . Integer , '<STR_LIT>' ) ) <EOL> reg . add_input_port ( cls , "<STR_LIT>" , ( Image , '<STR_LIT>' ) ) <EOL> reg . add_output_port ( cls , "<STR_LIT>" , ( Image , '<STR_LIT>' ) ) </s>
