Statistical event reconstruction techniques can give better results for gamma cameras than the traditional centroid method. However, implementation of such techniques requires detailed knowledge of the PMT light response functions. Here we describe an iterative technique which allows to obtain the response functions from flood irradiation data without imposing strict requirements on the spatial uniformity of the event distribution. A successful application of the technique for medical gamma cameras is demonstrated using both simulated and experimental data. We show that this technique can be used for monitoring of the photomultiplier gain variations. An implementation of the iterative reconstruction technique capable of operating in real-time is also presented.