![]() |
Exploiting MATLAB's Data Structures |
An MRI scan is an good example of a volume dataset. Here the density
of tissues is recorded to create a series of images along slicing planes.
In this problem you will learn how to manipulate N-D arrays and display
the results of slicing the dataset along various directions.
Goal: Display a multidimensional dataset two ways. Display a single slice as an image and use the slice function to visualize the data in 3-D.
Key concepts: Multidimensional arrays, N-D indexing, slicing.
Key functions: Multidimensional indexing, slice, reshape,
whos, size
load mriwhossize(D)
image(D(:,:,:,17)colormap(gray)
slice is a volume visualization function that displays
slices of a 3-D dataset as planes with the correct orientation. Use slice
to display the 17th slice of the dataset as well as slices along the 70th
column (x-axis) and 40 and 85th rows (y-axis). Since slice
only works on 3-D arrays, you may need to use double
and reshape first.D = double(D);D = reshape(D,128,128,27);slice(D,70,[40 85],17)shading flatview(-37,45)

![]()
Copyright © 1997 The MathWorks, Inc.
clay@mathworks.com
$Revision$ $Date$