#NEWLINE# @ filter_method ( BaseFilter . PositiveNumber , BaseFilter . DecimalNumber ) #NEWLINE# def blur( self , radius , sigma = 0 ) : #NEWLINE# #INDENT# if ( sigma == 0 ) : #NEWLINE# #INDENT# sigma = radius #NEWLINE# #UNINDENT# if ( radius > MAX_RADIUS ) : #NEWLINE# #INDENT# radius = MAX_RADIUS #NEWLINE# #UNINDENT# ( matrix , matrix_size ) = self . generate_1d_matrix ( sigma , radius ) #NEWLINE# ( mode , data ) = self . engine . image_data_as_rgb ( ) #NEWLINE# imgdata = _convolution . apply ( mode , data , self . engine . size [ 0 ] , self . engine . size [ 1 ] , matrix , sigma , True ) #NEWLINE# imgdata = _convolution . apply ( mode , imgdata , self . engine . size [ 0 ] , self . engine . size [ 1 ] , matrix , 1 , True ) #NEWLINE# self . engine . set_image_data ( imgdata )