Clear Filters
Clear Filters

display axial slices from 3D MRI images

5 views (last 30 days)
Hello every body, I have 3D MR images in .img format .I want to display all the axial slices in one figure. Could any one help me ?

Accepted Answer

Image Analyst
Image Analyst on 15 Sep 2017
Loop over slices stitching them together. Here's a start
tallImage = [image1; image2];
wideImage = [image1, image2];
Otherwise you could write each image to a separate image file and then call montage().
  2 Comments
MMSAAH
MMSAAH on 15 Sep 2017
I didn't understand you well. Please how to use montage() ? Here is my code, I've seperated my image into 2D slices.
X_dim=560;
Y_dim=560;
fid=fopen('vol_T1_weight(010)_101.img');
rawdataMR=fread(fid,'int16');
Z_dim=numel(rawdataMR)/(X_dim*Y_dim);
alesion= single (reshape(rawdataMR,[X_dim Y_dim Z_dim]));
fclose(fid);
for i=1:Z_dim
figure
image1=image(alesion(:,:,i));
end
Image Analyst
Image Analyst on 15 Sep 2017
If you want to use montage(), just pass it a cell array of 2-D image filenames. It's not hard, just try it.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!