Fabrication of active integrated optical micro-encoder