Advanced image processing techniques for automatic interpretation of time-of-flight diffraction images