- Registering Multimodal 3d medical images: https://www.mathworks.com/help/images/registering-multimodal-3-d-medical-images.html
- Converting 2d Image to 3D: https://www.mathworks.com/matlabcentral/answers/154714-how-can-i-convert-2d-images-to-a-3d-image
- Model Construction from CT slices: https://www.mathworks.com/matlabcentral/answers/182511-model-reconstruction-from-ct-slices
- ROI Based processing: ROI-Based Processing - MATLAB & Simulink
Use 2D ROI slices to create 3D surface?
31 次查看(过去 30 天)
显示 更早的评论
I have 15 MR image slices of my heart (left-ventricle) that I have contoured using drawfreehand. I would like to line them up as they would be in my body, and then create a surface model of the ventricle. I've already experimented with several ways of doing this:
I tried to plot them all as polygons with fill3, which looks good, but I want to connect these contours together:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1183243/image.png)
I've also tried reorganizing the data and plotting it as lines using plot3:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1183248/image.png)
It makes a 'groovy' picture, but also not what I wanted. I have also of course tried surf:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1183253/image.png)
but, I keep getting this garbage. I can see why I'm getting that, but I would like help getting something that looks more like a left ventricle (kind of a cone/volcano looking shape). I tried using meshgrid, but I'm not very good at 3D plotting, so I could just be doing something wrong. I've also tried triangulation and a 3d surface fit, which both gave me a mess and connected points from opposite sides of the volume. Can anyone help me get on the right track?
0 个评论
采纳的回答
Suvansh Arora
2022-11-9
One way to do this is the following example. However instead of using ‘imread’ with ‘me.jpg’, the data can be used.
I = imread('me.jpg'); % load in image
imshow(I)
% Figure 1 is the original image
f = figure
level = graythresh(I);
BW = im2bw(I,level);
imshow(BW)
% Figure 2 is the threshold image
% Create the stacked image by stacking the binary image repeatedly
f = figure;
binaryFile = []
for i = 1:200
binaryFile(:,:,i) = BW;
end
% Sample the binary file
binaryFile = binaryFile(1:5:end, 1:5:end, 1:5:end)
% Smooth the image
binaryFile = smooth3(binaryFile);
[x,y,z] = meshgrid(1:size(binaryFile,2),1:size(binaryFile,1),1:size(binaryFile,3));
[faces,verts] = isosurface(x,y,z,binaryFile,0.5);
% Creates a surface between 1's and 0's.
p = patch('Vertices', verts, 'Faces', faces, ...
'FaceColor','interp', ...
'edgecolor', 'interp');
% Remove the color
p.FaceColor = 'none';
% Leave color on the edges
p.EdgeColor = 'red';
% Figure 3 is figure 2 stacked repeatedly
colormap jet
axis equal
view(3)
Kindly go through the following links for reference:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!