public static Mask buildSobelMask(Direction d) {
		switch (d) {
		case VERTICAL:
			double[][] dValues = { { 1, 0, -1 }, { 2, 0, -2 }, { 1, 0, -1 } };
			return new Mask(dValues);
		case HORIZONTAL:
			double[][] aValues = { { 1, 2, 1 }, { 0, 0, 0 }, { -1, -2, -1 } };
			return new Mask(aValues);
		case DIAGONAL:
			double[][] bValues = { { 2, 1, 0 }, { 1, 0, -1 }, { 0, -1, -2 } };
			return new Mask(bValues);
		case INVERSE_DIAGONAL:
			double[][] cValues = { { 0, -1, -2 }, { 1, 0, -1 }, { 2, 1, 0 } };
			return new Mask(cValues);
		}
		return null;
	}