public void applyMedianFilter(int size) throws MyExceptions {
		MyNotOddNumberException.test("size", size);
		MyOutOfBoundException.test("size", size, 3, Math.min(row, column)-1);
		int width = (size - 1) / 2;
		Data clone = new Data(this);
		for(int i = width; i < row - width; ++i)
			for(int j = width; j < column - width; ++j) {
				float[] values = new float[size*size];
				for(int a = 0; a < size; ++a)
					for(int b = 0; b < size; ++b) {
						values[a * size + b] = matrix[i + a - width][j + b - width];
					}
				for(int a = 0; a < size*size - 1; ++a)
					for(int b = a + 1; b < size*size; ++b) {
						if(values[a] > values[b]) {
							float x = values[a];
							values[a] = values[b];
							values[b] = x;
						}
					}
				clone.setMatrixValue(i, j, values[(size*size - 1) / 2]);
			}
		matrix = clone.matrix;
		changeMin = true;
		changeMax = true;
	}