Lab 5

# Lab 5 - 1LAB 5 Name Ryan Corley Section 4 Change your...

This preview shows pages 1–4. Sign up to view the full content.

1 LAB 5 Name: Ryan Corley Section: 4 Change your MATLAB working directory to where you are going to save your files. This will most likely be you’re "My Documents" directory or your flash drive directory. Problem 1 -This problem does not require any sentences - pictures only. In this problem you are going to visualize some magnetic resonance imaging (MRI) data. As discussed in the Lab, an MRI scan is usually composed of a series slices, with measurements taken in the x and y direction that correspond to a particular tissue value, displayed as some white, black or gray value. This MRI data has 128 measurements taken in the x direction and 128 measurements in the y direction to give a single slice. We have 27 slices that compose the scan of the entire head. a) Read in the MRI data by executing the following lines. load mri; D = squeeze(D); b) View slice 8 of the MRI data by executing the following commands. image(D(:,:,8)); axis image; colormap(map) 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
20 40 60 80 100 120 20 40 60 80 100 120 View a different slice of the MRI data by repeating command (b) but with a different slice number. image(D(:,:,9)); axis image; colormap(map) 20 40 60 80 100 120 20 40 60 80 100 120 c) Use the subplot command to view 8 slices simultaneously in a 2 by 4 grid. The 8 slices should be as follows: 2 slices near the beginning of the scan, 4 slices somewhere in the middle of the scan and 2 slices near the end of the 2
scan. Remember there are 27 slices. The command from part (b) will be the command that you will modify to display each image of the subplot. subplot(2,4,1); image(D(:,:,1)); axis image; colormap(map) subplot(2,4,2); image(D(:,:,2)); axis image; colormap(map) subplot(2,4,3); image(D(:,:,3)); axis image; colormap(map) subplot(2,4,4); image(D(:,:,4)); axis image; colormap(map)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern