private void smoothingFilter(int rad) {
			int size = 2*rad+1;
			float []  k = getBlurKernel(2*rad+1);

			for (int y=0; y < height; y++) {
				for (int x=0; x < width; x++) {
					int i = y*width + x;

					if (plotList[i] != null) {

						float sum = 0;
						float n = 0;
						for (int dy = -rad, ky = 0; dy<=rad; dy++, ky+=size ){

							int y_ = Math.max(Math.min(y+dy,height-1),0);
							int offset = y_*width;

							for (int dx = -rad, kx = 0; dx<=rad; dx++, kx++ ) {
								int x_ = x+dx;
								if (x_ < 0) x_ = 0;
								if (x_ > width-1) x_ = width-1;
								//int x_ = Math.max(Math.min(x+dx,width-1),0);
								int j = offset + x_;
								if (plotList[j] != null) {
									float f = k[ky+kx];
									sum  += f* (plotList[j].lumt -128);
									n += f;
								}
							}
						}
//						plotList[i].lumf = (int) (sum / n);
//						plotList[i].z = plotList[i].lumf - 128;
						plotList[i].z = (int) (sum / n);
						plotList[i].lumf = plotList[i].z + 128;
					}
				}
			}
		}