How to interpolate two MRI slices in order to find the the Slice in-between?

9 次查看(过去 30 天)
Hello there, I am working on MRI slices, while working i found that there are some slices is missing and that causing losing in the information. So, i need to interpolate each 2 consecutive slices to generate a new slice between them. i have used the following code to interpolate two different meshgrids, how i can apply this code on the images i attached?
% Create two initial surfaces (different grids)
[x1,y1] = meshgrid(-2:0.4:2,-2:0.4:2);
[x2,y2] = meshgrid(-2:0.2:2,-2:0.2:2);
z1 = x1.*exp(-x1.^2 - y1.^2);
z2 = x2.*exp(-x2.^2 - y2.^2) + 1;
figure
h1 = surface(x1,y1,z1);
hold on
h2 = surface(x2,y2,z2);
view(3)
% Interpolate surface z1 in the finer grid defined for surface z2
z1_interp = interp2(x1,y1,z1,x2,y2);
a = 0.3;
hold on
h3 = surface(x2,y2,(a*z1_interp + (1-a)*z2));
  9 个评论
Rik
Rik 2019-7-5
A better idea is to resample from the full 3d stack. Then you would be able to use more advanced interpolation tools.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MRI 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by