Mechanically switchable photonic crystal filter with either all-pass transmission or flat-top reflection characteristics.