<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 PixelType <EOL> class PixelTypeFloat ( Module ) : <EOL> my_namespace = "<STR_LIT>" <EOL> def compute ( self ) : <EOL> self . _type = itk . F <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_output_port ( cls , "<STR_LIT>" , ( PixelType , '<STR_LIT>' ) ) <EOL> class PixelTypeUnsignedChar ( Module ) : <EOL> my_namespace = "<STR_LIT>" <EOL> def compute ( self ) : <EOL> self . _type = itk . UC <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_output_port ( cls , "<STR_LIT>" , ( PixelType , '<STR_LIT>' ) ) <EOL> class PixelTypeUnsignedShort ( Module ) : <EOL> my_namespace = "<STR_LIT>" <EOL> def compute ( self ) : <EOL> self . _type = itk . US <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_output_port ( cls , "<STR_LIT>" , ( PixelType , '<STR_LIT>' ) ) <EOL> class PixelTypeRGB ( Module ) : <EOL> my_namespace = "<STR_LIT>" <EOL> def compute ( self ) : <EOL> self . _type = itk . RGBPixel [ itk . US ] <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_output_port ( cls , "<STR_LIT>" , ( PixelType , '<STR_LIT>' ) ) </s>
