Filter löschen
Filter löschen

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

9 Ansichten (letzte 30 Tage)
sana3 sal
sana3 sal am 5 Jul. 2018
Kommentiert: Rik am 5 Jul. 2019
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 Kommentare
sana3 sal
sana3 sal am 5 Jul. 2019
I followed the linear interpolation that Mr. Anton mentioned above
Rik
Rik am 5 Jul. 2019
A better idea is to resample from the full 3d stack. Then you would be able to use more advanced interpolation tools.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MRI finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by