Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

EXP 10 FFT AND IFFT IN K-SPACE

Aim:
To perform fft and ifft operations on images in k-space.
Algorithm:
1. Read data header information: Load RAW-nmn contain information about the MRI data
file. It is a text file containing Information about Offset, DATA size, Kx Co-ordinate, Ky-Co-
ordinate etc.
2. Read in the K-space information.
3. IFFT in Kx Direction,
4. IFFT in Ky Direction
5. IFFT shift
6. Image Display
Theory:
1. imread('normal-brain-mri-sagittal-1.jpg'): This function reads the image file named
'normal-brain-mri-sagittal-1.jpg' from the current directory and returns the image as a
matrix of intensity values.
2. im2double(): Converts the image from an unsigned integer format to double precision,
scaling the data to the range [0, 1].
3. imshow(): Displays the image.
4. fftshift(): Shifts zero frequency component to the center of the array. This is often used in
Fourier analysis to ensure that low frequencies are at the center of the spectrum.
5. fftn(): Computes the multidimensional discrete Fourier transform (DFT) of the image.
6. ifftshift(): Undoes the shift introduced by fftshift(). It shifts the zero frequency component
back to the corner of the array.
7. subplot(): Divides the figure into a grid and creates axes for a specific subplot.
8. title(): Adds a title to the current axes or chart returned by imshow().
9. fftshift(): Similar to before, this function shifts the zero frequency component of the
Fourier space to the center.
10. ifftn(): Computes the multidimensional inverse discrete Fourier transform (IDFT) of the
shifted Fourier space.
Program:
clc
clear all
close all
%ime phantom(256);
ime=im2double(imread('normal-brain-mri-sagittal-1.jpg'));
figure(1);
subplot(221);
imshow(imo); title('Original image');
imok fftshift(fftn(ifftshift(ime)));
subplot(222);
imshow(im0k); title('Fourier space of Original image');
%Do2DIDFT im1 fftshift(ifftn(ifftshift(im0k)));
subplot(223); imshow(im1);
title('Reconstructed image');

Results: FFT and IFFT operations on images in k-space were performed using MATLAB.

You might also like