1.  Field of the Invention
This invention pertains in general to digital image processing and in particular to a method and system for enhancing digital X-ray images. 
2.  Description of Background Art
Modern X-ray systems digitally capture X-ray images with a solid state sensor plate.  The images are typically high resolution, e.g. 2688.times.2688 pixels, and have thousands of levels of gray scale.  The images are usually previewed on a monitor associated with the X-ray system and then stored in an image archive for later retrieval and analysis with a more sophisticated viewing system. 
The monitor provides a user with a real-time view of the X-ray image received by the sensor plate.  A general preference among radiologists is to have a patient's spine aligned with the vertical axis of the image.  In emergency room situations, however, the X-rays must be taken immediately and under desperate circumstances.  Accordingly, X-rays are often misaligned with respect to the preferred axis.  The real-time view in the monitor can be used by the X-ray system operator to correct this misalignment. 
When the X-rays are later retrieved with the more sophisticated viewing system, the doctor or other viewer can re-align or otherwise enhance the image by performing one or more digital image manipulations.  These manipulations include, for example, rotating, scaling, thresholding, and filtering.  Some of the manipulations are lossless, meaning that all information in the original image is retained after manipulation, while others are lossy, meaning that information about the original image is lost during manipulation. 
When a manipulation is performed on an image, the most recent, modified, version of the image is stored in the archive for later retrieval.  If multiple lossy digital manipulations are performed on the image, the amount of information lost may become substantial.  For example, the digital rotation manipulation is generally lossy and the amount of information lost with each rotation is not dependent on the magnitude of the rotation displacement.  In use, a first radiologist in the emergency room may make a hasty rotation of an image.  Then, at a later date, a second radiologist may desire a more precise alignment and introduce a second, very small, image rotation.  Even though the second rotation involves a small angle, the amount of additional information loss is generally the same as for the first, larger, rotation. 
Since each enhanced image becomes the latest enhanced image and displaces the previous enhanced image in the cache, the image stored in the cache progressively deteriorates with each lossy digital manipulation.  Since the cached image is the only copy of the image, the information lost through lossy digital manipulation cannot be recovered. 
Accordingly, there is a need for an image manipulation and enhancement system that optimizes the order, kind, and number of manipulations performed on an image in order to minimize the amount of deterioration suffered by an image after multiple manipulations.