how to convert 2D image into 3D ??

56 views (last 30 days)
maha mohy
maha mohy on 8 Mar 2012
Commented: Image Analyst on 19 Aug 2021
Hello everybody,my graduation project is about 3D mri visualization ,I want to convert 2D images into 3D ...could anyone help me plz
  10 Comments
zee falcon
zee falcon on 27 Dec 2016
I also need help for 3d conversion of MRI images. Need code to convert it into 3d model. Kindly help me out.
Image Analyst
Image Analyst on 27 Dec 2016
Explain why cat() did not work for you.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 8 Mar 2012
try cat(3,...)
image3D = cat(3, slice1, slice2, slice3, slice4, slice5);
You could put it into a loop
for slice = 1 : totalNumberOfSlices
thisSlice = GetSlice(); % Whatever you have to do to get one 2D image.
if slice == 1
image3D = thisSlice;
else
image3D = cat(3, image3D, thisSlice);
end
end
  9 Comments
Stelios Fanourakis
Stelios Fanourakis on 7 May 2018
Undefined Function GetSlice()
Image Analyst
Image Analyst on 7 May 2018
Stelios, did you see the comment after it "% Whatever you have to do to get one 2D image."??? That means that you have to have some code to get the slice. You have to write it. I'm not writing it.

Sign in to comment.

More Answers (2)

Walter Roberson
Walter Roberson on 8 Mar 2012
The problem is not constructing the 3D array: the problem is displaying it. MATLAB does not have good voxel visualization routines. You could try http://www.mathworks.com/matlabcentral/fileexchange/3280-voxel
  5 Comments
amine benhsina
amine benhsina on 18 Aug 2021
can you propose a best programming language to for 3D image construction,and could you provide us with some sources that can help us in this
thank you
Image Analyst
Image Analyst on 19 Aug 2021
Depends on what you mean by 3-D Image reconstruction. Usually instruments have this built-in. For example if you have a CT, MRI, or confocal instrument, those instruments have software to reconstruct the 3-D image.
If you want to do visualization on the reconstructed volume, we use Avizo:

Sign in to comment.


zahoor mosad
zahoor mosad on 20 Nov 2018
please code in matlab convert 2D image to 3D

Categories

Find more on Biomedical Imaging 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!