Stack 3D images in a 3D plot

6 views (last 30 days)
pri
pri on 7 Jun 2013
I have a set of images of dimension 320x321x3 uint8. They all represent the cross sectional slices of an arbitrary object. Now i want to stack, say every 10th slice in a 3D kindda plot. I have no idea where to start with. Kindly give some suggestions.

Accepted Answer

Sean de Wolski
Sean de Wolski on 7 Jun 2013
X = zeros(320,321,3,10); %10 slices for example
Now you stick every RGB image in the 4th dimension using the same instructions from here:
So
for ii = 1:10
Construct filename
X(:,:,:,ii) = imread(filename)
end
  2 Comments
pri
pri on 10 Jun 2013
Edited: pri on 11 Jun 2013
Thank you so much for your response. However I think I should explain a little more. I have taken the projection of an object for multiple angles. i have taken iradon, and now i have the cross sectional slices(as row/column matrix). I want to stack every 10th slice along Z in a kinda 3D visualization, for showing the corresponding cross sectional slice of the object.
Sean de Wolski
Sean de Wolski on 11 Jun 2013
the output from iradon is grayscale not rgb correct? If that is the case, do exactly what I have above moving the fourth dimension into the third:
X = zeros(320,321,10);
etc.

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!