Design of an all optical encoder using 2D photonic crystals | IEEE Conference Publication | IEEE Xplore