JAI Image smoothing

I have been working on this project for Image smoothing of 2D grainy Images. Here is a code snippet of Image smoothing using JAI median filter algorithm. The amount of smoothing is controlled by the masksize variable mentioned in the static create method of MedianFilterDescriptor class. This class also provides 4 different types of MedianFilterShape for different masking patterns on the Image : MEDIAN_MASK_SQUARE, MEDIAN_MASK_PLUS, MEDIAN_MASK_X and MEDIAN_MASK_SQUARE_SEPARABLE.