A thread lock helper class added to ImgProcThread. An enabled flag and methods added to ImageProcessor.