MRI images are typically obtained slice-by-slice, and the 3d volume is reconstructed from this. I got a hold of my own scan and wanted to look at it, but I only had a series of dicom images. Here is my attempt to put together a brain viewer without having to use specialised software or packages.
Here is the link to the Matlab code used. The dicom function is found in the image processing toolbox.