MRI slice viewer

This function will draw multiple MR images in 3D space using DICOM header information
2.5K Downloads
Updated 10 Jun 2010

View License

The three-dimensional viewing of MRI images can help understand the position of (double) oblique slices as often used in cardiac MRI.
The function returns a figure handle which can be used as input argument to display a second slice in the same figure. the other output is a handle for the slice surface. With this the transparency and visibility can be controlled. I noticed that if I use the figure toolbar selection tool to select and delete slices, Matlab can crash. Setting the 'visible' property is a much better method as it is reversible. As a demo I have added a section to rotate the axes and after a simple edit also make a movie.

A big limitation of the method I used is that the contrast can not be set by changing the axis color limits ('CLim' property). Instead, the 'CData' of the surfaces have to be altered and replaced.
Also, for my own use I create a structure with multi-slice or multi-phase images as one 3D matrix and a position matrix consisting series of corner-point arrays. MRI data sets can be multi-slice, multi-plane, multi-phase etc.. Arranging this properly to suit anyone's MRI data would make the function too big and complex. Feel free to edit to your needs.
As usual acknowledgments are greatly appreciated.

Cite As

Ronald Ouwerkerk (2024). MRI slice viewer (https://www.mathworks.com/matlabcentral/fileexchange/27869-mri-slice-viewer), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0