A Versatile Position Sensitive X-Ray Detector