# MRI K-space to image: why track frequencies in two dimensions?

While trying to better understand how an MRI goes from k-space to an image, I came across this wonderful website that explains how you would represent an image as a collection of rows of pixels where each row of pixels is represented as a sum of waves of greyscale intensity.

First you select a single row from an image.

Then you apply the Fourier transform to represent the row as a collection of waves.

What I don't understand is, if we can get the frequencies for each row and accurately reconstruct what a row of the image looks like via frequency encoding, and if we already know where each row is in relation to the other rows (position of the blue line), why do we need to do the same basic thing along a different dimension (the y-axis using phase encoding)? Isn't it sufficient to simply stack the rows to get the full image?

• Can I please ask if this was resolved? – A_A Jul 7 '20 at 16:28

The reality (as in physical reality, the phenomenon) is that a pixel's "value" is determined both by what is happening along the X dimension and the Y dimension (in k-space).

If you want to reconstruct an image you have to do it from **two spatial sinusoidal waves.

This is represented in the $$f[m,n] \cdot e^{-j 2 \pi (u m + v n)}$$ part of the DFT. This is the product that we sum along the $$u$$ and $$v$$ directions.

Notice here, that to obtain one $$u,v$$ value you need to evaluate sinusoids in both the $$u$$ and $$v$$ directions. And vice-versa of course, meaning that the grey level value of one pixel is decomposed in the coefficients for both sinusoids along the $$u$$ and $$v$$ directions. If you only run one of them, you get only HALF the story.

If you reconstruct an image from rows, you synthesize grey level variation from just one direction. You know how a pixel's value varies with respect to its left and right neighbours but not its top and bottom neighbours.

Here is a mental experiment: Take an image and run DFTs along the rows (that is, the horizontal direction, as per the recipe that motivated this question). Now take the original image and add 42 to the pixels of the rows of the upper half (this looks like a step in the vertical direction). What is the effect of this? You are only introducing a DC to the ROW DFTS, other than this, the rest of the spectrum is exactly the same.

You can choose to get even more adventurous in that vertical direction and modulate the pixels by sinusoids. They will go completely amiss, why?

Because that modulation, along the vertical direction only introduces some "disturbance" to the DC component of the horizontal direction. It is impossible to pick up anything else unless you "check" for it, by evaluating the DFT along the vertical dimension too.

And you can see this happening in $$F[u,v] = \sum_m \sum_n x[m,n] e^{-j 2 \pi (u*m + v*n)}$$ because the sums are nested as well as when you apply the DFT twice because you first apply it on the rows (now you know how a pixel varies with respect to its left-right neighbours) and then you apply it along the columns of the ROWS DFT (now you know how a pixel varies with respect to its top and bottom neighbours).

Hope this (and to an extent this) helps.

in MRI, you don't start with the image as pixels in spatial domain, but with the k-space data!

So, you don't "construct k-space from the image", you "construct the image from k-space", which takes a 2D inverse Fourier transform.

And that's not "do it row-by-row"; that is "do it on all rows, then all columns of the result".

• Right, I understand that you don't start with the image, since that would defeat the purpose of the MRI. I guess what I'm asking is, why bother tracking the columns of k-space if you can just run the inverse Fourier transform on the nth row in k-space to get the nth row in the image, do this each row, and then stack all the resulting image rows to get the full image? Actually, as I read your answer more carefully I see you said that it's not "row by row." – user554481 Jun 25 '20 at 22:09
• Based on what I've read on this website (mriquestions.com/locations-in-k-space.html), I think the answer to my question (posed in the above comment) is that a single row in k-space isn't sufficient to reconstruct a single row in the image because each pixel in the image maps to every point in k-space, so then I guess a followup question would be: is the image analogy flawed? Should I ignore it because it is misleading? – user554481 Jun 25 '20 at 22:10
• @user554481 because the physics doesn't deliver a row-wise fourier transform of the image, but a 2D fourier transform. I think the example shown by the website you were referring to hence isn't wrong, but incomplete. You need to do a column-wise FT on the result of all the row transforms, too. – Marcus Müller Jun 26 '20 at 6:34