Abstract:
A method of separating fat and water proton NMR images in the presence of local magnetic field inhomogeneities uses three images acquired with π, O, and -π phase shift between the water and fat signals. A switch function is developed from the argument of the combined images to unambiguously identify the predominant chemical species of each pixel. Wrap arounds in the argument resulting from the limited range of trigonometric functions are treated first by subtracting a low order polynomial, fit to the phase image, to accentuate and remove wrap around discontinuities, and second by using trend analysis to detect and remove discontinuities caused by the wrap arounds.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to nuclear magnetic resonance (NMR) imaging methods and apparatus and more particularly to a method of producing separate images of different chemical species using such imaging methods. 
     In an NMR imaging sequence, a uniform magnetic field B O  is applied to an imaged object along the z axis of a Cartesian coordinate system, the origin of which is within the imaged object. The effect of the magnetic field B O  is to align the object&#39;s nuclear spins along the z axis. In response to RF pulses of the proper frequency oriented within the x-y plane, the nuclei resonate at their Larmor frequencies according to the following equation: 
     
         ω=γB.sub.O                                     ( 1) 
    
     where ω is the Larmor frequency, and γ is the gyromagnetic ratio which is a property of the particular nucleus. Water, because of its relative abundance in biological tissue and the properties of its proton nuclei, is of principle concern in such imaging. The value of the gyromagnetic ratio γ for protons in water is 4.26 kHz/Gauss and therefore in a 1.5 Tesla polarizing magnetic field B O , the resonant or Larmor frequency of water protons is approximately 63.9 MHz. 
     Materials other than water, principally fat, are also to be found in biological tissue and have different gyromagnetic ratios. The Larmor frequency of protons in fat is approximately 203 Hz. higher than that of protons in water in a 1.5 Tesla polarizing magnetic field B O . The difference between the Larmor frequencies of such different isotopes or species of the same nucleus, viz., protons, is termed chemical shift, reflecting the differing chemical environments of the two species. 
     In the well known slice selective RF pulse sequence, a z axis magnetic field gradient G z  is applied at the time of the RF pulse so that only the nuclei in a slice through the object in an x-y plane are excited into resonance. After the excitation of the nuclei, magnetic field gradients are applied along the x and y axes and an NMR signal is acquired. The gradient along the x axis, G x , causes the nuclei to precess at different resonant frequencies depending on their position along the x axis; that is, G x  spatially encodes the precessing nuclei by frequency. Similarly, the y axis gradient, G y , is incremented through a series of values and encodes y position into the rate of change of phase as a function of G y  gradient amplitude, a process typically referred to as phase encoding. From this data set an image may be derived according to well known reconstruction techniques. A general description of one such image reconstruction technique based on the Fourier transform is contained in the book &#34;Magnetic Resonance Imaging, Principles and Applications&#34; by D. N. Kean and M. A. Smith. Images in other orientations can be generated by rotation of the gradient directions, as is well known in the art. 
     Often it is desired to &#34;decompose&#34; the NMR image into its several chemical shift components. In the exemplary case of protons, which will be used hereafter for illustration, it maybe desired to portray as separate images the water and fat components of the subject. One method of accomplishing this is to acquire two images S O , and S -1  with the fat and water components of the images in phase, and out of phase by π radians, respectively (the &#34;Dixon&#34; technique). Adding and subtracting these images provides separate fat and water images. The phase shift between the fat and water components of the images may be controlled by timing the RF pulses of the NMR sequence so that the signal from the fat image evolves in phase with respect to the water by the proper angle of exactly π, before the NMR signal is acquired. 
     In the ideal case above, the frequency of the RF transmitter is adjusted to match the Larmor frequency of the water. If the polarizing magnetic field B O  is uniform, this resonance condition is achieved through out the entire subject. Similarly, the out-of-phase condition (π radians) for the fat component is achieved for all locations in the subject under homogeneous field conditions. In this case, the decomposition into the separate images is ideal in that fat is completely suppressed in the water image, and vice versa. 
     When the polarizing field is inhomogeneous, however, there are locations in the subject for which the water is not on resonance. In this case, the accuracy of the decomposition breaks down and the water and fat images contain admixtures of the two species. This derives from additional phase shifts of the NMR signal caused by the off resonance condition. The degree to which the off resonance condition holds is, in general, not known. The accuracy of such chemical shift &#34;Dixon&#34; techniques is therefore often unreliable. 
     Field inhomogeneities may result from improper adjustment or shimming of the polarizing magnetic field B O , but are more typically the result of &#34;demagnetization&#34; effects caused by the variations in magnetic susceptibility of the imaged tissue, such as between soft tissue and air, or bone and soft tissue, which locally distort the polarizing magnetic field B O . These demagnetization effects may be of short spatial extent but of high magnitude, and therefore may not be removed by conventional linear or higher order shimming techniques. 
     The influence of demagnetization may be accommodated, however, by an imaging technique that uses three images S O , S 1 , and S -1 , with the phase evolution times adjusted so that the fat and water components of the images in phase, out of phase by π, and out of phase by -π respectively. The complex pixels in each of the three images after conventional reconstruction may be represented as follows: 
     
         S.sub.O =(ρ.sub.1 +ρ.sub.2)e.sup.iφO           ( 2) 
    
     
         S.sub.1 =(ρ.sub.1 -ρ.sub.2)e.sup.1(φ+φ0)   ( 3) 
    
     
         S.sub.-1 =(ρ.sub.1 -ρ.sub.2)e.sup.-i (φ-φO) ( 4) 
    
     where ρ 1  is the (real) relaxation weighted spin density and hence the amplitude of the pixel contributed by the water component, ρ 2  is the (real) relaxation weighted spin density or amplitude of the pixel contributed by the fat component, and φ 0  is the phase shift common to all acquisitions that is caused by RF heterogeneity due to penetration effects, phase shifts between the RF transmitter and receiver, and other systematic components. These effects are independent of chemical shift but dependent on spatial location. In images S 1  and S -1  the amplitudes ρ 1  and ρ 2  are subtracted because of the π and -π phases shift between the fat and water components as previously described. The phase shift φ is caused by the unknown resonance offset that results from B O  heterogeneity. The phase offset φ 0  may be eliminated from equations (2)-(4) from S O , since the ρ i  values are real quantities, by determining its argument φ 0 . The argument φ 0  may then be eliminated from the equations (2)-(4) yielding: 
     
         S&#39;.sub.O ≡S.sub.O e.sup.-eφ0 =(ρ.sub.1 +ρ.sub.2) (2&#39;) 
    
     
         S&#39;.sub.1 ≡S.sub.1 e.sup.-iφ0 =(ρ.sub.1 -ρ.sub.2)e.sup.i(φ)                               ( 3&#39;) 
    
     
         S.sub.-1.sup.&#39;≡ S.sub.-1 e.sup.-iφ0 =(ρ.sub.1 -ρ.sub.2)e.sup.-i(φ)                              ( 4&#39;) 
    
     The values of ρ 1  and ρ 2  may be determined from the measured values of S O   &#39; , S 1   &#39;   and S -1   &#39;  according to equations (2&#39;)-(4&#39;) as: ##EQU1## where s is a &#34;switch function&#34; which may be either +1 or -1 thus determining the sign of the square root. 
     The choice of the sign of the square roots is difficult because the demagnetization effects may cause abrupt changes in the local polarizing magnetic field B O  which cause the switch function to change in value from pixel to pixel. 
     SUMMARY OF THE INVENTION 
     The present invention provides a method of determining the value of the switch function for each pixel necessary to unambiguously decompose an NMR image into separate images of different chemical species. The switch function is determined from the phase angle of a B O  image, the phase angle normally being subject to &#34;wrap around&#34; every 2π radians. The present invention provides two methods of detecting and correcting this wrap around. These methods are preferably used as a first and second step in decomposing the NMR image. 
     The first method removes low spatial order phase shifts from the B O  image by fitting to and subtracting a low order polynomial from the B O  image. Occurrences of wrap arounds are reduced because the dynamic range of the resulting phase image is reduced. 
     Specifically, three complex NMR multi-pixel images S O , S 1 , and S -1  are taken of a body with a first and second chemical species having relative phase shifts of 0, π, and -π in the three images. The images are then combined to create an uncorrected B O  image. A low order surface is fit to the continuous portions of the B O  image and the difference between the low order surface and the B O  image is calculated to produce a corrected B O  image. Finally, a switch function is determined as a function of the corrected B O  image. This switch function is used to identify the predominant chemical species of each pixel in the chemical species images. 
     Thus it is one object of the invention to produce a switch function that can unambiguously distinguish between chemical species in images decomposed by chemical species. 
     The fitting of the low order surface to the continuous portions of the B O  image may be done by spatially differentiating the B O  image to produce a differentiated image and producing a weighting function by comparing the value of the differentiated image at each pixel to a predetermined threshold and setting the weighting function for that pixel equal to zero if that threshold is passed for the purpose of identifying and discarding discontinuous wrap-around points. A differentiated polynomial may be fit to the differentiated B O  image using the weighting function in a weighted curve fitting process. This differentiated polynomial is then integrated to produce the low order surface. 
     It is thus another object of the invention to provide a means for identifying the &#34;wrap arounds&#34; of the B O  image and to extend the range of the B O  image as is necessary to produce the switch function. The differentiation of the B O  image makes the wrap around points easy to identify and the low order surface provides a baseline for subtracting from the B O  image to reduce the wrap around problem. 
     The second method of correcting the B O  image, which may follow the first method, predicts the phase of successive pixels from previous pixels. Wrap arounds are detected by differences between the predicted value and the actual value of the phase of that pixel. 
     In the second method, a starting pixel in the B O  image is used for an initial phase value. The phase value of a neighbor pixel is predicted and compared to the actual phase value of the neighbor pixel. If the predicted value differs from the actual value by more than a predetermined threshold, the phase of the neighbor pixel is corrected by 2π to produce a corrected phase value. This process is repeated until a corrected phase value has been obtained over the entire image. 
     It is thus another object of the invention to provide a method of correcting wrap arounds in the B O  image when the B O  image may change rapidly and thus discontinuities are not readily distinguished by differentiation. 
     The foregoing and other objects and advantages of the invention will appear from the following description. In the description, reference is made to the accompanying drawings which form a part hereof, and in which there is shown by way of illustration a preferred embodiment of the invention. Such embodiment does not necessarily represent the full scope of the invention, however, and reference is made therefore to the claims herein for interpreting the scope of the invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a schematic block diagram of an NMR system; 
     FIG. 2 is a graphic representation of a spin echo NMR pulse sequence such as may be produced on the NMR system of FIG. 1 and is suitable for use with the present invention; 
     FIG. 3 is a flow chart showing the first stage of the method of the present invention for correcting the phase of the B O  image so as to determine a switch function; 
     FIG. 4 is a plot of a single line of the B O  image φ m  prior to the first stage of the correction method of the present invention and showing the fitted curve φ f  ; 
     FIG. 4(b) is a plot of a single line of the difference function Δφ equal to the B O  image φ m  after subtraction of the curve φ f  and unambiguously showing the wrap around of φ m  ; 
     FIG. 4(c) is a plot of a single line of the corrected B O  image φ corr  after correction by the first stage of the method of the present invention; 
     FIG. 5 is a flow chart showing the second stage of the method of the present invention for correcting the B O  image to be used to determine a switch function; 
     FIG. 6 is a detailed flow chart showing a representative unwrapping stage of FIG. 5; 
     FIG. 7 is a three dimensional graph of the image S O  along one y line showing the center of gravity and the maximum point x 1  used with the method of FIG. 5; and 
     FIG. 8 is a graph of the image space of the image shown in FIG. 7 showing the direction of unwrapping from the center of gravity of the image at X O  and y O . 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring to FIG. 1, an NMR imaging system of a type suitable for the practice of the invention includes a computer 10 which controls gradient coil power amplifiers 14 through a pulse control module 12. The pulse control module 12 and the gradient amplifiers 14 together produce the proper gradient waveforms G x , G y , and G z , as will be described below, for a spin echo pulse sequence. The gradient waveforms are connected to gradient coils 40 which are positioned around the bore of the magnet 34 so that gradients G x , G y , and G z  are impressed along their respective axes on the polarizing magnetic field B O  from magnet 34. 
     The pulse control module 14 also controls a radio frequency synthesizer 18 which is part of an RF transceiver system, portions of which are enclosed by dashed line block 36. The pulse control module 12 also controls a RF modulator 20 which modulates the output of the radio frequency synthesizer 18. The resultant RF signals, amplified by power amplifier 22 and applied to RF coil 26 through transmit/receive switch 24, are used to excite the nuclear spins of the imaged object (not shown). 
     The NMR signals from the excited nuclei of the imaged object are picked up by the RF coil 26 and presented to preamplifier 28 through transmit/receive switch 24, to be amplified and then processed by a quadrature phase detector 30. The detected signals are digitized by an high speed A/D converter 32 and applied to computer 10 for processing to produce NMR images of the object. 
     The following discussion considers a spin echo pulse sequence produced on the above described apparatus and suitable for use with the present invention. It should be understood, however, that the invention may be used with other pulse sequences as will be apparent to one skilled in the art. 
     Referring to FIG. 2, a spin echo pulse sequence begins with the transmission of a narrow bandwidth radio frequency (RF) pulse 50. The energy and the phase of this initial RF pulse 50 may be controlled such that at its termination, the magnetic moments of the individual nuclei are precessing around the z axis within the x-y plane. A pulse of such energy and duration is termed a 90° RF pulse. 
     The result of a combination of RF pulse 50 and a z axis gradient pulse G z  (not shown) is that the nuclear spins of a narrow slice in the imaged object along an x-y plane are excited into resonance. Only those spins with a Larmor frequency, under the combined field G z  and B O , equal to the frequencies of the RF pulse 50 will be excited. Hence the position of the slice may be controlled by the gradient G z  offset or the RF frequency. 
     After the 90° RF pulse 50, the precessing spins begin to dephase according to their chemical shifts which cause the spins of certain chemical species to precess faster than others. At time TE/2 after the application of 90° RF pulse 50, a 180° RF pulse 54 may be applied which has the effect of after the 90° RF pulse 50. This spin echo signal 56 is acquired during a read out gradient 53. 
     As is understood in the art, a dephaser pulse 52 is applied after the 90° RF pulse but before the read out gradient to center the spin echo within the read out gradient. 
     With the 180° RF pulse 54 centered at time TE/2 the fat and water proton spins will be completely rephased and hence have no phase shift with respect to each other at the time of the spin echo 56. This timing produces an S O  signal. The time of the 180° pulse 54, however, may be shifted forward or back by time τ from the time TE/2. In this case, the fat and water proton spins will not be in phase but will be shifted with respect to each other by 2τω cs , where ω cs  is the difference in Larmor frequencies between water and fat. If τ is chosen to equal π/2ω cs  then the fat and water proton spins may be shifted by x and -π with respect to each other to create an S 1  and S -1  signal. 
     The above sequences are repeated with different G y  gradient pulses 57, as is understood in the art, to acquire three NMR data sets from which a tomographic images S O , S 1  and S -1  of the imaged object may be reconstructed according to conventional reconstruction techniques using the Fourier transform. 
     As mentioned above, a shortcoming to the technique of using three waveforms to decompose fat and water proton images is that the switch function s is not known. Referring to equations (5) and (6) it may be seen that the sign of the switch function s is may be determined by knowing the relative magnitudes of ρ 1  and ρ 2  and the information required to ascertain the relative magnitudes of ρ 1  and ρ 2  may be determined from equations (3&#39;) or (4&#39;), i.e., by equation (4&#39;): 
     
         (ρ.sub.1 -ρ.sub.2)=S.sub.-1.sup.&#39; e.sup.i(-φ)  (7) 
    
     The value of S -1   &#39;   is a known measured quantity, therefore, the relative magnitudes of ρ 1  and ρ 2 , and hence the switch function value, may be determined if φ may be determined. As will be explained below, φ may be determined from a B O  image equal to S 1   &#39;  S -1   &#39;  * provided φ is in the range of ±π/2. To extend this range, two techniques are used to detect and correct &#34;wrap arounds&#34; of φ at the values of ±π/2. The extended value of φ may be used to determined the switch function. 
     I. Determining the B O  Image 
     Referring to FIG. 3, the first step in determining the value of φ for each pixel is to obtain images S O , S 1 , and S -1  comprised of pixels S O , S 1 , and S -1  per process block 60. A B O  image φ m  is then produced, per process block 62, by multiplying the image S 1  by the complex conjugate of the image S -1  on a pixel by pixel basis and extracting the argument, i.e. 
     
         φm=arg(S.sub.1.sup.&#39; S.sub.-1.sup.*)=arg(S.sub.1 S.sub.-1.sup.*) (8) 
    
     or by equations (3) and (4) 
     
         φm=arg([(ρ.sub.1 -ρ.sub.2)e.sup.i(φ) ][(ρ.sub.1 -ρ.sub.2)e.sup.i(φ) ])                            (9) 
    
     
         φm=arg((ρ.sub.1 -ρ.sub.2).sup.2 e.sup.i2φ) (10) 
    
     hence, the B O  image may be used to determine φ as: 
     
         φm=2φ                                              (11) 
    
     Note that the B O  image φ m  is only uniquely determined if |φ|≦π/2 as a result of the periodicity of trigonometric functions. For angles φ greater than π/2 or less than -π/2, φm &#34;wraps around&#34; and φ is therefore ambiguous. As shown in FIG. 4(a), this wrap around 61 occurs at φm=π and φm=-π per equation (11). In general, this range of π to -π is too restrictive as it requires that the frequency shift caused by changes in B O  be less than ω cs  /2. 
     The wrap arounds 61 are removed by a two stage process, the first stage as shown in FIGS. 3 and 4(a)-(c) and the second stage shown in FIGS. 5-8. 
     II. Phase Correction by Polynomial Subtraction 
     Referring still to FIG. 3, as indicated by process block 62, the B O  image is differentiated to produce differentiated images ##EQU2## In the differentiated images, the wrap arounds 61 will appear as large magnitude, narrow spikes which are readily identified by a thresholding process and given zero weight in the curve fitting to be described below. 
     A polynomial φ f  of the form: 
     
         φ 
    
     is differentiated to produce: ##EQU3## which is fit to the derivative of φ m  with respect to the x axis as indicated by process block 64. The value x O  and corresponding value y O  are the coordinates of the center of gravity of the image as will be described further below. This curve fitting is done by the weighted least squares method as is well understood in the art, where the weighting is a function of the amplitude of the S O   &#39;   image at the particular pixel times the weighting produced by the thresholding process described immediately above. Coefficients are determined by averaging over all y-lines to produce the coefficients p 3 , p 2 , and p 1 . The process is then repeated for lines of constant x value using the polynomial: ##EQU4## 
     At process block 66 the fit functions ##EQU5## are integrated to determine the coefficients of a third order polynomial φ f  of the form: 
     
         φ.sub.f (x,y)=a.sub.3 (x-x.sub.O).sup.3 +a.sub.2 (x-x.sub.O).sup.2 +a.sub.1 (x-x.sub.O )+b.sub.3 (y-y.sub.O).sup.3 +b.sub.2 (y-y.sub.O).sup.2 +b.sub.1 (y-y.sub.O)+c                                    (14) 
    
     The value c is set equal to φ m  (x O ,y O ). This polynomial surface conforms to the undifferentiated B O  image φ m  without regard to the wrap arounds 61 as shown in FIG. 4(a). 
     Process blocks 68 and 76 together form a loop containing process blocks 70-74 which sequentially correct each pixel of the B O  image. 
     At process block 70, a difference function Δφ is computed as follows: 
     
         Δφ=φ.sub.m φ.sub.f                       (15) 
    
     As shown in FIG. 4(b) in the function Δφ(x,y) the wrapped around points 61 are now unambiguous and may be detected at decision block 72 which identifies segments of Δφ having magnitudes of greater than 2π, which are corrected at process block 74 by adding or subtracting 2π to the values of these segments depending on the sign of Δφ at these segments. A corrected image φ corr  is produced equal to Δφ without the wrap arounds 61. To determine φ, the corrected image φ corr  (x,y) is halved and ##EQU6## is added at each pixel at process block 78 in accordance with equations 11 and 15 to produce phase image φ as shown in FIG. 4(c). 
     The above described method of determining the phase image φ(x,y) may fail for certain B O  areas where the fit function φ f  (x,y) is not able to follow the spatially rapid phase changes or when the wrap arounds 61 of phase go beyond 2π. For these reasons, the phase image φ(x,y) produced by the above described first stage is operated on by a second stage of the process as will now be described. 
     III. Phase Correction Using Trend Analysis 
     In the second stage, the phase of each pixel of the phase image is predicted by an exponential prediction based on the previous pixels. Deviations between the prediction and the actual measured phase are used to detect previously undetected wrap around points 61 and the &#34;wrapped around&#34; pixels are &#34;unwrapped&#34; by adding or subtracting 2π. 
     Referring to FIG. 5 and 7, in the first step of the second stage, as indicated by process block 100, the center of gravity (x O ,y O ) of the amplitude of the S O   &#39;   image is found. 
     Specifically x O  and y O  are calculated where: ##EQU7## 
     The point of maximum phase, x 1 , along the line of constant y intersecting the center of gravity (&#34;y O  -line&#34;), is then identified and the value of φ(x,y O ) along this line is determined as follows. Starting at the pixel of maximum intensity at y O , (x 1 ,y O ), as the current pixel, the average phase in a 3 by 3 pixel matrix (x 1  -1≦x≦x 1  +1, y O  -1≦y≦y O  +1) is determined by averaging. Care is taken to avoid wrap around discontinuities by performing a second average with π offset added to each pixel, adjusting the result to within the range of ±π by adding or subtracting 2π in a average with the smallest χ 2  fit to a planar surface defined by the previous averages. The value of the phase determined by this method becomes the starting phase φ O  for pixel x 1 , y O . 
     Progressive y-lines are then unwrapped starting from the line at y O  and at point x 1  for that line. Referring to FIG. 8, these lines are analyzed at and below the y O  -line per the loop formed by process blocks 104 and 112 which sequentially decrements the y value of the line to be unwrapped. Again the maximum phase value x 1  on each line is determined as indicated by process block 106 within this loop and the line is unwrapped from the pixel x 1  rightward to the image boundary as indicated by arrow II of FIG. 8, and by process block 108 of FIG. 5, and then leftward from pixel x 1  as indicated by arrow III of FIG. 8 and process block 110 of FIG. 5. The next lower y-line is then unwrapped and the process is repeated proceeding in the direction shown by arrow I of FIG. 8 according to the loop of process blocks 104 and 112 of FIG. 5 as previously described. 
     When the lower portion of the image is unwrapped, successive y-lines above the y O  -line are unwrapped according to a loop formed by process blocks 114 and 122 of FIG. 5. 
     The center of gravity and the maximum phase value x 1  on each line is determined as indicate by process block 116. For each such y-line the phase is unwrapped first along the direction indicated by arrow V of FIG. 8 away from pixel x 1  according to process block 118 of FIG. 5, and then in the direction indicated by arrow VI of FIG. 8 according to process block 120 of FIG. 5. The process is repeated for higher y-lines as indicated by arrow IV of FIG. 8 according to the loop of process blocks 114 and 122 of FIG. 5 until the upper edge of the image is reached. 
     Referring to FIG. 6, the unwrapping process of process block 108, as is representative of the processes used in process blocks 110, 118 and 120, examines the phase of each pixel on the given y line starting at pixel adjacent to pixel x 1 . This examination is controlled by a loop formed by process blocks 130 and 150. The first step within this loop as indicated by process block 132 is to predict the phase φ p  at the current pixel by reference to the previous pixel as follows: 
     
         φ.sub.p (x,y)=(1-α&#39;)φ(x,y)+α&#39;φ.sub.p (x-1, y) (18) 
    
     
         wherein 1-α&#39;=(1-α)[(|S.sub.O.sup.&#39; (x,y)|/|S.sub.O.sup.&#39; (x.sub.m,y)|)](19) 
    
     
         α=0.6 
    
     and                                                        (20) 
     x m  is the pixel on the current line of maximum amplitude |S O   &#39;  |. This step is a weighted trend prediction. 
     It will be apparent to those of ordinary skill in the art that other values of α may be selected such that 0≦α≦1 where larger values of α will provide a prediction φ p  that conforms more slowly to the actual measured phase φ. The weighting of α by the amplitude of the image |S O   &#39;  | causes the prediction φ p  to use little of the immediate phase information of φ when the amplitude is small and instead retains the average from the preceding pixels where the amplitude is high, and thus enables the trend of the phase to be tracked even across a &#34;hole&#34; in the image where the signal is low. 
     As indicated by process block 134, a rolling weighted average φ ave  of the current phase φ is maintained for a window of pixels of empirically determined width 2N=12 centered about the current pixel x as follows: ##EQU8## 
     This average is compared to the predicted value φ p  to generate a first error value Δ 1  as follows: 
     
         Δ.sub.1 (x,y)=φ.sub.p (x,y)-φ.sub.ave (x,y)  (22) 
    
     A large value of Δ 1  will indicate a wrap around and hence at decision block 138 if the value of Δ 1  exceeds a predetermined maximum value of π, then at process block 140, the current phase φ is unwrapped by adding or subtracting 2π as follows: 
     
         φ(x,y)=φ(x,y)-sgn(Δ.sub.1 (x,y))*2π       (23) 
    
     In either case at process block 142 a weighted average φ ave   &#39;  is computed for the corresponding pixels on the preceding y-line as follows: ##EQU9## 
     This average is compared to the current phase value φ value to generate a second error value Δ 2  (x,y) as follows: 
     
         Δ.sub.2 (x,y)=φ(x,y)-φ.sub.ave.sup.&#39; (x,y)   (25) 
    
     A large value of Δ 2  (x,y) will indicate an additional wrap around and hence at decision block 146 if the value of Δ 2  is not close to zero, i.e. is less than π in magnitude, for example, then at process block 148, the current phase φ is unwrapped by adding or subtracting 2π as follows: 
     
         φ(x,y)=φ(x,y)-sgn(Δ.sub.2 (x,y))*2π       (26) 
    
     The next pixel is then examined and the process is repeated per the loop formed by process blocks 130 and 150 as described. 
     IV. Determination of the Switching Function 
     With φ(x,y) known, the switch function s may be determined from equation (4) in principle as 
     
         s=sng(ρ.sub.1 -ρ.sub.2)=sgn(S.sub.-1.sup.&#39; e.sup.iφ) (27) 
    
     For convenience, a continuous switch angle θ may be defined as: 
     
         θ=arg(S.sub.-1.sup.&#39; e.sup.iφ)                   (28) 
    
     The value of θ will approximate -π or π depending on the predominance of ρ 1  over ρ 2 . It has been determined that a continuous switch function avoids the generation of artificial &#34;contour&#34; lines at fat/water borders. Hence a continuous switch function s&#39; may be chosen as: 
     
         s&#39;=cos (θ)                                           (29) 
    
     although some other function could be chosen. 
     While this invention has been described with reference to particular embodiments and examples, other modifications and variations, such as application to projection reconstruction imaging techniques, will occur to those skilled in the art in view of the above teachings. For example, the switch function may be determined from φ(x,y) immediately after the first stage of the correction process or alternatively the second stage of the correction process may be used alone. Also, the technique may be used for chemical species other than fat and water. Accordingly, the present invention is not limited to the preferred embodiment described herein, but is instead defined in the following claims.