ImageViewer - MRC CBU Imaging Wiki
CbuImaging: ImageViewer

A simple matlab image viewer

The viewer is a very simple set of matlab routines to display Analyze 7.5 format images within matlab. It can display any slice in the image in axial, coronal and sagittal views.This viewer is already installed in the CBU. Users outside the CBU will need to install the viewer.

Installing the viewer, for users outside the CBU

Download the viewer archive. Then, follow the instructions on the archive extraction page to extract the archive to some directory on your matlab path.If you are running the program on a machine other than a PC or Sun, you will need to recompile a matlab mex routine. This is:

read_image.c

In matlab 4, you should do this from the directory containing the files, by typing:

cmex read_image.c

In matlab 5 the command is 'mex':

mex read_image.c

Using the viewer

The viewer will run in matlab 5 or matlab 4. To use it in its simplest form, type

view_planes( 'yourimagename.img' )

at the matlab prompt. It will then load the image and display it in sagittal view. I think the controls for viewing are relatively self explanatory.If you have SPM on your matlab path, then you can also run the viewer thus:

view_img

at the matlab prompt, which gives you the SPM file selection dialog box to select the image to view. Select an image, and the viewer will display it.The default viewing plane is that specified by the image origin, unless this is 0, in which case the default is the image centre.

The viewer is slow if the images are very large; this is because it uses matlab to load the whole image into memory.

Any problems, bugs, please mail me at the address below.

Matthew Brett 7/10/99

CbuImaging: ImageViewer (last edited 2013-03-07 21:23:04 by localhost)