From Dr. Bud Wendt, our group obtained three sets of MRI raw data and a program written for Research System Incorporated's Interactive Data Language Program. Our goal was to use the program as a model for our own Matlab code, so that we could generate MRI images for our own study and understanding. Additionally, after some experimentation with Matlab, it was determined that the data was stored in .DAT format as a 256x256 32-bit floating point array, with a 128 byte header.
The IDL code, found here, provided the basic framework for our Matlab code. We were able to obtain a demo version of IDL, which could not successfully run the IDL code. However, we were able to use the help files to understand the IDL functions used in the program.
Our code, found here , reads in raw MRI data to produce MRI images.
After the user inputs the imaginary and real data set names, the user is asked whether K-space modulation in the X and/or Y direction is desired (follow the hypertext link below for further explanation). The program then opens the real and imaginary data sets, cycles through each header, and reads the arrays as raw data into 256x256 floating point arrays. Each array is then rotated 180 degrees (to agree with medical standards), displayed to the screen, and saved in bitmap format. The real and imaginary data follow.
In the next phase of the program, each element in the imaginary array is multiplied by sqrt(-1), and added to the corresponding element in the real array. The two dimensional fft is taken of this combined array, producing a wrap around image whose magnitude follows.
A number of techniques are often used to enhance image presentation. For instance , the 256x256 image array can be enlarged through pixel interpretation or interpol ation, while the image itself can be displayed using a number of possible color maps. T ypically these maps are grey scale in nature, and are mapped on an 8-bit video display. T his necessitates that the final image be mapped to one of 256 possible intensities. The range of this transform is called the contrast, while the central value of this range is refered to as the level or brightness.
In our Matlab program, we automatically map the MRI images to a greyscale colormap, with a preset maximum range. Without this scale, the produced images can be too close to the minimum or maximum to effectively display images.
So, what sort of things can go wrong with MRI imaging? Actually, there are a number of things that can lead to image artifacts - unwanted features in images. Theyould result from a faulty operation of the imager or from an innate property of the human body. A list of the standard artefacts and causes is presented (Hornak: Rochester Institute of Technology Tutorial)
Artifact and Cause
RF Quadrature: Failure of the RF detection circuitry
Bo Inhomogeneity : Metal object distorting the Bo field
Gradient : Failure in a magnetic field gradient
RF Inhomogeneity : Failure of RF coil
Motion: :Movement of the imaged object during the sequence
Flow: Movement of body fluids during the sequence
Chemical Shift: Large Bo and chemical shift difference between tissues
Partial Volume: Large voxel size
Wrap Around: Improperly chosen field of view
Interested in finding out why these things occur? Check out this cool tutorial for more info.